Implement ???-?????? ??????? Visual Basic .NET ?? ????? ?? ???? ASP.NET ????????? ??? ???????-?????? ?????????? ?? ??? ???? ?? ??? ????

???? ?????? ???? ??????
???? ID: 306238 - ?? ???????? ?? ?????? ??? ?? ?? ???? ???? ???? ??.
??? ?? ??????? ???? | ??? ?? ??????? ????

?? ????? ??

??????

?? ???? Visual Basic .NET ?? ????? ???? ??? ???????-?????? ??????? ???? ???? ???? ASP.NET ????????? ??? ???-?????? ??????? ?? ??????????? ???? ?? ??? ???? ?? ????? ???? ???

??????????

??? ?? ???? ?? ?? ???????-?????? ?????????? ???? ASP.NET ????????? ?? ???? ?? ?? ?? ???? ????? ??????????? ??????? ?? ???, Microsoft ?????? ??? ??? ???? ????? ?? ??? ????? ???? ?????? ?? ????? ????:
308157 Visual Basic .NET ?? ????? ?? ???? ASP.NET ????????? ??? ???????-?????? ?????????? Implement ???? ?? ??? ????

Authenticating ?????????? ?? ?????? ????? ????

??????? ???????????? ?? ????????: Microsoft Windows ?????????? ???? ???, ??????? ?? ???? ?? ????? ???????? ??? ?? ????? ??? ???? ???? ???? ?? ???? ??? ?? ???? ???-?????? ??????? ??????????? ?? ???? ??? ?????, ?? authenticating ?????????? ?? ???????? ?? ?????????? ?? ????? ???? ?? ??? ??????? ???? ?????

???? ????????? ???-?????? ??????? ?? ??????????? ???? ?? ??? ?? ?????? ??? ????? ??? ?? ????? ????? ?? ????? ??? ?? ??? authenticating ?????????? pre-specified ????? ????? ???? ??? ???? ???? ?? ???? ?????????? ???? ??????, ?? ?????????? ?????????? ?? ??? ?? ???????? ?? ???? ???? ?? ?? ????? authenticating ?????????? ?? ????? ?? ???? ???? ?? ??? ????? ??? ??? illustrated ?? ??, ???? ?? ??? ??????? ???? ?? ??? ???? ?????? ?? ??????????? ?? ???? ????

Authenticating ?????????? ' % ws ' ??? Application_AuthenticateRequest ????? ?????? ?? ??? ????? ????? ???? ?? ??? ???? ?????? ????????? ??? ???? Global.asax ????? ??? ????? ??? ?? ????????? ?????:
Sub Application_AuthenticateRequest(ByVal sender As Object, ByVal e As EventArgs)
if (not(HttpContext.Current.User is Nothing)) then
    if HttpContext.Current.User.Identity.AuthenticationType = "Forms" then
        Dim id as System.Web.Security.FormsIdentity
        id = HttpContext.Current.User.Identity

        Dim MyRoles(2) As String
        MyRoles(0) = "Manager"
        MyRoles(1) = "Admin"
        HttpContext.Current.User = new System.Security.Principal.GenericPrincipal(id,MyRoles) 
    End if
End if
End sub
				

?????????? ???????? ?? ???? ???? ?? ????????? ???? ???? ASPX ??????? ??? ???????????

????? ????? ?? ???????????, ?? ?????? ?? authenticating ?????????? ???????? ?? ?????? ????????? ???? ?? ????????? ???? ?? ??? ???? ???????? ???? ????
  1. Sample.aspx ???? ?? ??. aspx ????? ?????, ?? ????? ??? ???????:
    <%@ Page Language="VB" %>
    <%@ Import Namespace="System.Web" %>
    
      <script runat=server>
        Sub Page_Load(Src As Object, E As EventArgs)
    	if User.IsInRole("Admin") then
    		Response.Write ("You are an Administrator")
    	Else
    		Response.Write ("You do not have any role assigned")
    	End if
        End Sub
    
      </script>
    					
  2. ??? ???? ?????? ????????? Sample.aspx ??????? ??????? ???? ?? ??? ????? ?? ??? ??????? ?????

??????

ASP.NET ??????? ?? ??????? ?? ???, ????? ???? ?? Microsoft ???????? ??? ?????:
306590 ?????: ASP.NET ??????? ????????? ??????
???-?????? ??????? ?? ???? ??? ???? ??????? ?? ???, ?????????? .NET Framework ?????????? ????????? ??? (SDK) ????????? ?? ??? ?????:
???-?????? ???????
http://msdn.microsoft.com/en-us/library/52kd59t0 (vs.71). aspx
???-?????? ??????? ?? ???? ??? ??????? ????? MSDN ??? ???? ?? ????????? ?? ????? ??? ?? ????? ???:
IBuySpy ?????? ??????
http://msdn.microsoft.com/en-us/library/ms978480.aspx
???? ??????? ?? ???, ???? ?? ??? ????? ???????? ??????:
Reilly, Douglas J. Microsoft ASP.NET ????????? ???????. Microsoft ?????, 2001?

Esposito, Dino. ??????? ??? ?????? ASP.NET ?? ADO.NET ?? ???. Microsoft ?????, 2001?
Microsoft ?????? ?????? ???? ??? ???? ??? ?? ??? ?????-???? ?????? ??????? ?????? ????? ??? ?? ?????? ??????? ????? ?? ???? ??? ???? ???? Microsoft ?? ?????-???? ?????? ??????? ?? ?????????? ?????? ???? ?????

???

???? ID: 306238 - ????? ???????: 24 ??????? 2012 - ??????: 1.0
???? ???? ???? ??:
  • Microsoft ASP.NET 1.1
  • Microsoft ASP.NET 1.0
  • Microsoft Visual Basic .NET 2003 Standard Edition
  • Microsoft Visual Basic .NET 2002 Standard Edition
??????: 
kbproductlink kbhowtomaster kbsecurity kbmt KB306238 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:306238

??????????? ???

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com