I’d like to redirect a user to a specific page (a download for a zip file actually, http://www.yo.com/dl/yo.zip for example) from a web method. Could anyone tell me how to do this? I’m guessing I’d need to set the content type to something specific and write something to the response stream.
Hmm… I’m not sure this is something you can do. But I haven’t looked into. Couldn’t you use teh web service to stream the file down?
Found this on MSDN:
If you need to provide a redirect response in your Web service, do not use the Context.Response.Redirect method because the HTTP response will differ from what the Basic Profile mandates. [R1130]
The following example shows how to give a redirect response that complies with the Basic Profile:
public string HelloWorld()
Context.Response.StatusCode = 307;
Don’t know if that helps at all!
That worked. Thanks.