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.

Internet Information Services
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,567 questions
{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