Link to home
Start Free TrialLog in
Avatar of Ruwenzori Warrior
Ruwenzori Warrior

asked on

IIS 8.5 MVC site giving 404.15

I have developed an MVC web app using .Net Framework 4.5, in VS 2015. We use ancient technology, we communicate by smoke signals, instead of phone lines, its just the way governments work.


Anyways, when I publish my site to the prod server, remember, we only have one environment, and if it goes does, then, it just gets restored. I get a 404.15, there are the steps I have taken to resolve the issue:


1. Check for multiple web.config files.
2. Remove any authorize annotations within a class that has the allowanonymous annotation on it.


I am publishing via a File System, it is a folder on the server, then, convert the folder to an application (by right clicking the folder and choosing convert to application).


The way the server is set up, we have one site, and there are tons of folders under that parent site, where we push code out to, this is how it was set up when I stared working here. 


I also, do not have admin rights to publish the site straight to IIS

User generated image.

Server folders:



User generated image
The web.config contains the following :


<system.web>

    <authentication mode="None" />

    <compilation targetFramework="4.5" />

    <httpRuntime targetFramework="4.5" maxQueryStringLength="32768" maxUrlLength="65536" />

  </system.web>

  <system.webServer>

    <modules>

      <remove name="FormsAuthentication" />

    </modules>

   <security>

     <requestFiltering>

       <requestLimits maxQueryString="3000" maxUrl="1000" />

     </requestFiltering>

   </security>   

  </system.webServer>

Avatar of Paul MacDonald
Paul MacDonald
Flag of United States of America image

That query string is the path the visitor has followed through the site?  Or is there some sort of loop in your code?  I've never seen anything quite like it.

How about matching the maxQueryString and maxURL values?:

<system.web>

    <authentication mode="None" />

    <compilation targetFramework="4.5" />

    <httpRuntime targetFramework="4.5" maxQueryStringLength="32768" maxUrlLength="65536" />

  </system.web>

  <system.webServer>

    <modules>

      <remove name="FormsAuthentication" />

    </modules>

   <security>

     <requestFiltering>

       <requestLimits maxQueryString="32768" maxUrl="65536" />

     </requestFiltering>

   </security>   

  </system.webServer>

Avatar of Ruwenzori Warrior
Ruwenzori Warrior

ASKER

I modified the values in my web.config to what you have, still did not work, same error.

There is not loop in the code, the visitor is redirected to an action in a different controller when they arrive at the home page:

User generated image


Try again, but this time remove the line that reads...

      <remove name="FormsAuthentication" />

...and see if that helps.  

What authentication is required to reach this area, anyway?  Is there at least one authentication type in use?

Tried, still doing the same thing, it seems like it is continuously re-directing to the Index action in the Home Controller.


I have Anonymous Authentication Enabled, and disabled Windows Authentication (not sure if this answers your question).


"it seems like it is continuously re-directing to the Index action in the Home Controller."

This is what I was thinking.  I think it's in a loop, and the querystring fills up until it exceeds it's limit, then returns the 404,15.


If you can walk through the code in an IDE you might find what's causing the loop.


I would undo the other changes I suggested, too.

Narrowed it down to this piece of code for authentication from cookie:

User generated image


ASKER CERTIFIED SOLUTION
Avatar of Ruwenzori Warrior
Ruwenzori Warrior

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial