My ASP.NET MVC site needs to be running in either IIS6 or IIS7, I need to a url with a suffix of ".mvc" when its running in IIS6.
I know I could add an AppSetting but is there away to know if the site is running in IIS6(IIS7 classic mode) or IIS7?
My ASP.NET MVC site needs to be running in either IIS6 or IIS7, I need to a url with a suffix of ".mvc" when its running in IIS6.
I know I could add an AppSetting but is there away to know if the site is running in IIS6(IIS7 classic mode) or IIS7?
You do not need to have an extension for MVC on IIS unless you are using MVC1. MVC2 and up work just fine with extensionless URLs on IIS6.
However, to answer your question, check out this previous question: How to detect IIS version using C#?
You can check the http response header from the client side with a browser developer tool (F12).