Setting up virtual directory when using IIS for ASP.NET MVC debugging -
I am trying to use IIS to debug asp.net MVC in Visual Studio. The problem is that if I choose "Use Local IIS Web Server" in Visual Studio, then I have to choose Virtual Directory
This is a problem because ASP.NET is considered to run MVC application From the root directory and MVC will parse "myapp" as the controller, and when I run the app from Visual Studio / IIS, later requests will also be directed to the root.
How to solve this problem? Is there any way to use the IIS website root instead of the virtual directory for Visual Studio debugging?
Use the IIS manager to set the home directory for the website on the path of your application.
Then make the appropriate changes in the "Web" tab of your project settings for MVC in Visual Studio.
It is assuming that you already have the windows file permission setup for IIS is correct.
Comments
Post a Comment