简体   繁体   English

无法使用服务器名称或IP地址访问Web应用程序

[英]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 / WebApphttp:// 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.

相关问题 Web应用程序不适用于服务器名称和Windows身份验证,但适用于IP地址 - Web application doesn't work with server name and windows authentication but does with IP Address 将Web App限制为IP地址或DNS名称 - Restrict Web App to IP address or DNS name 限制IP地址访问Web应用程序 - Restrict IP Address to access Web Application 为什么我的标准域名请求URL被卡西尼Web服务器转换为IP地址请求URL? - Why is my fully qualified domain name request url getting converted to an ip address request url by the Cassini web server? 如何获取Web服务器上用户的IP地址? - how to get the user's ip address on web server? Visual Studio嵌入式Web服务器绑定IP地址 - Visual studio embedded web server bind ip address 如何通过输入网站名称而不是服务器的IP地址来打开网站 - How to open a website by entering its name, not the IP address of the server 当我添加服务器 IP 地址而不是名称时,WEBAPI 不起作用? - WEBAPI not working when i add server ip address instead of name? 在两个不同的 Web 服务器上托管一个 Web 应用程序和 Web API 项目,该项目使用 IP 地址 - Host a Web application and Web API Project that Use IP Address on Two different Web Servers 使用web.config阻止基于IP地址的内容 - Using web.config to block content based on IP address
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM