Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Response.Redirect Custom Protocol, not http

Reply
Thread Tools

Response.Redirect Custom Protocol, not http

 
 
Nick
Guest
Posts: n/a
 
      09-11-2008
Hi there,

I would like to perform something like the following from my vb.net web
service, being invoked via HTTP Post

Call HttpContext.Current.Response.Redirect("myprotocol://myurl")

Unfortunately I do not seem to be able to redirect to a custom protocol
url, any ideas why? Basically I'm trying to implement this functionality so
no coding need take place to get the redirection from the consuming web
page.

Cheers for any advice.

Nick.


 
Reply With Quote
 
 
 
 
Anthony Jones
Guest
Posts: n/a
 
      09-11-2008
"Nick" <(E-Mail Removed)> wrote in message
news:%23Iv54b$(E-Mail Removed)...
> Hi there,
>
> I would like to perform something like the following from my vb.net web
> service, being invoked via HTTP Post
>
> Call HttpContext.Current.Response.Redirect("myprotocol://myurl")
>
> Unfortunately I do not seem to be able to redirect to a custom protocol
> url, any ideas why? Basically I'm trying to implement this functionality
> so no coding need take place to get the redirection from the consuming web
> page.


Redirect is a function of the HTTP protocol. Redirections are usually
handled silently within the HTTP stack on the client so I doubt such a
redirection can work without its co-operation. Do have reason to believe
that it ought to work?


--
Anthony Jones - MVP ASP/ASP.NET

 
Reply With Quote
 
 
 
 
George
Guest
Posts: n/a
 
      09-11-2008
I do not see why it should not work...
You need to be more verbose.
When you saying that you "not seem to be able to redirect to a custom
protocol" what exactly do you mean?
Do you know where problem is.
It might be in a browser when browser simply does not understand
myprotocol://myurl or it might be in a ASP.NET if Response.Redirect tries to
analyze the URL before sending to the browser

Install tool from Microsoft called http://www.fiddlertool.com/fiddler/ it
will help you see what browser is getting from the server.

George.







"Nick" <(E-Mail Removed)> wrote in message
news:%23Iv54b$(E-Mail Removed)...
> Hi there,
>
> I would like to perform something like the following from my vb.net web
> service, being invoked via HTTP Post
>
> Call HttpContext.Current.Response.Redirect("myprotocol://myurl")
>
> Unfortunately I do not seem to be able to redirect to a custom protocol
> url, any ideas why? Basically I'm trying to implement this functionality
> so no coding need take place to get the redirection from the consuming web
> page.
>
> Cheers for any advice.
>
> Nick.
>


 
Reply With Quote
 
Nick
Guest
Posts: n/a
 
      09-11-2008
Hi Anthony,

> Redirect is a function of the HTTP protocol. Redirections are usually
> handled silently within the HTTP stack on the client so I doubt such a
> redirection can work without its co-operation. Do have reason to believe
> that it ought to work?


Okay I thought that the browser itself handled the redirection so I guess
that makes sense.

"Do have reason to believe that it ought to work?"

Uhhh clearly, otherwise why would I have tried it?

Nick.


 
Reply With Quote
 
Nick
Guest
Posts: n/a
 
      09-11-2008
Hi George,

Cheers, I wasn't aware of that application, I shall take a look at it,
thanks for your help, I'll see what I can find.

Nick.

"George" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I do not see why it should not work...
> You need to be more verbose.
> When you saying that you "not seem to be able to redirect to a custom
> protocol" what exactly do you mean?
> Do you know where problem is.
> It might be in a browser when browser simply does not understand
> myprotocol://myurl or it might be in a ASP.NET if Response.Redirect tries
> to analyze the URL before sending to the browser
>
> Install tool from Microsoft called http://www.fiddlertool.com/fiddler/ it
> will help you see what browser is getting from the server.
>
> George.
>
>
>
>
>
>
>
> "Nick" <(E-Mail Removed)> wrote in message
> news:%23Iv54b$(E-Mail Removed)...
>> Hi there,
>>
>> I would like to perform something like the following from my vb.net web
>> service, being invoked via HTTP Post
>>
>> Call HttpContext.Current.Response.Redirect("myprotocol://myurl")
>>
>> Unfortunately I do not seem to be able to redirect to a custom protocol
>> url, any ideas why? Basically I'm trying to implement this functionality
>> so no coding need take place to get the redirection from the consuming
>> web page.
>>
>> Cheers for any advice.
>>
>> Nick.
>>

>



 
Reply With Quote
 
George
Guest
Posts: n/a
 
      09-11-2008
You welcome,

Just a tip from me...
2 tools i can not do web development without.

1. Fiddler (Best to work with IE).
2. FireBug - plug-in for Firefox. Best to analyse Javascript errors, DHTML
layout...Highly recomended.

PS: There is IE Development Toolbar which is simmilar to FireBug but has
very reduced functionality. Still good since it works in IE and FireBug only
for FireFox.

