我已经做了几个小时了,还没有弄清楚我做错了什么。我创建了一个MVC4内部网站点,现在我准备将它部署到我们的web服务器上。我设置了一个名为Portal的站点,在Visual中,我使用文件系统方法执行了1点发布。成功复制到我的网站的文件。在IIS中,我将身份验证更改为Windows,并禁用匿名身份验证。我甚至进入我的应用程序池并更改了= true (不确定是否需要这样做)。然后我点击*:88上的浏览门户,我收到无法显示该网页。我检查了我的模块,我看到UrlRoutingModule-4.0是管理和继承的。我一定是忽略了一个明显的设置,因为这是我的第一个网站。任何帮助都是非常感谢的。谢谢。
physical path = c:\inetpub\wwwroot\Portal
Site name and Application Pool = Portal (.Net 4 and Pipeline mode: integrated)
type = http
Host name = Portal
Port = 88 (80 was already used and did not work)
IP Address = *更新: Webconfig (我有自定义角色)和Routconfig
<system.web>
<roleManager enabled="true" defaultProvider="DbRoleProvider">
<providers>
<clear />
<add name="DbRoleProvider"
applicationName="Portal"
type="Portal.WebUI.Infrastructure.DbRoleProvider"
connectionStringName="PortalEntities" />
</providers>
</roleManager>
<compilation debug="true" targetFramework="4.0" />
<authentication mode="Windows" />
<authorization>
<deny users="?" />
</authorization>
<pages>
<namespaces>
<add namespace="System.Web.Helpers" />
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Optimization" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.WebPages" />
</namespaces>
</pages>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true" />
<handlers>
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
<add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers></system.webServer>
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "RequestInfo", action = "Index", id = UrlParameter.Optional }
);
}发布于 2014-02-08 13:54:15
因此,经过更多的实验和研究,我发现了我的问题,这是以前从未这样做的结果。
www.portal.com:85时,它不了解该地址,也无法连接到任何东西。但是,当我移除主机名并输入http://localhost:85时,它就正常工作了。我得和我的基础设施团队联系起来。发布于 2014-02-07 21:38:25
如果您在IE中禁用友好的错误消息,这将是有帮助的。在"Internet选项“的高级选项卡,在浏览取消选择”显示友好的HTTP错误消息“。然后再试一次。希望您能够看到HTTP状态代码的实际问题是什么。它无法找到服务器,您是否得到404 (未找到页面)、401未经授权、500等。
有了这些信息,诊断起来就容易多了。
https://stackoverflow.com/questions/21638089
复制相似问题