andycharger Posted October 16, 2003 Posted October 16, 2003 I need some help....... Im writing a role based login procedure based on several examples I have found but when I compile my code, it says "ValidateLogin is not declared" There is no menion in the examples as to how or where you declare this term. Can anyone help make my role based login work? Here is my code: Dim ticket As New FormsAuthenticationTicket(1, roleticket, DateTime.Now, DateTime.Now.AddMinutes(30), ValidateLogin.PersistantCookie, "admin") Dim rolecookie = New HttpCookie(FormsAuthentication.FormsCookieName, FormsAuthentication.Encrypt(ticket)) If ValidateLogin.PersistantCookie Then Response.Cookies.Add(rolecookie) End If Thanks andy Quote
Administrators PlausiblyDamp Posted October 16, 2003 Administrators Posted October 16, 2003 Where did you find the sample? It looks as though the ValidateLogin is either a class or structure declared elsewhere in the sample. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
andycharger Posted October 16, 2003 Author Posted October 16, 2003 I found it here http://forums.aspfree.com/t17941/s53ad9ecf43b11afd664e4c94608f8118.html Any help (as always) will be much appreciated plausibly!!! Andy Quote
Administrators PlausiblyDamp Posted October 16, 2003 Administrators Posted October 16, 2003 Looks like the snippet of code they gave was refering to a larger project. In fact i found this (http://forums.aspfree.com/archive/11/2003/08/4/18238) which seems to explain a bit more of where it came from. the following may be useful though http://www.codeproject.com/useritems/rolesbasedauthentication.asp http://www.microsoft.com/mspress/books/sampchap/6501.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dwamish7/html/vtconRole-BasedSecurity.asp Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.