對於webdev來說,這非常新穎。即時嘗試爲我的老闆構建一個小型演示項目作爲概念證明。我已經在VS2015中構建了該站點,並且它可以在VS Webhost中運行/調試。即時通訊現在試圖將其更多地轉移到爲此設置的服務器上。
這裏是我已經採取的步驟:
1.)安裝IIS,我可以看到默認頁面。
2.)我已驗證iis用戶可以訪問物理路徑。
3.)我設置了匿名身份驗證。
4.)我已啓用目錄瀏覽
這裏是我開始遇到的問題。當打開瀏覽器並導航到該地址或右鍵點擊瀏覽網站選項從iis經理我得到「這個頁面無法顯示」我查了幾個解決方案,沒有工作。這是希望的任何向前進步的主要原因之一是進入:
internet選項菜單 - >高級選項卡 - >「瀏覽」設置框中 - >取消選中「顯示友好HTTP錯誤信息」
甚至與此選項未選中,我仍然看到「此頁面無法顯示」。如果頁面繼續顯示錯誤,則沒有其他反饋或解決方案。我已嘗試重新啓動iis瀏覽器和物理服務器都沒有任何更改。即時通訊希望有人以前有過這個問題,解決方案是直截了當的,我很想念它,只是因爲我還是新手。此頁面無法在IIS中顯示
FILE:Default.aspx的
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>CommonUse Web Demo</title>
<link href="App_Code/PageStyle.css" rel="stylesheet" type="text/css" />
</head>
<style>
.VerticalLine
{
border-left: thick solid #000000;
}
th, td
{
padding: 5px;
text-align: left;
}
.TableLayoutSideBar
{
width: 200px;
}
.TableLayoutMainBar
{
width: 1000px;
}
.TBL_VerticalHeader {
width: 75px;
}
</style>
<body>
<form id="form1" runat="server">
<div>
<table cellpadding="0" cellspacing="0">
<tr>
<th class="TableLayoutSideBar">
</th>
<th class="TableLayoutMainBar">
<h1 style="text-align:center;">Common Use Web Demo</h1>
</th>
<th class="TableLayoutSideBar">
</th>
</tr>
<tr>
<td class="TableLayoutSideBar">
</td>
<td class="TableLayoutMainBar">
<table cellpadding="0" cellspacing="0">
<tr>
<th class="TBL_VerticalHeader">
<asp:Label runat="server" Text="Input"/>
</th>
<td class="TableLayoutSideBar">
<asp:Label runat="server" Text="Input Range: 0-9"/>
<asp:TextBox ID="Tbx_Input" runat="server" Width="100px"/>
</td>
<td class="TableLayoutSideBar">
<asp:Button ID="Btn_Submit" runat="server" Text="Submit" OnClick="Btn_Submit_Click" />
</td>
</tr>
<tr>
<th class="TBL_VerticalHeader">
<asp:Label runat="server" Text="Output:"/>
</th>
<td class="TableLayoutSideBar" colspan="2">
<asp:Label ID="Lbl_Output" runat="server" Text="Please Input a Number"/>
</td>
</tr>
</table>
</td>
<td class="TableLayoutSideBar">
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
第一步是嘗試獲取HTTP錯誤代碼。看看這個,並嘗試找到正在生成的HTTP錯誤代碼:http://blogs.iis.net/ma_khan/troubleshooting-iis-6-status-and-substatus-codes。有時打開F12控制檯,轉到網絡選項卡也會提供更多有用的信息 –
地址欄中的URL是什麼?將它與IIS端的座標綁定比較 –
@LexLi,我不知道你在問什麼,當我運行它VS2015時,地址只是'localhost:xxxx',即時試圖設置iis爲'演示.commonuse.com',它應該默認爲'\ deafult.aspx'頁面。 – mmp786