注册 | 登录

解决iis 7.5 - Unable to access an website in the local network

itPublisher 分享于



推荐:解决错误:ASP.NET Error: Failed to access IIS metabase

解决错误:ASP.NET Error: Failed to access IIS metabase 今天重新装了系统,然后重新安装了vs2005,突然记起忘记安装iis了。并且出现了如下错误 //以下是错误信

I have an site which I am not able to access from either within or outside the network. I am able to access it only from my machine, from where I am running the site. Firewall is managed by a software called Eset and only when I disable it, does the site even open on my local system. I have punched a hole in the firewall for the port used by the site, inspite of which I am not able to access the site from another machine. There is a port forwarding rule in the router as well, which redirects traffic to my machine.

I followed the instructions here and here, which did not help.

Please let me know how I can make this work?

Edit 1: Contents of the IISExpress/config/applicationhost.config file.

<site name="WebSite1" id="1" serverAutoStart="true">
    <application path="/">
        <virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebSite1" />
        <binding protocol="http" bindingInformation=":8080:localhost" />
<!--site name="WebSite2" id="2" serverAutoStart="true">
    <application path="/">
        <virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebSite2" />
        <binding protocol="http" bindingInformation=":8080:" />
<site name="DataArchive" id="3">
    <application path="/" applicationPool="Clr4IntegratedAppPool">
        <virtualDirectory path="/" physicalPath="D:\Main\Work\SOURCE\WORKING\eMote\MicroFrameworkPK_v4_3\APPS\DataArchive\DataArchive" />
        <binding protocol="http" bindingInformation="*:64068:localhost" />
</site> iis-7.5
  this question
edited Oct 2 '14 at 21:53 asked Oct 2 '14 at 15:55 Sarvavyapi 392 1 12 23


2 Answers

First: check your local (developer) machine:

you should have configured your site in your IIS Server, not only in a temporary visual studio (simulated iis), be sure you could enter to your site with a browser with a url like this.

http://localhost/yoursite       (yoursite should be configured on iis administrator)

(if problems check how to configure IIS)

Second check your local ip address now try with your local ip in your local machine, so view your local ip with IPCONFIG command in CMD window and try this: replace "localhost" with "your ip address" like this

(if problems check your configuration in IIS, rare problems here)

Third if both previuos steps works try the same url address inside your local network from a computer in the same segment of the network with the same Url

(if problems check WINDOWS FIREWALL, check ESET firewall, Check if there another firewalls, check router configurations, eliminate ip forwardings in your routers)

Fourth Configure public IP to your local IP if last step works, and you want to view your page from external machine, you should point the public ip from your router to your local server ip, try this its the most simple way

configure DMZ in your router, forwarding all ports to your local machine.

if your public ip is configure a DMZ forwarding all ports to your local ip


1.5.2 在IIS上配置ASP.NET 在服务器上部署ASP.NET网站时,需要.NET的运行环境.NET Framework。.NET Framework类似于Java的JDK,包含有.NET程序运行环境和命令行

so all the world can access to your machine with the following url

if problems check router configuration. public IP should be configured to the router local ip should be an static ip

  this answer
answered Oct 2 '14 at 16:17 user2148906 21 2      Thanks. First step works. But the second step does not work (with the IP address). I have added the contents of applicationhost.config file to my question. –  Sarvavyapi Oct 2 '14 at 21:45      I think you are using IIS Express not IIS conventional please refer… for express –  user2148906 Oct 3 '14 at 15:37      Thanks. I was able to fix the issue. I will post it as an answer (it was more complicated than what I had imagined) –  Sarvavyapi Oct 3 '14 at 17:01

 |  解决方法

This is what I did to fix the issue. I am a newbie in this and did not know that I needed to install/configure the IIS web server. I was under the impression that the IIS server local to visual studio would take care of my needs of accessing the site from within and outside the network.

  1. I followed this tutorial (install IIS on windows 7) to install the IIS server.
  2. I then published the site from visual studio (I watched this video).
  3. Observed that I was able to access the site as


but not as


Found out that I had to configure the host header. This SO question and this link helped me do that.

  1. But still I was not able to access the site with my local IP address and I was not even able to start the site from IIS manager (even after assigning a new port). I restarted my machine and upon bringing up the project on visual studio, came across this message - "The url is configured to use iis express as the web server but the url is currently configured on the local iis server". So, I disabled the local IIS server on visual studio by following this question.

  2. While trying to bring up the project on visual studio again, this message popped up - " 4.5 has not been registered on the web server. you need to manually configure". Followed this SO question and this site to fix the issue. This is the command that I ran:

    C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis.exe -i

  3. After this, I configured the bindings for my site on IIS manager to use my local IP address. Restarting the site after this change, I was able to access the site with localhost, my local IP address and the external IP address as well.

  this answer
answered Oct 3 '14 at 17:27 Sarvavyapi 392 1 12 23


推荐:ASP.NET Error: Failed to access IIS metabase

//以下是错误信息------------------------------- ASP.NET Error: Failed to access IIS metabase This error showed up prior








您的注册邮箱: 修改

重新发送激活邮件 进入我的邮箱