Why does asp.net Response.redirect() work in Visual Studio Debug but fails on the Production IIS server. IIS setting maybe?

mike murray 0 Reputation points
2023-02-24T22:15:40.0766667+00:00

I have a an IIS website that has been running since 2015.

But in recent times the QA team have spotted that a Gridview link doesn't redirect to a new page anymore using Response.redirect(). The Response.Redirect() is on the server.

I checked it in Debug mode in the Visual Studio environment and it redirects perfectly using LocalHost on the VS built in Web client.

The only things different between the two environments are

1: It's in debug mode on my development machine.

2: The Production Server is using IIS and my debug environment is using the built in web client.

Windows development | Internet Information Services
Developer technologies | Visual Studio | Other
{count} votes

1 answer

Sort by: Most helpful
  1. mike murray 0 Reputation points
    2023-02-28T17:15:14.96+00:00

    Thanks for the suggestions but I found the answer.

    The Web Pool for the application was changed from Classic to Integrated.

    Why would this happen?

    This literally stops the Response.Redirect() from redirecting.

    Switch back to Classic it redirects again. Switch to integrated and it stops working again.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.