George.




"Nick" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi George,
>
> Cheers, I wasn't aware of that application, I shall take a look at it,
> thanks for your help, I'll see what I can find.
>
> Nick.
>
> "George" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>I do not see why it should not work...
>> You need to be more verbose.
>> When you saying that you "not seem to be able to redirect to a custom
>> protocol" what exactly do you mean?
>> Do you know where problem is.
>> It might be in a browser when browser simply does not understand
>> myprotocol://myurl or it might be in a ASP.NET if Response.Redirect tries
>> to analyze the URL before sending to the browser
>>
>> Install tool from Microsoft called http://www.fiddlertool.com/fiddler/ it
>> will help you see what browser is getting from the server.
>>
>> George.
>>
>>
>>
>>
>>
>>
>>
>> "Nick" <(E-Mail Removed)> wrote in message
>> news:%23Iv54b$(E-Mail Removed)...
>>> Hi there,
>>>
>>> I would like to perform something like the following from my vb.net web
>>> service, being invoked via HTTP Post
>>>
>>> Call HttpContext.Current.Response.Redirect("myprotocol://myurl")
>>>
>>> Unfortunately I do not seem to be able to redirect to a custom protocol
>>> url, any ideas why? Basically I'm trying to implement this
>>> functionality so no coding need take place to get the redirection from
>>> the consuming web page.
>>>
>>> Cheers for any advice.
>>>
>>> Nick.
>>>

>>

>
>


 
Reply With Quote
 
Anthony Jones
Guest
Posts: n/a
 
      09-11-2008
"George" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> You welcome,
>
> Just a tip from me...
> 2 tools i can not do web development without.
>
> 1. Fiddler (Best to work with IE).


Works well enough with with FF as well, you just need to configure FF proxy
settings manually.

> 2. FireBug - plug-in for Firefox. Best to analyse Javascript errors, DHTML
> layout...Highly recomended.
>
> PS: There is IE Development Toolbar which is simmilar to FireBug but has
> very reduced functionality. Still good since it works in IE and FireBug
> only for FireFox.
>


Of course with Visual studio present the Development toolbar does all it
needs to. FireBug is buggy when it comes to debugging script but quite
usuable.


--
Anthony Jones - MVP ASP/ASP.NET

 
Reply With Quote
 
John Saunders
Guest
Posts: n/a
 
      09-11-2008
"Nick" <(E-Mail Removed)> wrote in message
news:#Iv54b$(E-Mail Removed)...
> Hi there,
>
> I would like to perform something like the following from my vb.net web
> service, being invoked via HTTP Post
>
> Call HttpContext.Current.Response.Redirect("myprotocol://myurl")
>
> Unfortunately I do not seem to be able to redirect to a custom protocol
> url, any ideas why? Basically I'm trying to implement this functionality
> so no coding need take place to get the redirection from the consuming web
> page.


Are you consuming the web service from client-side JavaScript? Also, does
the client know about your custom protocol?

--
John Saunders | MVP - Connected System Developer

 
Reply With Quote
 
Nick
Guest
Posts: n/a
 
      09-17-2008
Hi George,

I've run fiddler and it looks like response.redirect is returning the
correct information,

-------
HTTP/1.1 302 Found
Cache-Control: private, max-age=0
Location: myprotocol://foobar/?param=hello
Server: Microsoft-IIS/7.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Wed, 17 Sep 2008 13:21:24 GMT
Content-Length: 178

<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a
href="myprotocol://foobar/?param=hello">here</a>.</h2>
</body></html>
--------

So I'm guessing as Anthony has suggested that it's all handled in the
HTTP stack so therefore won't work. It's a bit frustrating really as it
means I have no chance of making a "codeless" sample. But I guess 3 lines
doesn't hurt too much.

Nick.

"George" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> You welcome,
>
> Just a tip from me...
> 2 tools i can not do web development without.
>
> 1. Fiddler (Best to work with IE).
> 2. FireBug - plug-in for Firefox. Best to analyse Javascript errors, DHTML
> layout...Highly recomended.
>
> PS: There is IE Development Toolbar which is simmilar to FireBug but has
> very reduced functionality. Still good since it works in IE and FireBug
> only for FireFox.
>
> George.
>
>
>
>
> "Nick" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Hi George,
>>
>> Cheers, I wasn't aware of that application, I shall take a look at it,
>> thanks for your help, I'll see what I can find.
>>
>> Nick.
>>
>> "George" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>>I do not see why it should not work...
>>> You need to be more verbose.
>>> When you saying that you "not seem to be able to redirect to a custom
>>> protocol" what exactly do you mean?
>>> Do you know where problem is.
>>> It might be in a browser when browser simply does not understand
>>> myprotocol://myurl or it might be in a ASP.NET if Response.Redirect
>>> tries to analyze the URL before sending to the browser
>>>
>>> Install tool from Microsoft called http://www.fiddlertool.com/fiddler/
>>> it will help you see what browser is getting from the server.
>>>
>>> George.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> "Nick" <(E-Mail Removed)> wrote in message
>>> news:%23Iv54b$(E-Mail Removed)...
>>>> Hi there,
>>>>
>>>> I would like to perform something like the following from my vb.net
>>>> web service, being invoked via HTTP Post
>>>>
>>>> Call HttpContext.Current.Response.Redirect("myprotocol://myurl")
>>>>
>>>> Unfortunately I do not seem to be able to redirect to a custom
>>>> protocol url, any ideas why? Basically I'm trying to implement this
>>>> functionality so no coding need take place to get the redirection from
>>>> the consuming web page.
>>>>
>>>> Cheers for any advice.
>>>>
>>>> Nick.
>>>>
>>>

