[英]Where do the IIS server variables SERVER_NAME and HTTP_HOST come from?
Our ASP.NET application is not working at a customer installation because ServerVariables["SERVER_NAME"] and ServerVariables["HTTP_HOST"] return the string "Arcplan".我们的 ASP.NET 应用程序在客户安装时无法运行,因为 ServerVariables["SERVER_NAME"] 和 ServerVariables["HTTP_HOST"] 返回字符串“Arcplan”。
URLs which we build on the server are then incorrect (we use Request.Url.Authority which appears to use these ServerVariables internally).然后,我们在服务器上构建的 URL 不正确(我们使用 Request.Url.Authority,它似乎在内部使用这些 ServerVariables)。
The value "Arcplan" stored in the ServerVariables does not correspond to the name of the server or web site or anything that I can find.存储在 ServerVariables 中的值“Arcplan”与服务器或网站的名称或我能找到的任何内容都不对应。 Maybe the computer was renamed and it used to be called Arcplan?
也许计算机被重命名并且它曾经被称为 Arcplan?
Does anyone know where IIS gets these values from?有谁知道 IIS 从哪里获取这些值? Are they stored in a config file somewhere?
它们是否存储在某个配置文件中?
Check your URL Rewrite configuration module if that thing has been set there.检查你的 URL Rewrite 配置模块,如果那个东西已经设置在那里。
Follow this link for more info: setting-http-request-headers-and-iis-server-variables点击此链接了解更多信息: setting-http-request-headers-and-iis-server-variables
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.