Note that there are some explanatory texts on larger screens.

plurals
  1. POASP.NET MVC : Using the same database for Entity Framework and ASP.NET Membership
    primarykey
    data
    text
    <p>Im trying to user ASP.NET MVC3 with Entity Framework and ASP.NET Membership for authentication. I've set up an existing database as my application services database for membership.</p> <p>When i create the entity data model through the wizard it adds the following connection string to my web.config.</p> <pre><code>&lt;add name="DBEntities" connectionString="metadata=res://*/Models.DB.csdl|res://*/Models.DB.ssdl|res://*/Models.DB.msl;provider=System.Data.SqlClient;provider connection string=&amp;quot;Data Source=PM\SQLEXPRESS;Initial Catalog=DB;Integrated Security=True;MultipleActiveResultSets=True&amp;quot;" providerName="System.Data.EntityClient" /&gt; </code></pre> <p>I'm a noob so i don't really understand why but i tried using the same connection string for my membership provider and failed (probably because of this: providerName="System.Data.EntityClient" ?).</p> <p>So i added a separate connection string to the same database and used it for the membership provider. </p> <pre><code>&lt;add name="ApplicationServices" connectionString="Data Source=PM\SQLEXPRESS;Initial Catalog=DB;Integrated Security=True" providerName="System.Data.SqlClient"/&gt; </code></pre> <p>It works fine when i use ASP.NET configuration to add user and etc. But when i run the application and try to do something like validating a user i get an error;</p> <blockquote> <p>A transport-level error has occurred when receiving results from the server. (provider: Shared Memory Provider, error: 0 - The handle is invalid.)</p> </blockquote> <p>I made a guess this has something to do with my connection strings. I'm hoping some of you experts can help. Cheers.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload