因此,我对webdev来说还很陌生。我试图为我的老板建立一个小型演示项目,作为概念证明。我已经在VS2015中建立了该网站,并且该网站可以在VS网络主机中运行/运行以进行调试。我现在正尝试将其扩展到为此设置的服务器上。
这是我已采取的步骤:
1.)已安装IIS,我可以看到默认页面。
2.)我已验证iis用户可以访问物理路径。
3.)我已经设置了匿名身份验证。
4.)我已启用目录浏览,
这是我开始遇到问题的地方。当打开浏览器并导航到该地址或右键单击iis Manager中的“浏览网站”选项时,我得到“此页面无法显示” 我已经找到了几个解决方案,但都没有奏效。希望取得任何进展的主要方法是进入:
Internet选项菜单->高级选项卡->设置框中的“浏览”->取消选中“显示友好的HTTP错误消息”,
即使未选中此选项,我仍然会看到“无法显示此页面”。如果页面继续显示错误,则没有其他反馈或解决方案。我尝试重新启动iis浏览器和物理服务器,而没有任何更改。我希望有人以前曾遇到过这个问题,解决方案是直接的,我只是因为我还很新而错过了它。
文件: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>
Run Code Online (Sandbox Code Playgroud)
我已经找到了我自己的问题...我正在尝试尽快设置一个地址。我从绑定中删除了“demo.commonuse.com”,现在它运行得很好。又名,因为我还没有为它设置域,因此它需要使用机器 IP 作为地址。谢谢大家的帮助。
| 归档时间: |
|
| 查看次数: |
20362 次 |
| 最近记录: |