RE: Url Redirection

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi Nick,

As Marc has suggested, you can try using UrlEncode since that will make
sure the output characters are valid and safe one in http url string.
Generally if you have multiple querystring parameters, it should be
separated via "&" char.

BTW, why are you using querystring to store large data as querystring has
length limitation, is there any paritcular requirement here? You can
provide some further info about the application code logic or requirement
so that we can look for any other potential solutions.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: "Nick" <a@xxxxx>
Subject: Url Redirection
Date: Fri, 25 Jul 2008 16:31:31 +0100


Hi there,

I'm passing an HTML encoded string to an URL in the query parameter.
This query string works perfect in the website if you are already logged
on,
if you are not logged on the application calls
FormsAuthentication.RedirectToLoginPage() then the URL becomes malformed.

I then recieve the following error,

"The return URL specified for request redirection is invalid."

for example

?inputfile=F:%5CFacebook%5CDocuments%5CDocuments%5CUser's%20Guide.doc

then becomes


?ReturnUrl=%2fDSP%2fsecure%2fdefault.aspx%3finputfile%3dF%3a%255CFacebook%25
5CDocuments%255CDocuments%255CUser's%2520Guide.doc&inputfile=F:%5CFacebook%5
CDocuments%5CDocuments%5CUser's%20Guide.doc

Which is rather screwed. Any ideas how how I can work around this?

Thanks a million for your time in advance.

Nick.




.



Relevant Pages

  • Re: asp question about post vars
    ... Consider encrypting the querystring if application requirements force ... Don't use Session. ... //Creating public properties that get private fields ... string lastName = myPage1.lastName; ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: A deployed web aspx page does not display response over the intern
    ... writing exception information to the ... public string shortcode ... string responseString = null; ... NameValueCollection queryString = ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: query string encoding/decoding
    ... I've run a few simple tests looking at how query string encoding/decoding ... than it was in asp... ... encoding as a means of interpreting the input ... you get a collection when referencing the querystring ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: 2 Qs re JS scripting
    ... from another local .js file passing it a string for it to read and display e.g. test.html?this_is/atest so how do I do all of that?! ... You cannot use a querystring in a .htm file, especially one opened from a hard drive without using a web server. ...
    (microsoft.public.scripting.jscript)
  • Re: Aus URL QueryString entfernen
    ... In default.aspx verarbeite ich in Form_Load den QueryString und anschließend ... System.Web.HttpRequest,ByVal, strKeyToDelete as String, ByVal ... httpContext as HttpContext) ... Dim nvc as System.Collections.NameValueCollection = New ...
    (microsoft.public.de.german.entwickler.dotnet.asp)