Re: Url Redirection
- From: "Nick" <a@xxxxx>
- Date: Wed, 6 Aug 2008 14:27:07 +0100
Hi Steven,
Indeed, it's part of an unmanaged addin for another application and
invoking via the shell is the most efficient way of achieving the desired
result as the browser will need to be opened if it isn't already.
I don't seem to have any control over this as it's all handled
internally and controlled via the web.config file afaik. So here is my
current thoughts...
1. The URL is created and escaped correctly.
2. The URL works on the site if logged in already
3. If not logged in ASP.NET screws with the URL and makes it invalid
then kicks you back to the login page.
So using my advanced powers of deduction. asp.net is screwing with my
query string and making it unusable? Therefore I can't see how this can be
worked around unless I can modify the query string during this process but
unfortunately none of my code is hit in page load for me to be able to. Or
am I able to perform the bounce manually somehow?
Thanks for your time again!
Nick.
"Steven Cheng [MSFT]" <stcheng@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:iAwWocd9IHA.1624@xxxxxxxxxxxxxxxxxxxxxxxxx
Thanks for the reply Nick,
I haven't expected that the client code is for unmanaged cpp. Have you
tried some .NET based webrequest or webbrowser control based code to see
whether it can repro the same behavior?
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: Re: Url Redirection
Date: Thu, 31 Jul 2008 09:21:23 +0100
the
Hi Steven,
Sure no probs, the code that I'm using to create the URL is,
----
HRESULT hr;
TCHAR* pChrFileName = pStrFileName.GetBuffer();
DWORD pDWdSize = INTERNET_MAX_URL_LENGTH;
TCHAR* pChrEncoded = (TCHAR*)calloc(pDWdSize, sizeof(TCHAR));
ZeroMemory(pChrEncoded, pDWdSize);
UrlEscape(pChrFileName, pChrEncoded, &pDWdSize, NULL);
pStrFileName.ReleaseBuffer(0);
CString pStrEncoded = pChrEncoded;
free(pChrEncoded);
CString pStrURL = _T("http://www.myurl.com/default.aspx?inputfile=");
pStrURL += pStrEncoded;
CString pStrParams = _T("url.dll,FileProtocolHandler ");
pStrParams += pStrURL;
----
pStrParams is then fired off to ShellExecuteEx which correctly opens
URL in the default web browser.Please
Nick.
"Steven Cheng [MSFT]" <stcheng@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:w%23K$EGu8IHA.4376@xxxxxxxxxxxxxxxxxxxxxxxxx
Thanks for the followup Nick,
Would you post some of your page's code such as how to concatenate the
querystring (just the code snippet that is sufficient to repro the
behavior)? I'd like to have a test on my side.
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.
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notiffeel 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
viaications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
From: "Nick" <a@xxxxx><Qm#SNsG8IHA.3236@xxxxxxxxxxxxxxxxxxxxxx>
References: <etPCCum7IHA.1420@xxxxxxxxxxxxxxxxxxxx>
Subject: Re: Url Redirection
Date: Wed, 30 Jul 2008 13:53:40 +0100
Hi Steven,
I wouldn't say that a 256 character max path is too long for an URL
surely?
It needs to be invoked this way unfortunately as it's being called
an add-in for another application.badly
I got the name of the method I am using incorrectly, it is
UrlEncode,
http://msdn.microsoft.com/en-us/library/bb773774(VS.85).aspx
Basically what is happening is the query is being re-escaped when
the
server bounces it so it's escaping the escape characters.
Surely if the URL is working before being bounced, then it is not
formed?
Nick.
"Stev
.
- Follow-Ups:
- Re: Url Redirection
- From: Steven Cheng [MSFT]
- Re: Url Redirection
- References:
- Re: Url Redirection
- From: Steven Cheng [MSFT]
- Re: Url Redirection
- Prev by Date: Re: display an alert only once
- Next by Date: URL Re-write question
- Previous by thread: Re: Url Redirection
- Next by thread: Re: Url Redirection
- Index(es):
Relevant Pages
|
Loading