繁体   English   中英

按F5键并在浏览器中启动无济于事

[英]pressing F5 and launching in browser does nothing

我是ASP.Net的新手。 我已经打开了一个没有错误构建的解决方案。 当我按F5键时,将在Chrome窗口中打开一个新标签,其中包含URL http://localhost:4435/foo/Default.aspx 但是,什么也没发生-没有页面显示。 它似乎永远都在加载。

当我尝试不通过Studio访问页面时,使用如下所示的URL: http://localhost/solution-name/trunk/foo/ ,出现以下错误:

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error: 


Line 253:      </controls>
Line 254:    </pages>
Line 255:    <roleManager enabled="true" cacheRolesInCookie="true" defaultProvider="AspNetSqlRoleProvider">
Line 256:      <providers>
Line 257:        <clear/>

我不确定这2个是否相关。 我只想启动并运行此解决方案。 我究竟做错了什么?

这里有2个不同的问题。

第一个(按F5键开始)很可能是由于global.asax某些内容(如果存在)或default.aspx页本身旋转到任何地方的原因。 通常,数据库连接的配置错误,超时时间太长(例如5分钟)。

第二个问题归结为该位置,而不是应用程序的根目录,这是一个配置问题。

我要做的是先查看通常位于web.config中的数据库连接字符串,然后查看它们是否有效。

您显示了2个不同的URL ...一个带端口号(localhost:4435),另一个不带端口号。

第一个(带端口号)通常由IIS Express或集成的Visual Studio Web服务器(取决于您的项目配置)处理,而第二个URL(无端口)由本地IIS处理。

所以...您肯定有2个不同的问题。

关于您的第一期:

如果您的项目使用的是IIS Express,建议您检查配置和日志文件(查看文件夹%userprofile%\\ documents \\ IISExpress)

第二期:

打开IIS管理器,并确保将“解决方案名称”标记为“应用程序”。

希望能帮助到你。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM