Role provider not working with SQL Server Enterprise

I am getting the following error,

The user instance login flag is not supported on this version of SQL Server. The connection will be closed.

from the below line of code in my razor view(MVC5)

@if(Roles.IsUserInRole("User"){}

I have upgraded my database sql server from Express 2012 to Enterprise 2012 edition . After that I got above error. Since my application is EF code-first, database is created automatically but role provider doesn't seem to be working.

<add name="Foo" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=Foo_db;User ID=sa;Password=******" providerName="System.Data.SqlClient" />

Answers


Check out this thread. It should help.

http://forums.asp.net/t/1939748.aspx

I have tested this, User.IsInRole is now working for me. Make sure you have this in your Startup class


Did you remember to put the application name in your web config?

  <roleManager enabled="true">
   <providers>
      <clear />
        <add connectionStringName="ApplicationServices" 
             name="AspNetSqlRoleProvider"       
             type="System.Web.Security.SqlRoleProvider" 
             applicationName="DONT FORGET THIS PART" />
    </providers>
</roleManager>     

Need Your Help

How to pass data from one flex application to another?

flex

i have two flex applications and i want to pass the data from one application to another.Is there any way to do the same.Plz reply

get textNode of a elementNode of a web page via javascript

javascript html dom

In a web page,i want to get every visible text in a textnode.I don't want to put all the result into one array.I mean, when i meet a visible text, i will do something else.