I will need to redirect a URL from my Web Method such that when my application calls my web method, it will redirect to the URL contained in my Web Service.
I tried using System.Web.HttpContext.Current.Response.Redirect("url"); However, it compiled properly but doesn't work in my application, instead, it gave me the following error:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.WebException: The request failed with the error message:
--
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="http://www.microsoft.com">here</a>.</h2>
</body></html>
--.
Any other alternatives for it? I really need to redirect an url from my Web Service.