Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

  • Administrators
Posted

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

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...