asp.net mvc 网站如何发布?
本人刚接触ASP.net mvc 用的是1.0版本。
我刚做完一个项目,项目在vs中完全正常。
但是发布到IIS后除了首页可以显示外,其他页面上的所有连接点进去都是无法找到网页,还有有些链接是用jQuery ajax读取数据库(linq to sql)然后显示,点了之后也一点反应都没。
首页使用地址重写,代码如下:
C# code:
public void Page_Load(object sender, System.EventArgs e)
{
// Change the current path so that the Routing handler can correctly interpret
// the request, then restore the original path so that the OutputCache module
// can correctly process the response (if caching is enabled).
string originalPath = Request.Path;
HttpContext.Current.RewritePath(Request.ApplicationPath, false);
IHttpHandler httpHandler = new MvcHttpHandler();
httpHandler.ProcessRequest(HttpContext.Current);
HttpContext.Current.RewritePath(originalPath, false);
}
下面是Global.asax 文件中routing规则:
C# code:
public class MvcApplication : System.Web.HttpApplication
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
ro
相关问答:
select top 12 * from Product where [id] not in (select top 12 [id] from Product)
这样可以分页,但是我在后面想加个条件
select top 12 * from Product where [id] not in (select top 12 [id] from Prod ......
文件上传时怎样显示进度条 最好给个Demo 谢了~!
用Ajax吧,Ajax有例子
用 ajaxtoolkit 里面的代码,有例子
引用
用Ajax吧,Ajax有例子
顶
http://topic.csdn.net/u/20091010/23/4bb5017a-ac75- ......
比较好的学习asp.net的书推荐一下吧,谢谢~~~
書的話等高人推薦, 我認為多上上www.asp.net對你幫助挺大, 那里有很多視頻, 如果是新手的話, 視& ......
RT。很多地址都打不开或不能下载了
有资源的朋友给个地址。。只要下载后是我想要的内容 50分献上!
谢谢!
沙发我先坐!
帮顶
帮顶
没听说过哦
JF
好像19没有的,不全。
好多集都不能下。。
......
在弹出框中点击一个按钮,怎么调转到另一个浏览器,并且在该浏览器打开两个页面
你的意思应该是
response.write("<script>alert('确认'); window.location.href('xxxx.aspx'); </script>"); ......