Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

Move asp.net identity database connect string?

$
0
0

Is it possible to move the database connection string that asp.net identity uses, from web application project to another project (DAL)?

My employer is nervous about keeping it in the website for security reasons. Even if the connection string is encrypted.  Currently, all of our database connections are behind the firewall in our application server. 

Does anyone have examples of this with a multi-tier project architecture? 

I moved the identity model and identity config files to another project (class library) and tried editing the app.config to look like below, but it didn't work.  I'm using sql server 2014. 

<configuration> 
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="Data Source=databasename; Initial Catalog=catalog; Integrated Security=True; MultipleActiveResultSets=True" />
      </parameters>
    </defaultConnectionFactory>
    <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>
  </entityFramework>


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>