0
votes

We have recently upgraded a web app from .Net 3.5 to .Net 4

This has introduced an issue with the ReturnURL in the querystring when logging in.

Prior to upgrade you could visit http://www.somedomain.com/myweb and on redirection to the login page the address would be this - http://www.somedomain.com/myweb/authenticate.aspx?ReturnUrl=%2fmyweb%2fdefault.aspx

Now after upgrade the address is as above but default.aspx is missing from the ReturnURL parameter.

After logging in you are redirected to a blank page.

The default document in IIS is set as before.

Does anybody have any idea whats causing the document name to be stripped from ReturnURL after upgrade?

1
sounds like the URL is built via code, and there's something missing in the build statement/the URL object used may have changed and you may now have to specify a property to copy the querystring with it... - MaxOvrdrv
Why is /myweb/ returning a blank page? What blank page is it displaying? - James Lawruk
Its not any specific page in the app. Looking at the source this is all thats there... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content="text/html; charset=windows-1252" http-equiv=Content-Type></HEAD> <BODY></BODY></HTML> As far as i can see the issue is that default.aspx is missing from the ReturnURL param. It was all fine before the upgrade. - stu
MaxOvrdrv - i will look into that - stu
MaxOvrdrv I've had a search of the code and we dont build up the URL dynamically. I think this must be happening at the framework level as its only been an issue since changing .net version - stu

1 Answers

0
votes

I've fixed the issue by placing the following code in Global.Application_BeginRequest

If HttpContext.Current.Request.AppRelativeCurrentExecutionFilePath = "~/" Then HttpContext.Current.Response.Redirect("~/default.aspx") End If