Ignore folder in ASP .NET MVC

后端 未结 2 377
无人共我
无人共我 2021-01-12 07:09

I have an existing ASP .NET MVC application and I would like to ignore a specific folder within it (where I intend to put PHP scripts).

I have tried adding an ignore

相关标签:
2条回答
  • 2021-01-12 07:57

    for those on IIS7+ who keep struggling with this issue even with the suggested solution: you also need to wrap system.webServer tag:

    <location path="." inheritInChildApplications="false">
      <system.web>
        <!-- ... -->
      </system.web>
    </location>
    
    <location path="." inheritInChildApplications="false">
      <system.webServer>
        <!-- ... -->
      </system.webServer>
    </location>
    

    Thanks to http://runtingsproper.blogspot.ca/2010/04/solved-breaking-parent-webconfig.html

    0 讨论(0)
  • 2021-01-12 08:06

    The IgnoreRoute you have provided looks fine. I tested it with Phil Haack's Route Debugger found here It's probably a typo, but did you add this to global.aspx.cs or global.asax.cs

    0 讨论(0)
提交回复
热议问题