I have an ASP.NET web forms application that requires that requires that a user log in.
I have had the application running on a live server with an IP address pointing at it, to allow external customers to test it. e.g. http://1.2.3.4/application
Last week the customers decided that they were happy to switch their users to my application, and asked us to switch the existing URL across to it e.g. http://www.applicationurl.com
As soon as we did this, the login page stopped working:
– if you log in with an incorrect username or password, it correctly tells you that you have made a mistake
– if you log in with a correct username and password, no error message displays, but instead of redirecting to the next page, the user is redirected back to the login page
Just to be clear, no changes were made to the application – it is still running on the same server with the same config settings. If I log on using either the internal or external IP address then the application works fine – once logged on I am redirected to the default page; it is only when using the external URL that I keep getting redirected back to the login page. The .css and images all load correctly for the login page.
This is .NET 3.5 running on IIS7 on Windows Server 2003.
On consultation with our IT team, I learned that the company that supplies us with DNS names was proxying the calls to our web server. When we switched the domain name to directly calling our IP address, the issue was resolved. I guess the proxy must have been modifying the HTTP calls or blocking cookies or something.
The way to check whether this is happening is to ping your domain – in our case, it was returning the IP address and domain name of our DNS supplier rather than the IP address of our web server.