>>
>>

>



 
Reply With Quote
 
George
Guest
Posts: n/a
 
      09-17-2008
Yea, seems to me the problem is on a client.
Although you probably can "cheat" the browser.
Return an HTML page that has javascript.
window.location="myprotocol://foobar/?param=hello";

It might work...

George.


"Nick" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi George,
>
> I've run fiddler and it looks like response.redirect is returning the
> correct information,
>
> -------
> HTTP/1.1 302 Found
> Cache-Control: private, max-age=0
> Location: myprotocol://foobar/?param=hello
> Server: Microsoft-IIS/7.0
> X-AspNet-Version: 2.0.50727
> X-Powered-By: ASP.NET
> Date: Wed, 17 Sep 2008 13:21:24 GMT
> Content-Length: 178
>
> <html><head><title>Object moved</title></head><body>
> <h2>Object moved to <a
> href="myprotocol://foobar/?param=hello">here</a>.</h2>
> </body></html>
> --------
>
> So I'm guessing as Anthony has suggested that it's all handled in the
> HTTP stack so therefore won't work. It's a bit frustrating really as it
> means I have no chance of making a "codeless" sample. But I guess 3 lines
> doesn't hurt too much.
>
> Nick.
>
> "George" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> You welcome,
>>
>> Just a tip from me...
>> 2 tools i can not do web development without.
>>
>> 1. Fiddler (Best to work with IE).
>> 2. FireBug - plug-in for Firefox. Best to analyse Javascript errors,
>> DHTML layout...Highly recomended.
>>
>> PS: There is IE Development Toolbar which is simmilar to FireBug but has
>> very reduced functionality. Still good since it works in IE and FireBug
>> only for FireFox.
>>
>> George.
>>
>>
>>
>>
>> "Nick" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> Hi George,
>>>
>>> Cheers, I wasn't aware of that application, I shall take a look at it,
>>> thanks for your help, I'll see what I can find.
>>>
>>> Nick.
>>>
>>> "George" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>>I do not see why it should not work...
>>>> You need to be more verbose.
>>>> When you saying that you "not seem to be able to redirect to a custom
>>>> protocol" what exactly do you mean?
>>>> Do you know where problem is.
>>>> It might be in a browser when browser simply does not understand
>>>> myprotocol://myurl or it might be in a ASP.NET if Response.Redirect
>>>> tries to analyze the URL before sending to the browser
>>>>
>>>> Install tool from Microsoft called http://www.fiddlertool.com/fiddler/
>>>> it will help you see what browser is getting from the server.
>>>>
>>>> George.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> "Nick" <(E-Mail Removed)> wrote in message
>>>> news:%23Iv54b$(E-Mail Removed)...
>>>>> Hi there,
>>>>>
>>>>> I would like to perform something like the following from my vb.net
>>>>> web service, being invoked via HTTP Post
>>>>>
>>>>> Call HttpContext.Current.Response.Redirect("myprotocol://myurl")
>>>>>
>>>>> Unfortunately I do not seem to be able to redirect to a custom
>>>>> protocol url, any ideas why? Basically I'm trying to implement this
>>>>> functionality so no coding need take place to get the redirection from
>>>>> the consuming web page.
>>>>>
>>>>> Cheers for any advice.
>>>>>
>>>>> Nick.
>>>>>
>>>>
>>>
>>>

>>

>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTP SOAP/HTTP GET/HTTP POST milan_9211 Software 0 01-10-2011 02:10 PM
Custom not found and HTTP status code Nick Horrocks ASP .Net 6 11-13-2004 10:20 AM
custom http handler -- not reaching the session mortb ASP .Net 7 09-01-2004 08:13 AM
FormsAuthentication - <http://localhost> Works, <http://RealMachineName> Does Not T. Regan ASP .Net 3 06-21-2004 11:20 AM
Re: FormsAuthentication - <http://localhost> Works, <http://RealMachineName> Does Not Paul Glavich [MVP - ASP.NET] ASP .Net 0 06-20-2004 11:45 AM



Advertisments