Click here to Skip to main content
14,838,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I got multiple WAP with an ASP MVC 3 project set as starting project.

Whenever i am debugging my Aplication,
after execution of "Application_Start()" Event inside Globals.asax
I am getting
HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Module IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
Requested URL https://localhost:443/XYZAuthentication/?wa=wsignin1.0&wtrealm=https%3a%2f%2flocalhost%2fXYZPortal%2fHome%2f&wctx=rm%3d0%26id%3dpassive%26ru%3d%252f&wct=2015-03-16T09%3a16%3a23Z
Physical Path C:\inetpub\wwwroot\XYZAuthentication\
Logon Method Anonymous
Logon User Anonymous
Updated 15-Mar-15 23:56pm

1 solution

Now let me tell you the possible factors that cause this 404 in ASP.NET applications. The first one is pretty much simple and easy to understand, the file or directory does not exist on your server. I don't think this one needs any more clarification.

Secondly, since you're talking about ASP.NET MVC, you should make sure that Url Routing is also enabled. Url routing lets you create logical mapping with some controllers on your website, to allow custom URLs; the URLs that do not map to an absolute path on your server. So, either change the URL you're trying to use, or create a new Controller and name it as XYZAuthentication. Inside your RoutineConfig file, register this routine,

   name: "XYZAuthentication Route",
   url: "{controller}/{action}",
   new { controller: "XYZAuthentication", action: "register"}

// Provided that you're having an action register

This way, you can map your URL to an actual Controller and an Action in your ASP.NET MVC application. Now it won't throw 404, instead it would load the resources (probably the data inside your Action function) inside your View. For more on ASP.NET's MVC framework, please read this article[^] of mine.
scud.corsair 19-Mar-15 2:25am
Hi Afzal,
I solved the issue by setting 'runallmanagedmodulesforallrequests="true"'

But again I dont know why it worked.

Thanks in advance mate.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900