Jump to content

get IIS domain name and Server name


joecool2005

Recommended Posts

Hi,I know by using this Request.ServerVariables("SERVER_NAME")I will get the server name.Is it possible to get the IIS domain name?Thx
Are you authenticating your users and logging them onto a domain? If not, and you're using anonymous access, then I think by default the IIS anonymous user is a user on the local box (not a domain user). What domain do you have in mind?
Link to comment
Share on other sites

Hi,Thanks for your answer.I have a IIS domain name my.domain.com and a server name myServerName.When I do thishttp://my.domain.com/default.asphttp://myServerName/default.aspthey both open the same page. So it means one point to the other.Is it possible on default.asp, to detect the server name and the IIS server name?Thx
Oh, sorry, you mean the DNS domain, not the Windows domain.The code you're using (Request.ServerVariables("SERVER_NAME")) will display my.domain.com when the webserver is a remote server. I think you're just seeing the machine name if you use a browser on the local box where the webserver's running.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...