windows7 IIS 誤刪 default web site 解決方法
阿新 • • 發佈:2018-12-27
今天不小心刪除了IIS管理器中的default web site,導致我無法釋出網站,於是百度該怎麼辦,找到了下面的解決方式:
但我覺得這位兄弟也是仍沒搞清楚是怎麼回事,我想弄清楚本質,進行了一番探究,經分析遠沒有那位兄弟那麼複雜,下面是我的解決方案:
解決方案1
如果你想很快解決問題,那麼你可以找另外一臺WIN7的機器,如果IIS管理器下面有default web site,那麼就到 C:\Windows\System32\inetsrv\config 下找到applicationHost.config檔案,然後複製到你的計算機中的相應目錄,在IIS管理器下重新整理“網站”,就可以看到default web site了。
解決方案2
如果你覺得你的applicationHost.config很重要,不想被替換,下面是我的對比結果,就是在刪了default web site的前後,applicationHost.config的對比。
可以發現就是差了“Default Web Site"這一部分,下面是我分享的這一部分程式碼,你可以將其拷貝到你的applicationHost.config檔案即可。
<site name="Default Web Site" id="1"> <application path="/"> <virtualDirectory path="/" physicalPath="%SystemDrive%\inetpub\wwwroot" /> </application> <bindings> <binding protocol="net.tcp" bindingInformation="808:*" /> <binding protocol="net.pipe" bindingInformation="*" /> <binding protocol="net.msmq" bindingInformation="localhost" /> <binding protocol="msmq.formatname" bindingInformation="localhost" /> <binding protocol="http" bindingInformation="*:80:" /> </bindings> </site>
網際網路提供了一個分享的平臺,我們在獲取豐富網路資源的同時,也要自己思考下是否有更簡單便捷的方式實現。