查找网站的主机标头值? [英] Find the host header value of the website?

查看:51
本文介绍了查找网站的主机标头值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何找到将在IIS中提供的网站的主机标头值?我只想在浏览器中显示该主机头名称.我如何获得该价值?

How can i find the host header value of the website which will be give in the IIS? i just want to display that host header name in the browser. how can i get that value?

推荐答案

主机头作为HOST嵌入在HTTP头部分中.如果要在自己的ASP.NET页中显示它,则可以从Page.Context.Request.Headers.GetValues("Host")

host header is embedded in the HTTP header section as HOST. If you want to display that in your own ASP.NET page, you can access that from Page.Context.Request.Headers.GetValues("Host")

这篇关于查找网站的主机标头值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