简体   繁体   English

VirtualPathProvider在IIS7中不起作用

[英]VirtualPathProvider not working in IIS7

I am working on a VirtualPathProvider application. 我正在使用VirtualPathProvider应用程序。 It works fine in Visual Studio but I get a 404 error when testing in IIS7. 它在Visual Studio中工作正常,但是在IIS7中测试时出现404错误。

I have created a simple website in .Net4 classic mode on http://localhost:101/ and the URL i am accessing to test VirtualPathProvider is http://localhost:101/article 我已经在.Net4经典模式下的http:// localhost:101 /上创建了一个简单的网站,而我用来测试VirtualPathProvider的URL是http:// localhost:101 / article

You can download the code from http://88.208.236.165/HS/HSTest.zip 您可以从http://88.208.236.165/HS/HSTest.zip下载代码

Here are screenshots from the error and running app. 这是错误和正在运行的应用的屏幕截图。

IIS7中的错误

在VS中工作

Under IIS7, maybe you should try to add this to your web.config: 在IIS7下,也许您应该尝试将其添加到web.config中:

 <system.webServer>
   ...
    <modules runAllManagedModulesForAllRequests="true" ... />
   ...
  </system.webServer>

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

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