[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Reponse.Redirect issue

Posted on 2014-07-11
10
Medium Priority
?
125 Views
Last Modified: 2014-07-30
Hi Experts -

I have two issues today that have to do with response.redirect.  Here my block of code:

Code
I have a repeater on my page that propagates several linkbuttons.  When a link is click is passes a CommandArgument that I use to generate a URL.  That URL is used to redirect the user based on his/her selection.

Now when I run this code in Chrome and FireFox it works.  I click on a link, the code executes, I get redirected to the page I selected.

However this code does not work in IE (ver 11) for some reason?  Any thoughts?

2.)  When I click the Linkbutton (in the two working browsers) and the user is redirected, the URL looks like this:

http://app.website.com/?username=jsmith&GUID=daedbe63-8318-49e6-adaa-73376206d774

The page will open but there is a forward slash between the com and the question mark ( com/?)  I can't figure out why that slash is there.

Here's my code for created the URL

Public Sub CreateRedirect(ByVal AppURL As String)

        Dim strURL As String = "http://" & AppURL & "?username=" & strUsername & "&GUID=" & strGUID

        Response.Redirect(strURL)
    End Sub

Open in new window


I should note that the URL being passed to the above subroutine does NOT have that slash.  For some reason it's being added.

Any help would be greatly appreciated.  Thanks!
0
Comment
Question by:cdemott33
  • 6
  • 4
10 Comments
 
LVL 21

Expert Comment

by:Randy Poole
ID: 40191308
Which version of IIS are you using and also which version of .NET?
0
 

Author Comment

by:cdemott33
ID: 40191316
It's a Windows 2003 server (IIS 6).  The app is pointing to .NET 3.5
0
 
LVL 21

Expert Comment

by:Randy Poole
ID: 40191322
In version 9 of IE Microsoft changed the way it sends data on a button to include not only the x,y but also x.xx,y.xx due to touch screens and better accuracy.  Unfortunately the change is only reflected in .NET 4.x which causes pages using 3.5 to have this issue.  You can force people using IE 9+ to emulate IE8 by adding the following to your web.config file in your <system.webServer> node
		<httpProtocol>
			<customHeaders>
				<clear />
				<add name="X-UA-Compatible" value="IE=EmulateIE8" />
			</customHeaders>
		</httpProtocol>

Open in new window

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:cdemott33
ID: 40191346
Unfortunately that doesn't seam to help.  The buttons in IE still do not work.   They continue to work in Chrome and Firefox.  Any other suggestions?
0
 
LVL 21

Expert Comment

by:Randy Poole
ID: 40191352
If you open up the developer box in IE, what script errors are you seeing?
0
 

Author Comment

by:cdemott33
ID: 40191364
I think THIS might be the problem.  Looks like I'm going to have to update my .NET version.  What do you think?

http://www.hanselman.com/blog/BugAndFixASPNETFailsToDetectIE10CausingDoPostBackIsUndefinedJavaScriptErrorOrMaintainFF5ScrollbarPosition.aspx
0
 
LVL 21

Expert Comment

by:Randy Poole
ID: 40191366
Forgot about that one, that could be it as well.
0
 

Author Comment

by:cdemott33
ID: 40191388
Any thoughts about the com/? issue?  It automatically adds the forward slash even thought I'm constructing the URL and saving it to a string variable.  

Public Sub CreateRedirect(ByVal AppURL As String)

        Dim strURL As String = "http://" & AppURL & "?username=" & strUsername & "&GUID=" & strGUID

        Response.Redirect(strURL)
    End Sub

Open in new window

0
 
LVL 21

Expert Comment

by:Randy Poole
ID: 40191394
would need to know what is being passed as the AppURL string
0
 
LVL 21

Accepted Solution

by:
Randy Poole earned 2000 total points
ID: 40191400
my guess is Appurl contains an ending /
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question