扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:喻凯 来源:yesky 2007年11月8日
关键字: Windows
<?xml version="1.0" encoding="utf-8" ?> <configuration> <!-- SECURITY This section sets the security policies of the application. Possible modes are "Windows", "Cookie", "Passport" and "None" --> <!-- Use Cookie Authentication for external users --> <security> <authentication mode="Cookie"> <cookie cookie=".PRODAUTH" loginurl="https:// beta.visualstudio.net/Login.aspx" decryptionkey="autogenerate"> <credentials passwordformat="Clear" /> </cookie> </authentication> <authorization> <allow users="*" /> </authorization> </security> </configuration> |
Public Sub cmdSubmit_Click(ByVal sender As Object, ByVal e As _ System.EventArgs) Dim sUserID As String Dim sPassword As String Dim sAuthCookie As String 'External user, take the values from the Login form sUserid = system.Convert.ToString(Me.txtUserID.Value) sPassword = system.Convert.ToString(Me.txtPassword.Value) adoRS = oBetaUser.LoginEx(sUserID, sPassword) If adoRS.recordcount = 1 Then 'login success - get a session adoRS = osSession.GetNewSession _ (adoRS("BetaSiteID").Value.ToString().ToInt32()) If Not adoRS Is Nothing Then If adoRS.Recordcount > 0 Then adoRS.movefirst() 'Set the authentication cookie using the SID sAuthCookie = adoRS("SID").Value.ToString() 'use ASP+ authentication to authenticate the user, If Instr(CookieAuthentication.GetRedirectUrl _ (sAuthCookie, True), "default.aspx") > 0 Then CookieAuthentication.SetAuthCookie(sAuthCookie, True) Response.Redirect(system.Convert.ToString( _ oSiteUser.GlobalPath) & "Home.aspx") Else CookieAuthentication.RedirectFromLoginPage( _ sAuthCookie, True) End If Else 'login failed Response.Redirect("LoginFailed.aspx") End If Else 'login failed Response.Redirect("LoginFailed.aspx") End If Else 'login failed Response.Redirect("LoginFailed.aspx") End If End Sub |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者