0

I have an ASP.NET MVC web app running on IIS on port 31503, and it runs just fine. I have a different fork of the same codebase also set up in IIS; I tried several ports including 31503, and this fork does not run; I get a 404 error. Is there some configuration setting I need to set to enable the latter app to run on IIS? I can run it in the debugger in Visual Studio, but I'd rather run it in IIS so I don't have to go starting and stopping the debugger every time I want to run it; I can just bring it up in a browser and attach the debugger as needed.

ekolis
  • 6,270
  • 12
  • 50
  • 101
  • Make sure you set the right binding, https://docs.jexusmanager.com/tutorials/binding-diagnostics.html Or easily IIS routes the requests to another site and 404 can come. – Lex Li Sep 25 '19 at 16:25

1 Answers1

0

try to add this code in web.config file:

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

Make sure that your application is running under ASP.Net 4.0 integrated pipeline mode. If not, then set application pool to integrated pipeline mode and recycle it once.

check below iis setting: IIS site→ request Filtering → Filename Extensions Tab → Edit Feature Settings → Allow unlisted file name extensions is checked.

Jalpa Panchal
  • 8,251
  • 1
  • 11
  • 26
  • Hmm, I'd rather not modify the web.config; I'd be sure to be questioned about why I did that! Thanks, though! – ekolis Sep 26 '19 at 18:43
  • to enable all managed modules to run for all requests without configuring each module entry to remove the "managedHandler" precondition, use the runAllManagedModulesForAllRequests property in the section. you could refer this [link](https://stackoverflow.com/a/11049011) for more detail. – Jalpa Panchal Sep 30 '19 at 05:21