473,504 Members | 13,746 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Response.Redirect Custom Protocol, not http

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.
Sep 11 '08 #1
9 2870
"Nick" <a@a.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
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

Sep 11 '08 #2
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" <a@a.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
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.
Sep 11 '08 #3
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.
Sep 11 '08 #4
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" <no*****@comcast.netwrote in message
news:uC*************@TK2MSFTNGP03.phx.gbl...
>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" <a@a.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>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.

Sep 11 '08 #5
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" <a@a.comwrote in message
news:us**************@TK2MSFTNGP04.phx.gbl...
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" <no*****@comcast.netwrote in message
news:uC*************@TK2MSFTNGP03.phx.gbl...
>>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" <a@a.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>>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.

Sep 11 '08 #6
"George" <no*****@comcast.netwrote in message
news:eg**************@TK2MSFTNGP03.phx.gbl...
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

Sep 11 '08 #7
"Nick" <a@a.comwrote in message
news:#I**************@TK2MSFTNGP03.phx.gbl...
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

Sep 11 '08 #8
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" <no*****@comcast.netwrote in message
news:eg**************@TK2MSFTNGP03.phx.gbl...
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" <a@a.comwrote in message
news:us**************@TK2MSFTNGP04.phx.gbl...
>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" <no*****@comcast.netwrote in message
news:uC*************@TK2MSFTNGP03.phx.gbl...
>>>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" <a@a.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl.. .
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.



Sep 17 '08 #9
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" <a@a.comwrote in message
news:eq*************@TK2MSFTNGP06.phx.gbl...
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" <no*****@comcast.netwrote in message
news:eg**************@TK2MSFTNGP03.phx.gbl...
>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" <a@a.comwrote in message
news:us**************@TK2MSFTNGP04.phx.gbl...
>>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" <no*****@comcast.netwrote in message
news:uC*************@TK2MSFTNGP03.phx.gbl...
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" <a@a.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl. ..
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.
>

Sep 17 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
4299
by: Sam | last post by:
I have some issues with HTTP Headers and I was hoping for some pointers or references to good articles. Here is the problem. I have 6 .aspx pages, each page contains a common .ascx. This ascx...
5
2140
by: john | last post by:
Hello, One our thrid page for some reason the response.redirect isn't working on the live server. It works fine on the development machine but when we move the code to the live server it doesn't...
2
9167
by: hansiman | last post by:
Why can't I use Response.Redirect in a class.vb file? /M
4
2148
by: Adam Beer | last post by:
I have a visual basic app that contains a IE browser control and I am using C#.NET to create dynamic content to be displayed within the IE control. The app parses the URL for commands, but I've run...
7
2199
by: Joe Rigley | last post by:
Hi, I have a custom class with a public method. I want to perform a repose.redirect if an error occurs in the public method GetUserRoles. Unfortunately, Visual Studio 2003 is throwing an error...
4
5870
by: Vi | last post by:
Hi, I have an <asp:Button> control on a page. When it is clicked, I run a db stored procedure and then I want to go to the next page by executing a Response.Redirect("NextPage.aspx?id=" + myID)....
5
4545
by: venner | last post by:
I'm having an issue with an ASP.NET website after upgrading to ASP.NET 2.0. The website makes use of a central authentication service (CAS) provided at the university I work for. Each page checks...
4
11386
by: mike.biang | last post by:
I have an ASP page that is using an XMLHTTP object to request various pages from my server. I keep a single session throughout the XMLHTTP requests by bassing the ASPSESSIONID cookie through the...
1
4791
by: marccruz | last post by:
Hi, I am creating a test web site that allows me to click a button which redirects me to a file path. I implemented some code to attempt this but I keep getting a blank page. How do I...
0
7213
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7298
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
5610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4698
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3187
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1526
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
406
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.