Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 25, 2012 07:13 AM by sebastianh
Feb 24, 2012 07:07 PM|LINK
Hi, I would like to request the authenticated user and I cannot find in webpages security how to retrieve that information. the code that I´trying to recreate is something like:
if (WebSecurity.IsAuthenticated && WebSecurity.HasUserId)
but of course I receive an error... additionally does anyone knows if webmatrix creates an authentication cookie?, if yes does anyone knows how to retrieve that we proceed with formsauthentication.formscookiename, brgds!
Feb 24, 2012 11:03 PM|LINK
If you want to retrieve user informations you should use the following WebSecurity properties:
For more informations on WebSecurity see at
On cookies and formsauthentication maybe these links could help you:
Using FormsAuthentication in ASP.NET WebPages
Feb 25, 2012 01:59 AM|LINK
Hi Gregori, thank you so much. so it seems that formsauthentication works with webpages.. I´m confused on that topic based on the fact that webmatrix.webdata has no relation with system.web.security where formsauthentication resides... consequently I supposed
using webmatrix security works in a different way... I will try it... brgds
Feb 25, 2012 06:45 AM|LINK
I´m confused on that topic based on the fact that webmatrix.webdata has no relation with system.web.security
That's not a fact. The WebSecurity class, SimpleMembershipProvider, ExtendedMembershipProvider and SimpleRoleProvider all reference System.Web.Security.
Feb 25, 2012 07:13 AM|LINK
Hi Mike, thanks for the clarification... yes you are right... I realized with your comment that simplemembership is implement extendedmembership which extends system.web.security... good to know, thank you so much!.
public class SimpleMembershipProvider :