在IIS7上部署aspx网站
生活随笔
收集整理的這篇文章主要介紹了
在IIS7上部署aspx网站
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
在IIS7上部署aspx網(wǎng)站
2016-12-06
?
1 示例代碼
WebForm.aspx內(nèi)容:
<html> <head><script language="C#" runat="server"> void Button1_Click(object sender,System.EventArgs e) { TextBox1.Text="You picked "+DropDownList1.SelectedValue; }</script> </head> <body><h3>Request-Response</h3><form id="Form1" method="post" runat="server"><p>Choose one:</p><asp:DropDownList ID="DropDownList1" runat="server"><asp:ListItem Value="red">red</asp:ListItem><asp:ListItem Value="blue">blue</asp:ListItem><asp:ListItem Value="green">green</asp:ListItem></asp:DropDownList><p><asp:Button ID="Button1" Text="Send" OnClick="Button1_Click" runat="server" /><p><asp:TextBox ID="TextBox1" runat="server" /></p></form> </body> </html>web.xml內(nèi)容:
<?xml version="1.0" encoding="utf-8"?><!--有關(guān)如何配置 ASP.NET 應(yīng)用程序的詳細信息,請訪問http://go.microsoft.com/fwlink/?LinkId=169433--><configuration><system.web><compilation debug="true" targetFramework="4.0" /></system.web></configuration>2 部署
1 把文件“WebForm.aspx”和“web.xml”放在目錄D:\Study\WebSite1下
2 打開IIS管理器,右擊“網(wǎng)站”,在彈出上下文菜單,選擇“添加網(wǎng)站”。在“添加網(wǎng)站”窗口,填寫網(wǎng)站名稱,和對應(yīng)物理路徑,指定一個端口號(如:80,關(guān)鍵是要與IIS中已有網(wǎng)站不同),如下圖1所示:
圖1 添加網(wǎng)站
3 編輯“應(yīng)用程序池”,對應(yīng)網(wǎng)站的.NET Framework版本,使它和web.xml設(shè)置的版本一致,這里是v4.0,如圖2所示:
圖2 配置應(yīng)用程序池
3 瀏覽網(wǎng)頁
圖3 訪問weform.aspx頁面
?
轉(zhuǎn)載于:https://www.cnblogs.com/Ming8006/p/6137662.html
總結(jié)
以上是生活随笔為你收集整理的在IIS7上部署aspx网站的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Linux snmp
- 下一篇: 前端学PHP之PHP操作memcache