Posted on: 10/17/2015 6:16:33 PM | Views : 1227

Hi folks, I'm using MS 2013,
it using something called Identity for membership, my code is not working correctly I keep getting the following error at  
var user = Membership.GetUser(username); An exception of type 'System.Data.SqlClient.SqlException' occurred in System.Web.dll but was not handled in user code
The whole code
private void IsUserAdmin() { string username = Page.User.Identity.Name; var user = Membership.GetUser(username); Guid userID = new Guid(user.ProviderUserKey.ToString()); { TyrescannerWebApp.IdentityModel.TyreScannerEntities dbcontext = new TyrescannerWebApp.IdentityModel.TyreScannerEntities(); var query = from p in dbcontext.Link_OrderProduct ...

Go to the complete details ...