简体   繁体   English

Visual Studio 2013-IIS Express不提供aspx文件

[英]Visual Studio 2013 - IIS Express not serving aspx files

I was compelled by work to upgrade from Visual Studio 2010 to Visual Studio 2013. In VS 2010, I used the built-in host for viewing .net apps locally and everything worked just fine. 我被迫从Visual Studio 2010升级到Visual Studio 2013的工作。在VS 2010中,我使用内置主机在本地查看.net应用程序,并且一切正常。 Visual Studio 2013 dropped support for the built-in host and compels everyone to use IIS Express. Visual Studio 2013放弃了对内置主机的支持,并迫使每个人都使用IIS Express。

My trouble is that IIS Express won't serve up "[anything].aspx" no matter where in the folder tree of the project it resides. 我的麻烦是,无论IIS Express在项目的文件夹树中的任何位置,它都不会提供“ [anything] .aspx”。 I created two test files in the root of the project: HelloWorld.html and HelloWorld.aspx (c#) and made both to simply show a page saying "Hi" with the asp.net file showing the current date and time. 我在项目的根目录中创建了两个测试文件:HelloWorld.html和HelloWorld.aspx(c#),并做了两个测试文件,以简单地显示一个说“ Hi”的页面,而asp.net文件显示了当前日期和时间。 I then copied these two test files into an arbitrary folder in the project. 然后,我将这两个测试文件复制到项目中的任意文件夹中。 After building the project (unnecessary, I know), I did a "View in Browser" for all test files. 构建项目后(我知道这是不必要的),我对所有测试文件进行了“在浏览器中查看”。 In all cases, the HTML files displayed properly. 在所有情况下,HTML文件均可正确显示。 The aspx files cause a "HTTP 400 Bad Request" / "The webpage cannot be found" error. aspx文件导致“ HTTP 400错误请求” /“找不到网页”错误。

I've prowled Stack Overflow and Google and read about some near-misses but ultimately came up empty for this specific problem. 我曾对Stack Overflow和Google进行过调查,并了解了一些险恶的情况,但最终由于这个特定问题而变得空白。 I'm hoping this is a simple configuration issue, but the answer so far eludes me. 我希望这是一个简单的配置问题,但是到目前为止,答案还不明确。 Thanks in advance for your kind assistance! 在此先感谢您的协助!

Edit: 编辑:

Thanks to Lex Li's suggestion of using the Jexus Manager to see what's going on with the IIS Express configuration, it shows that zero apps are assigned to any of the default application pools. 感谢Lex Li建议使用Jexus Manager查看IIS Express配置的最新情况,它表明将零个应用程序分配给任何默认应用程序池。 Correspondingly, when clicking on the home of the website in the Jexus Manager, the .Net section of the website is absent. 相应地,当在Jexus Manager中单击网站主页时,网站的.Net部分不存在。

Edit #2: 编辑#2:

The web app is assigned to one of the default IIS Express app pools: Clr4ClassicAppPool. 该Web应用程序分配给默认的IIS Express应用程序池之一:Clr4ClassicAppPool。

听起来很奇怪,您是否尝试打开iis express xml applicationhost.config并检查其中的mime类型或应用程序池设置?

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

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