[英]Web application not accessible using server name or IP address
I have a web application published on our Windows Server 2008 R2 (running IIS7). 我在Windows Server 2008 R2(运行IIS7)上发布了一个Web应用程序。 I can access it through http://localhost/WebApp without any problem. 我可以通过http:// localhost / WebApp毫无问题地访问它。
However, if I try using http://servername/WebApp or http://IP_address/WebApp (from both server machine itself or from a client machine) then it won't show the page correctly (Access Denied Message while login my apps). 但是,如果我尝试使用http:// servername / WebApp或http:// IP_address / WebApp (从服务器本身或从客户端计算机),则它将无法正确显示页面(登录我的应用程序时访问拒绝消息) )。
My application is developed in ASP.NET and and uses Crystal Reports 2008. 我的应用程序是使用ASP.NET开发的,并使用Crystal Reports 2008。
Permissions: Authenticated user and Iuser (folders). 权限:经过身份验证的用户和Iuser(文件夹)。
Authentication: Anonymous and Forms are enabled 身份验证:启用匿名和表单
Please help me to access my application by both IP address and server name 请帮助我同时通过IP地址和服务器名称访问我的应用程序
A simple answer is that you need to configure IIS Host file for your server. 一个简单的答案是,您需要为服务器配置IIS主机文件。 This is located here: C:\\WINDOWS\\system32\\drivers\\etc\\hosts. 该文件位于:C:\\ WINDOWS \\ system32 \\ drivers \\ etc \\ hosts。
127.0.0.1 localhost
You can add another line similar to the one above, and give it the server name. 您可以添加与上面类似的另一行,并为其指定服务器名称。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.