Note that there are some explanatory texts on larger screens.

plurals
  1. POSimple Membership Configuration with default connection
    primarykey
    data
    text
    <p>how do you configure your MVC4 application to use an entity framework connection string which already exists to use for its default connection with conjunction with the simplemembership provider tables etc on <strong>an existing SQL server database</strong>. Im sure ive achieved this before but with a new internet template mvc4 solution i seem unable. i am configuring this line in InitializeSimpleMembershpAttiribute WebSecurity.InitializeDatabaseConnection("myEntitiesConnstring","mytable", "UserId", "full_name", autoCreateTables: true);</p> <p>I can get a combination of either</p> <p><strong>"Unable to find the requested .Net Framework Data Provider. It may not be installed.</strong> if i leave this section alone</p> <pre><code> &lt;entityFramework&gt; &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"&gt; &lt;parameters&gt; &lt;parameter value="v11.0" /&gt; &lt;/parameters&gt; &lt;/defaultConnectionFactory&gt; &lt;/entityFramework&gt; </code></pre> <p>or</p> <p><strong>Format of the initialization string does not conform to specification starting at index 0 with</strong></p> <pre><code>&lt;entityFramework&gt; &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"&gt; &lt;parameters&gt; &lt;parameter value="v11.0" /&gt; &lt;/parameters&gt; &lt;/defaultConnectionFactory&gt; &lt;/entityFramework&gt; </code></pre> <p>If i comment out the defaultconnectionlibrary i get.</p> <p><strong>A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)</strong></p> <p><em>This entityframework connection string is valid and does connect to the database correctly. In all the 3 above scenarios i get no activity however if i use sql profiler to trace the activity.</em></p> <p>(Connectionstring)</p> <pre><code> &lt;connectionStrings&gt; &lt;add name="myEntitiesConnstring" connectionString="metadata=res://*/Models.my_Model.csdl|res://*/Models.my_Model.ssdl|res://*/Models.my_Model.msl;provider=System.Data.SqlClient;provider connection string=&amp;quot;data source=.;initial catalog=mydb;persist security info=True;user id=sa;password=password;MultipleActiveResultSets=True;App=EntityFramework&amp;quot;" providerName="System.Data.EntityClient" /&gt; &lt;/connectionStrings&gt; </code></pre> <p>cheers tim p.s.<a href="http://weblogs.asp.net/jgalloway/archive/2012/08/29/simplemembership-membership-providers-universal-providers-and-the-new-asp-net-4-5-web-forms-and-asp-net-mvc-4-templates.aspx" rel="nofollow">Jon Galloway's article suggestions dont seem to be helping me</a></p>
    singulars
    1. This table or related slice is empty.
    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.
    1. This table or related slice is empty.
    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