URL rewriting rule does not work in Visual Studio Development Server

How can I eliminate URL rewriting rules that do not work in my Visual Studio 2010 development environment?

I am improving an existing ASP.NET application.

My problem is the URL rewrite rules written in the web.config file do not work in my Visual Studio 2010 development environment. It only works after deploying the project in IIS.

I need to debug the project, as I am not familiar with its design and development. This is too big a project.

If dubbing will not work on Visual Studio Development Server, is there a workaround? I really need to work on a project in debug mode. Every time it leads me to a custom error page.

+4
source share
3 answers

You can always debug your local IIS. There are 3 approaches:

  • You should be able to do this without a problem if your project is configured to deploy to a local IIS web server - just press F5. Then it must be installed.
  • After deployment, go to the local site and attach it to the running site using "Debug, Attach to Process, w3wp.exe".
  • Add System.Diagnostics.Debugger.Break() to the line where you want to break your code, expand it in IIS and run it. The "start debugging" dialog should appear when a line is hit.
+2
source

Rewrite URL does not work on the embedded web server used by Visual Studio. The good news is that you can easily debug your site using a local IIS installation. For more information on how to do this, see the following blog post:

http://weblogs.asp.net/scottgu/archive/2010/06/28/introducing-iis-express.aspx

I highly recommend switching to the IIS Express route (a quick web search will take you to the download page), which Scott recommends. I tried to configure VS to use my local IIS 7 and struggled with it. When I tried the IIS Express route, I worked and worked in minutes, since the Rewrite URL worked fine in my development environment - there is no need to manually connect to anything. After installing IIS Express, I just needed to go into the site properties β†’ "Web" - the heading "Servers" β†’ select "Use local IIS web server" and check the box "Use IIS Express".

+1
source

If you are building an IIS website on your local machine, rewrite it. If you do not have IIS, I think you can download it using the MS Web Platform Installer.

I'm not sure if a debugger will work in this situation, but at least you don't need to deploy to a remote computer to check your changes.

0
source

All Articles