asp.net FormsÉí·ÝÑéÖ¤ºÍ»ùÓÚ½ÇÉ«µÄȨÏÞ·ÃÎÊ
FormsÉí·ÝÑéÖ¤ÓÃÀ´ÅжÏÊÇ·ñºÏ·¨Óû§£¬µ±Óû§ºÏ·¨ºó£¬ÔÙͨ¹ýÓû§µÄ½ÇÉ«¾ö¶¨ÄÜ·ÃÎʵÄÒ³Ãæ¡£
Ö÷Ҫ˼Ï룺FormsÉí·ÝÑéÖ¤ÓÃÀ´ÅжÏÊÇ·ñºÏ·¨Óû§£¬µ±Óû§ºÏ·¨ºó£¬ÔÙͨ¹ýÓû§µÄ½ÇÉ«¾ö¶¨ÄÜ·ÃÎʵÄÒ³Ãæ¡£
¾ßÌå²½Ö裺
1¡¢´´½¨Ò»¸öÍøÕ¾£¬½á¹¹ÈçÏ£º
ÍøÕ¾¸ùĿ¼
AdminĿ¼ ----> ¹ÜÀíԱĿ¼
Manager.aspx ----> ¹ÜÀíÔ±¿ÉÒÔ·ÃÎʵÄÒ³Ãæ
UsersĿ¼ ----> ×¢²áÓû§Ä¿Â¼
Welcome.aspx ----> ×¢²áÓû§¿ÉÒÔ·ÃÎʵÄÒ³Ãæ
ErrorĿ¼ ----> ´íÎóÌáʾĿ¼
AccessError.htm ----> ·ÃÎÊ´íÎóµÄÌáʾҳÃæ
default.aspx ----> ÍøվĬÈÏÒ³Ãæ
login.aspx ----> ÍøÕ¾µÇ¼ҳÃæ
web.config ----> ÍøÕ¾ÅäÖÃÎļþ
2¡¢ÅäÖÃweb.configÈçÏ£º
¸´ÖÆ´úÂë ´úÂëÈçÏÂ:
<configuration>
<system.web>
<!--ÉèÖÃFormsÉí·ÝÑéÖ¤-->
<authentication mode="Forms">
<forms loginUrl="Login.aspx" name="MyWebApp.APSXAUTH" path="/" protection="All" timeout="30"/>
</authentication>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</configuration>
<!--ÉèÖÃAdminĿ¼µÄ·ÃÎÊȨÏÞ-->
<location path="Admin">
<system.web>
<authorization>
<allow roles="Admin"/>
<deny users="?"/>
</authorization>
</system.web>
</location>
<!--ÉèÖÃUsersĿ¼µÄ·ÃÎÊȨÏÞ-->
<location path="Users">
<system.web>
<authorization>
<allow roles="User"/>
<deny users="?"/>
</authorization>
</system.web>
</location>
3¡¢ÔÚlogin.aspxÒ³ÃæµÄµÇ¼²¿·Ö´úÂëÈçÏ£º
¸´ÖÆ´úÂë ´úÂëÈçÏÂ:
protected void btnLogin_Click(object sender, EventArgs e)
{
//FormsÉí·ÝÑéÖ¤³õʼ»¯
FormsAuthentication.Initialize();
//ÑéÖ¤Óû§ÊäÈë²¢µÃµ½µÇ¼Óû§£¬txtNameÊÇÓû§Ãû³Æ£¬txtPasswordÊǵǼÃÜÂë
UserModel um = ValidUser(txtName.Text.Trim(),txtPassword.Text.Trim());
if (um != null)
{
//´´½¨Éí·ÝÑé֤Ʊ¾Ý
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1,
um.Name,
DateTime.Now,
DateTime.Now.AddMinutes(30),
true,
um.Roles,//ÓÃ
Ïà¹ØÎĵµ£º
Paging long articles in ASP.NET using C#
Long articles are better broken into bite-sized chunks over several pages. With static HTML, this is easily achieved by dividing the article into logical separations and creating separate .htm files for each. Here's how to do it using C# for an article that ......
ASP.NET FCKeditor Îı¾±à¼Æ÷µÄʹÓà ¡¾×ª¡¿
ÏÂÔصØÖ·£ºhttp://www.fckeditor.net/download
FCKeditorʹÓÃ
Ò»¡¢ÅäÖÃ
1¡¢ÔÚwww.fckeditor.net
µã»÷Download£¬ÏÂÔØFCKEditor_2.5.1.zipºÍFCKEditor.Net(ASP.NET
Control to easily integrate FCKEditor on .Net Web pages.)
2¡¢Ð½¨Ò»ÏîÄ¿£¬±ÈÈç½ÐFCK¡£½âѹFCKEd ......
»·¾³£ºASP.NET(C#)£¬Visual Studio 2010¡£
Ìáʾ£ºÎ´ÄܼÓÔØÀàÐÍ“EMS.App_Code.PersonalInfo”¡£Èç¹û¸ÃÀàÐÍλÓÚApp_CodeÎļþ¼ÐÖУ¬Çë¼ì²éËüÊÇ·ñÒѱàÒë¡£Èç¹û¸ÃÀàÐÍλÓÚÒѱàÒëµÄ³ÌÐò¼¯ÖУ¬Çë¼ì²é¸Ã³ÌÐò¼¯ÊÇ·ñ±»¸ÃÏîÄ¿ÒýÓá£
´¦Àí£º
×Ô¼º×öµÃÒ»¸öС³ÌÐò£¬È¡ÃûEMS£¬²¢ÔÚApp_CodeÎļþ¼ÐϽ¨Á¢ÁËÀàPersonalInfo¡¢Sal ......
ÍøÕ¾ÖÐä¯ÀÀÆ÷»º´æµÄ¿ØÖÆ(IIS+ASP.Net)
ÔÚIIS6.0 + Windows Server 2003ͨ¹ý²âÊÔ¡£ÈçÓдíÎó¾´ÇëÖ¸Õý¡£
1¡¢ IIS¿ØÖÆ£¨¶ÔJsµÈÎļþ£©£º
ÔÚIIS¹ÜÀíÆ÷Öв鿴ÎļþÊôÐÔ£¬ÔÚHTTPÍ·µÄTabÒ³ÖУ¬ÉèÖÓÆôÓÃÄÚÈݹýÆÚ”¡£
l IISÄ¬È ......
WSDL£ºÊÇÒ»¸öÓÃÀ´ÃèÊöWeb·þÎñºÍ˵Ã÷ÈçºÎÓëWeb·þÎñͨÐŵÄXMLÓïÑÔ¡£ ÔõÑùÏò±ðÈ˽éÉÜÄãµÄWeb serviceÓÐʲô¹¦ÄÜ£¬ÒÔ¼°Ã¿¸öº¯Êýµ÷ÓÃʱµÄ²ÎÊýµÈµÈ¡£
web·þÎñ£º½øÐÐwebÉÏÊý¾Ý½»»»µÄ·½·¨¡£Äܹ»ÒÔ´¿xml·½Ê½Í¨ÐÅ¡£
SOAP£º¼òµ¥¶ÔÏó´æÈ¡ÐÒé¡£¿É¿´×öxml·½ÑÔ£» ÒÔSOAPÐÅ·âÀ´´«µÝºÍÏìÓ¦Îı¾£¨°üº¬£ºÊײ¿¡¢Ö÷Ì壩HTTP P ......