iis replaces url with strange pattern - asp.net-mvc

i am building a web api and everything works fine on my localhost iis express.
But when i publish my application to my normal iis, the iis replaces a part of the url with a strange pattern that i have never seen before
This leads to an 404 error everytime, cause the IIS replace the link in every browser!
why is that?
IIS Express API Link:
http://intranet-bla/crmServer/crmGet/getSomeThing?id=1978338358
IIS API Link:
http://intranet-bla/crmServer/(S(nsz24dspha255yzcyy2c4eqh))/crmGet/getSomeThing?id=1978338358
EDIT:
The 404 Error was gone after renaming the http-handler, the strange url is still there but isnt a issue anymore

Related

ASP.NET 4.5.1 MVC 5 application not loading in browser. Failed to open http://

Problem
I am using windows authentication with MVC5 ASP.NET application. When I went to the url of the application on my intranet, I typed in (just for example), http://derp.herp.edu. As expected, it
asked me for my login credentials on the domain. I entered these.
I then get a completely blank page. No error message. Just a white screen. I then fired up the debugger in my browser and it simply states:
Failed to open http://derp.herp.edu
Details
I don't even know where to find an error for this? I have no clue to what is causing this. I've been trying to look for logs, but since I am new to IIS7.5 I am not sure I am looking at the right ones.
I just deployed the MVC5 on an IIS7.5 Windows 2008 R2 server. It is my belief that the IIS I am trying to deploy this on is on a secured VLAN.
Attempts
Launched locally on my machine IIS7.5. It works. What the heck?
Moved to wwwroot of the inetpub file to make sure file permissions are okay on server.
Associated the default web site on IIS7.5 to the domain name. I can see it on my local machine and the server in the browser.
Thus, we know the domain name works. We know that authentication is trying to work. But something is going wrong when it tries to display the MVC 5 .NET application.
I figured out the error. It was a completely silent error as the browser was just sitting there not doing anything. I started checking IIS and noticed that .NET compilation had some problems. I found the fix at ASPNET4BreakingChangesAndStuffToBeAwareOf.

MVC Site getting 500 error only on server, how do I get more info on error?

I have an MVC 5 web application that runs perfectly fine in VS when I debug it but the moment I deploy to my IIS server (Windows 2012 R2) I get a 500 internal server error. I have even enabled debug=true in the web.config on the server but get no detailed error. Nothing is showing in the event log I have restarted the web site in IIS and recycled the app pool with no change. What do I have to do to figure out what is not working on the server side?
By default, IIS hides debug information from remote connections. This means you need to log on to the server and browse the site there, or you need to turn off Custom errors in your web.config (change from RemoteOnly to Off).
Many kinds of configuration errors in IIS however, will only show up properly if you browse on the server.
While I did not find exactly what was wrong. I ended up rebuilding my site from the group up and in doing so I did figure out that it was something to do with the web.config but there is so much of the web.config file I left out of the new site I don't know the exact code in it that caused the problem.

IIS 7.5. Can't disable Url Rewriting rules (I deleted rules but they still affect)

I develop ASP.NET MVC 3 application. I've downloaded UrlRewriting module and created some rules for my website locally.
Next i published this website on the Internet to check performance. Thats ok.
Then i continued my work locally again. I commented code block in the web.config file regarding these rules.
So there are no rules in IIS Manager too.
The problem is that rules still affect! For example, i defined "Canonical hostname rule" to redirect browser to "www.*" site name. So this rule still affect, i.e. local IIS server redirect my locally running website to the real one on the Internet.
Also i installed IIS Express to try it out too. Result is the same.
I cant figure it out where the problem is.
So, there are no rewrite rules on IIS server and IIS Express, but they still affect.
Late answer is late. Most likely the redirect was "permanent" so a 301, then it will be cached in the browsers. If you want it to be temporary redirect with code 307.
The URL Rewrite module seams to my a little buggy when the configuration changes becouse the loaded configuration doesn't refreshed until the IIS isn't restarted.

MVC site deployed to IIS 7 Homepage work All other page 404

I'm trying to deploy a MVC 3 site to IIS 7.5. The deafult route works but all links return a 404 error including if I manually enter the link for the homepage.
Details:
MVC 3 to IIS 7.5
Windows Server 2008 R2
MVC 3 is installed on server
Default Web Site/PaedPhysiotherapy_Uat
.net 4 is installed
DeafultApplicationPool used
App pool is .net4 and running in integrated mode
Custom error are turned off
If I deploy to a new website on the same IIS box using different ports, e.g. "http://newsite:81 which not under the default website everything works fine.
Even in the absence of routing, IIS will redirect requests for "/" to "/Default.aspx". In an MVC app, there's a Default.aspx which manually finds the MVC handler and invokes it. So that's probably why your home link works.
Your other pages must go through routing. In integrated mode there must be an IIS handler for this. Check the ExtensionlessUrlHandler in the IIS handler mappings. Compare that and other handlers with the sites which work.
At a guess, if this works when deploying to the root of a site then it looks like an absolute path has sneaked in. Perhaps somewhere this is a missing ~ in front of a path e.g.
/MyController
instead of
~/MyController
Also, you did remember to convert /PaedPhysiotherapy_Uat to an application?

Asp.Net-MVC application dying

I have a strange issue with an Asp.NET MVC application.
Using Asp.NET MVC 3 Preview 1 on IIS 7.5 - Integrated
After building the application everything runs fine. Then after some random amount of time (or sometimes after updating a view or js file) the application dies.
Meaning, requesting the root page, I get the 403 error and requesting any other page I get a 404 error.
After a rebuild everything works fine again for a little while until it dies again.
I am seeing this on two different development machines. Also, I have another application which is very similar (MVC 3, IIS etc) on both dev machines and this one runs without problem. I have inspected the config files in detail and cannot see anything of notable difference.
Does anyone know what could cause an application to die or where to look for further information? (I can still access elmah.axd though no information is there).
There's not much to go on here, but the 403 and 404 are clues that at least ASP.NET routing is not working; 403 is coming back because the web server thinks you want to do a directory browse, 404 because your request doesn't have a valid corresponding resource.
Since you are using the new version of MVC, I would suspect the issue may lye there. When you get the error condition, can you browse to a regular .aspx page? Does it execute server side code correctly?
You have the site hosted in IIS 7.5, not just the built in Visual Studio web server, right? Is it possible to turn on monitoring/event logging to see if IIS is taking a hit?
I apologize for not having any actual answer, sounds like you have a tough issue to debug.
Good Luck!

Resources