Using Request.ServerVariables (SERVER_NAME) in asp.net

I have one login page that server two asp.net app on two different web servers.

I need to use the approach of checking which box the user is trying to get to using
         Request.ServerVariables (SERVER_NAME)

then redirect to the appropriate path ie

        response.redirect("~/owners/store.aspx")

or else

         response.redirect("~/default.aspx")
   
mugseyAsked:
Who is Participating?
 
wolfman007Commented:
You can access the Server variables

http://www.dotnetjunkies.ddj.com/Tutorial/B3CCB57F-0BBD-4D68-96B0-480B2F1DFC28.dcik

http://www.west-wind.com/weblog/posts/269.aspx
Request.ServerVariables["SERVER_NAME"]
 
Or
 
HttpContext.Current.Request.ServerVariables["SERVER_NAME"]

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.