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
.
Server folders:
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>
ASKER
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?
ASKER
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.
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>