直接输入域名或者IP不能打开主站首页
运行环境 Windows 2012 R2 + MS SQL Server 2012
SiteServer版本 siteserver-dev-v5.0.63
问题描述
在生成主站的首页后,打开主站域名或者IP地址都出现如下错误提示:
该 XML 文件并未包含任何关联的样式信息。文档树显示如下。
<Error>
<Message>No HTTP resource was found that matches the request URI 'http://www.xxxx.com/'.</Message>
<MessageDetail>No route providing a controller name was found to match request URI 'http://www.xxxx.com/'</MessageDetail>
</Error>
尝试排查问题 1、在域名或IP后面加/index.html可以正常显示; 2、IIS的默认文档设置无误; 3、将SiteServer站点绑定到其它非SiteServer目录,在其目录下新建index.html,直接用域名或IP可以打开; 4、子站无影响; 5、更换服务器,重装SiteServer(siteserver-dev-v5.0.59),问题依旧。 # #
我也是这种情况,很郁闷
可以留下QQ联系方式。
QQ:12496785
因为我这边改成了mvc 方式,你们也改一下 通用 加上下面就可以了 Application_BeginRequest if (Context.Request.FilePath == "/") { if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + "Index.html")) { Context.RewritePath("Index.html"); } else { Context.Response.Write("404.html"); } }
在Global.cs 里加这一句代码就可以了
protected void Application_BeginRequest(object sender, EventArgs e)
{
if (Context.Request.FilePath == "/") Context.RewritePath("index.html");
}
已解决。