redirect asmx - sub domains

Discussion in 'ASP.NET WebServices' started by tedmyers, Apr 6, 2009.

  1. Anyone know how to redirect asmx?

    I have created sub domains and they work.
    If InStr(UCase(Request.ServerVariables("SERVER_NAME")), UCase("admin.mydomain.com")) > 0 Then
    Response.Redirect("/admin")
    ElseIf InStr(UCase(Request.ServerVariables("SERVER_NAME")), UCase("demo.mydomain.com")) > 0 Then
    Response.Redirect("/demo")......

    The problem is the path with the redirect is now admin.mydomain.com/admin/webservice/myws.asmx and I have a lot of webservices looking for: admin.mydomain.com/webservice/myws.asmx

    Thanks,
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    move your web service to /admin/webservice directory is the easiest way.
     

Share This Page