I installed Dotconnect PostgreSql with folowing this tutorial http://ift.tt/1h8NCef All works fine, but when I call Admin role from View.cshtml with this operation : @(User.IsInRole("admin")) { } , after that showing error as
"Operation is not Supported"
But Rolemanager was enabled in web.config
Showing Exception that :
An exception of type 'System.InvalidOperationException' occurred in Devart.Data.PostgreSql.Web.dll but was not handled in user code
Additional information: Operation is not supported
Code:
<roleManager defaultProvider="PgSqlExtendedRoleProvider" enabled="true" cacheRolesInCookie="true" cookieName=".ASPROLES" cookieTimeout="30" cookiePath="/" cookieProtection="All">
<providers>
<add name="PgSqlExtendedRoleProvider" type="Devart.Data.PostgreSql.Web.Providers.PgSqlExtendedRoleProvider, Devart.Data.PostgreSql.Web, Version=7.3.457.5, Culture=neutral, PublicKeyToken=09af7300eec23701" description="dotConnect for PostgreSQL extended role provider" connectionStringName="DefaultConnection"/>
</providers>
</roleManager>
Quick watch showing : false.
Why is this function throwing an exception? How can I fix it ?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire