I'm currently writing an web app using C# and Asp.Net MVC. Everything works perfectly fine on my local dev machine.
When I put it on the server the styling etc was absolutely fine. However, none of the POST
methods were working.
IIS kept throwing me the following error:
HTTP Error 500.24 - Internal Server Error An Asp.NET setting has been detected that does not apply in Integrated managed pipeline mode
As per suggested I changed to classic mode and tried the
<validation validateIntegratedModeConfiguration="false"/>
in the web.config
file without any luck.
I have a fair few views where I use the code as
@using(Html.BeginForm("Create", "User")){ //form data here }
...
Now when I publish the website under the default website, the url becomes https://abc.domain.com/mywebsite
this is where all of the POST
methods stop working. However, if I publish the website as it's own application so not under the default website then everything works perfectly fine.
Now I can see the reason why the POST
methods can't be found is because it's not root directory anymore.
So my question is, is there an easier way to get around this? because I've currently decide to go down the route of @Url.Action("MyAction", "SomeController")
and submit the form via jQuery
which seems to resolve the issue. However, is there a setting or some sort which I can apply to the entire application rather than keep on having to provide @Url.Action("MyAction", "SomeController")
for each click event.
Edit: Below is the screenshot of the error message I receive