ÔÚ²»Í¬°æ±¾µÄ IIS ÉÏʹÓà ASP.NET MVC
ÔÚ²»Í¬°æ±¾µÄ IIS ÉÏʹÓà ASP.NET MVC
ASP.NET MVC Framework ÒÀÀµÓÚ URL ·ÓÉ¡£ÎªÁËÀûÓà URL ·ÓÉ£¬¿ÉÄܲ»µÃ²»ÔÚ Web ·þÎñÆ÷ÉÏÖ´ÐжîÍâµÄÅäÖò½Öè¡£ÕâЩ²½ÖèÈ¡¾öÓÚ Internet Information Services (IIS) µÄ°æ±¾ºÍÓ¦ÓóÌÐòµÄÇëÇó´¦Àíģʽ¡£
IIS µÄ×îа汾ÊÇ°æ±¾ 7.0¡£IIS µÄ´Ë°æ±¾°üÀ¨ÔÚ Windows Server 2008 ÖС£»¹¿ÉÒÔÔÚ³ý Home Basic ÒÔÍâµÄÈκΠVista ²Ù×÷ϵͳÉÏ°²×° IIS 7.0£¨Çë²Î¼û http://technet.microsoft.com/en-us/library/cc732624.aspx£©¡£
IIS 7.0 Ö§³ÖÁ½ÖÖģʽµÄ´¦ÀíÇëÇ󡣿ÉÒÔʹÓü¯³Éģʽ»ò¾µäģʽ¡£ÒÔ¼¯³ÉģʽʹÓà IIS 7.0 ʱ²»ÐèÒªÖ´ÐÐÈκÎÌØÊâÅäÖò½Öè¡£µ«ÊÇÒÔ¾µäģʽʹÓà IIS 7.0 ʱÐèÒªÖ´ÐжîÍâµÄÅäÖá£
Microsoft Windows Server 2003 °üº¬ IIS 6.0¡£ÔÚʹÓà Windows Server 2003 ²Ù×÷ϵͳʱ²»Äܽ« IIS 6.0 Éý¼¶Îª IIS 7.0¡£Ê¹Óà IIS 6.0 ʱ±ØÐëÖ´ÐÐÆäËûÅäÖò½Öè¡£
Microsoft Windows XP Professional °üº¬ IIS 5.1¡£Ê¹Óà IIS 5.1 ʱ±ØÐëÖ´ÐÐÆäËûÅäÖò½Öè¡£
×îºó£¬Microsoft Windows 2000 ºÍ Microsoft Windows 2000 Professional °üº¬ IIS 5.0¡£Ê¹Óà IIS 5.0 ʱ±ØÐëÖ´ÐÐÆäËûÅäÖò½Öè¡£
ÒÔÏÂÊDz»Í¬ IIS °æ±¾µÄ×ܽ᣺
IIS 7.0£¨¼¯³Éģʽ£©– ʹÓà URL ·Óɲ»ÐèÒªÌØÊâÅäÖá£
IIS 7.0£¨¾µäģʽ£©– ÐèÒªÖ´ÐÐÌØÊâÅäÖòÅÄÜʹÓà URL ·ÓÉ¡£
IIS 6.0 »ò¸üµÍ°æ±¾– ÐèÒªÖ´ÐÐÌØÊâÅäÖòÅÄÜʹÓà URL ·ÓÉ¡£
¼¯³ÉģʽºÍ¾µäģʽ
IIS 7.0 ¿ÉÒÔʹÓÃÁ½ÖÖÇëÇó´¦Àíģʽ´¦ÀíÇëÇ󣺼¯³ÉģʽºÍ¾µäģʽ¡£¼¯³Éģʽ¿ÉÌṩ¸üºÃµÄÐÔÄܺ͸ü¶àµÄ¹¦ÄÜ¡£¾µäģʽÓÃÓÚÏòÔçÆÚµÄ IIS °æ±¾ÌṩÏòºó¼æÈÝÐÔ¡£
ÇëÇó´¦ÀíģʽÓÉÓ¦ÓóÌÐò³Ø¾ö¶¨¡£Í¨¹ýÈ·¶¨ÓëÓ¦ÓóÌÐò¹ØÁªµÄ³Ø£¬¿ÉÒÔÈ·¶¨Ìض¨µÄ Web Ó¦ÓóÌÐòʹÓúÎÖÖ´¦Àíģʽ¡£Ö´ÐÐÒÔϲ½Ö裺
Æô¶¯ Internet Information Services Manager¡£
ÔÚ Connections ´°¿ÚÖÐÑ¡ÔñÒ»¸öÓ¦ÓóÌÐò¡£
ÔÚ Actions ´°¿ÚÖУ¬µ¥»÷ Basic SettingsÁ´½ÓÒÔ´ò¿ª Edit Application ¶Ô»°¿ò£¬Èçͼ 1 Ëùʾ¡£
×¢ÒâÑ¡ÔñµÄ Application Pool¡£
ĬÈÏÇé¿öÏ£¬IIS ÅäÖÃΪ֧³ÖÁ½ÖÖÓ¦ÓóÌÐò³Ø£ºDefaultAppPoolºÍ Classic .NET AppPool¡£Èç¹ûÑ¡ÔñDefaultAppPool£¬ÔòÓ¦ÓóÌÐòÔÚ¼¯³ÉÇëÇó´¦ÀíģʽÏÂÔËÐС£Èç¹ûÑ¡ÔñClassic .NET AppPool£¬ÔòÓ¦ÓóÌÐòÔÚ¾µäÇëÇó´¦ÀíģʽÏÂÔËÐС£
ͼ 1£ºÌ½²âÇëÇó´¦Àíģʽ£¨µ¥»÷²é¿´´óͼ£©
Çë×¢Ò⣬¿ÉÒÔÔÚ Edit Application ¶Ô»°¿òÖÐÐÞ¸ÄÇëÇó´¦Àíģʽ¡£µ¥»÷ Select °´Å¥²¢¸ü¸ÄÓëÓ¦ÓóÌÐò¹ØÁªµ
Ïà¹ØÎĵµ£º
C# ASP.NETÀï@µÄÃîÓÃ
ASP.NET C# string ×Ö·û´®µÄÇ°Ãæ¿ÉÒÔ¼Ó @ ¿ÉÒÔ½«×ªÒå×Ö·û£¨\£©µ±×÷ÆÕͨ×Ö·û¶Ô´ý¡£
±ÈÈ磺string str = @"C:\Windows";
Èç¹ûÎÒÃDz»Óà @ µÄ»°£¬Ó¦¸ÃÊÇ£ºstring str = "C:\\Windows";
@ ×Ö·û´®ÖУ¬ÎÒÃÇÓÃÁ½¸öÁ¬ÐøÓ¢ÎÄË«ÒýºÅ±íʾһ¸öÓ¢ÎÄË«ÒýºÅ£¬ÈçÏÂ×Ö·û´®µÄʵ¼ÊÄÚÈÝΪ£º="=£¬×Ö·û´®³¤¶ÈΪ 3 ......
<%@ Page Language="C#" %>
<%@ import Namespace="System.Collections" %>
<script runat="server">
void Page_Load(Object sender, EventArgs e) {
if(!Page.IsPostBack){
ArrayList data = new ArrayList();
data.Add(new Person("Tom",33,true));
data.Add(new Person("Jhon",39,false));
da ......
¹Ø±Õ´°Ìå
1.
this.btnClose.Attributes.Add("onclick", "window.close();return false;");
2.¹Ø±Õ±¾´°Ìå¼äÌøתµ½ÁíÒ»¸öÒ³Ãæ
this.HyperLink1.NavigateUrl = "javascript:onclick=window.opener.location.assign
......
°ïÈË¿´Ò»¸öÍøÕ¾£¬ÊÇghost¿Ë¡ºó³öÏÖ¿Õ°×¹ÊÕÏ£¬ÎÞÂÛÖØ×°IIS»¹ÊÇNETFrameWork¶¼²»ÄÜÕý³£½âÎöaspxÎļþÒ»Ñù£¬Óöµ½aspxÏÔʾ¾ÍÊÇ¿Õ°×Ò³Ãæ¡£
×îºó·¢ÏÖglobal.aspxµÄapplication_error´¦ÀíÖаѴíÎóÐÅÏ¢²Á³ýÁË£¬Ð޸ĻØÀ´ÈÃËüÏÔʾ¾ßÌå´íÎó¡£
·¢ÏÖÎÞ·¨cscдÈëdllÎļþµ½ÁÙʱĿ¼¡£
½â¾ö·½·¨£¬¸³ÓèNetServiceÓû§ÍêÈ«¿ØÖÆȨÏÞ£¬ÔÚ%win ......
//ƽ³£µ÷ÓÃjavascript·½·¨
ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert'Weclome!!!');</script>");
±³¾°²»Îª°×É«µÄ·½·¨£º
Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('Ìí¼Óʧ°Ü£¬ÇëÁªÏµ¼¼ÊõÔ±£¡') ......