【发布时间】:2014-10-29 22:36:27
【问题描述】:
我需要帮助来重新创建一个 Web 解决方案文件(至少我认为这是我需要的)。我从另一位离开我们公司的开发人员那里继承了一个 Web 应用程序。它是在 Visual Studio 2010 中创建的,使用 ASP.Net 2.0。没有解决方案文件,所以我创建了一个 Web 应用程序项目并将所有文件夹和文件手动添加到我的新解决方案中。我没有对 Web 应用程序中的任何文件进行任何更改。
当我在 Visual Studio 中运行应用程序时,它会正常启动到默认页面,但是当我单击同一页面上的链接时,我会得到:
Server Error in '/' Application. The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested URL: /SomeCompany/startProject.aspx Version Information: Microsoft .NET Framework Version:2.0.50727.8009; ASP.NET Version:2.0.50727.8008
我原来的起始位置:http://mylocalurl:65212/default.aspx
默认页面链接:http://mylocalurl:65212/SomeCompany/startProject.aspx
如果点击链接后得到错误页面,我可以删除“/SomeCompany/”,成功进入该页面。但是我已经看到以前的开发人员在 Visual Studio 中运行它并单击完全相同的链接没有问题。
我需要它在 url 中有 /SomeCompany/ 并像以前的开发人员一样工作,以便我可以根据需要维护和调试它。我在重新创建解决方案时做错了什么......还是我没有想到的另一个设置问题?
【问题讨论】:
-
Web.config,URL 重写。 IIS 设置?
-
我检查了 web.config 并且没有 url 重写。它是从 Visual Studio 运行的,使用文件系统,所以那里不应该有任何 IIS 设置?
标签: asp.net visual-studio-2010 visual-studio