»Ë»Ñ Æ÷·³
°³¹ßÀÚÆ÷·³ ÀÔ´Ï´Ù.
  • ºÏ¸¶Å© ¾ÆÀÌÄÜ

asp.net ·Î±×ÀÎ °ü·Ã Áú¹®ÀÔ´Ï´Ù ¤Ð FormsAuthentication.....1

  • [* ºñȸ¿ø *]
  • µî·ÏÀÏ 2016-05-10 21:05
  • Á¶È¸¼ö 383

¾È³çÇϼ¼¿ä Ãʺ¸Ãʺ¸ °³¹ßÀÚÀÔ´Ï´Ù..

 

¿äÁò °Ô½ÃÆÇÀ» Á÷Á¢ ¸¸µå´Â ÁßÀε¥.. ±×Áß¿¡ ·Î±×ÀÎ °ü·Ã 󸮶§¹®¿¡ °í¿ªÀÌ³×¿ä ¤Ð

 

¼±ÀÓÀº ¹Ì¸® ¸¸µé¾î³õÀº ¼Ò½º ÀÖÀ¸´Ï±î ±×°Å ¾²¶ó°íÇϴµ¥ ÀÏ´Ü Á¦°¡ ¹¹¶óµµ ¾Ë°í  ½á¾ßµÉ²¨°°¾Æ¼­...

 

¶È°°ÀÌ µû¶óÇغôµ¥ Á¦°Å´Â ¾ÈµÇ³×¿ä ¤Ð¤Ð

 

¾Æ·¡ ¼Ò½º¿¡¼­ FormsAuthentication.SetAuthCookie() ÇÏ¸é ·Î±×ÀÎ ÀÎÁõ µÇ´Â°Å¶û ¶È°°´Ù´Âµ¥...

Àú·¸°Ô ÇØµÎ°í³ª¸é

Request.IsAuthenticated·Î ·Î±×ÀÎ µÆ´ÂÁö ¾ÈµÆ´ÂÁö ¾Ë ¼ö ÀÖ´Ù°í ÇÏ´õ¶ó±¸¿ä..

 

msdn¿¡¼­ ¹®¼­µµ ã¾Æº¸°í.. Áö½ÄÀεµ ã¾Æº¸°í.. ±¸±Û¿¡ À¯Åõºê¿¡..

¹¹°¡ ¹ºÁöµµ ¸ð¸£°Ù°í ¶È°°ÀÌ ¾²´Â°Å °°Àºµ¥ ¿Ö ¾ÈµÇ´Â°ÇÁö ¸ð¸£°Ù½À´Ï´Ù;;

 

¿ø·¡ Àǵµ´ë·Î¶ó¸é ¸®ÅÏÀÌ '·Î±×ÀÎ µÆ³× µÆ¾î'¶ó´Â alertâÀÌ ¶°¾ßÇϴµ¥

·Î±×ÀÎÀÌ ¾ÈµÇ´Ï±î 'ÀÎÁõ ½ÇÆÐ'À̶ó´Â âÀÌ ¶ß³×¿ä ¤Ð

 

Ȥ½Ã ¹æ¹ý ¾Æ½Ã´ÂºÐ µµ¿ò ºÎŹµå¸³´Ï´Ù ¤Ð

 

public ActionResult Board_Login(User_Data ud)
        {

            if (!ModelState.IsValid)
            { return Content("<script>alert('·Î±×ÀÎ ½ÇÆÐ'); window.close(); </script>"); }
           
            FormsAuthentication.SetAuthCookie(ud.user_name, false);
 
            HttpCookie user_id = new HttpCookie("m_user_id");
            user_id.Value = ud.user_name;
            user_id.Expires = DateTime.Now.AddDays(1d);
            Response.Cookies.Add(user_id);
            if (Request.IsAuthenticated)
            {
                return Content("<script>alert('·Î±×ÀÎ µÆ³× µÆ¾î'); window.close(); </script>");
            }
           
            return Content("<script>alert('ÀÎÁõ ½ÇÆÐ'); window.close(); </script>");
        }
 
 
 
 
* ±×¸®±¸ ·Î±×ÀΠó¸®ÇÏ´Â ¹æ¹ýÀÌ ¶Ç ¿©·¯°³°¡ Àִٴµ¥... ¼¼¼ÇÀ̳ª ÄíÅ°·Îµµ ÇÏ´Â°Ô ¸Â´Â°Ç°¡¿ä??
µÑÀÇ °³³äÀ» Àß ¸ð¸£±ä ÇÏÁö¸¸... ¿ØÁö ÄíÅ°´Â ¾²¸é ¾ÈµÇ´Â°Ô ¾Æ´Ñ°¡ ½Í¾î¼­¿ä ;;
 
¹Ì¸® µµ¿òÁֽŠºÐµé °¨»çµå¸³´Ï´Ù ¤Ð
 
 
 

 

0
ÃßõÇϱ⠴ٸ¥ÀÇ°ß 0
|
°øÀ¯¹öÆ°

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 °³³ä¿ìÁÖÀÎ
  • ¾Ë¸² ¿å¼³, »óó ÁÙ ¼ö ÀÖ´Â ¾ÇÇÃÀº »ï°¡ÁÖ¼¼¿ä.
©¹æ »çÁø  
¡â ÀÌÀü±Û¡ä ´ÙÀ½±Û