Author: ren33 | Posted on: 10/18/2010 7:38:31 AM | Views : 214

Hello, I have an ASP.NET webforms website that uses the .NET MySql connector and MySql as a back-end. I'm using role-based authentication to protect certain areas of my site. The problem is that the user's role information is not being persisted after I move my site to the server (works fine on my local development machine). What is happening is that I can login using the logincontrol which directs me to the admin page after authenticating the user. At this point User.IsInRole("admin") is true.  But when I click one of the links to go to a different area of the admin section User.IsInRole("admin") is false. Below are the relevant sections of my code:
Web.config --------------------------------------------------


<membership defaultProvider="MySqlMembershipProvider" userIsOnlineTimeWindow="15"> <providers> <remove name="MySQLMembershipProvider" ...

Go to the complete details ...