sql server 2008 - The underlying provider failed to open , login failed for user IIS APPPOOL -


i not sql server guy working on client's application , want connect database through ef code first

the exception message have is

the underlying provider failed open

the exception details

cannot open database [databasename] requested login. login failed

login failed user 'iis apppool\asp.net v4.0"

my web config

<add name="trainingodb"     providername="system.data.sqlclient"     connectionstring="server=localpcname\sqlexpress;database=[databasename];integrated security=true;"/> 

the ef context , entities defined in separate project app config of following

<?xml version="1.0" encoding="utf-8"?> <configuration>   <configsections>     <!-- more information on entity framework configuration, visit http://go.microsoft.com/fwlink/?linkid=237468 -->     <section name="entityframework" type="system.data.entity.internal.configfile.entityframeworksection, entityframework, version=4.3.1.0, culture=neutral, publickeytoken=b77a5c561934e089" />   </configsections>   <entityframework>     <defaultconnectionfactory type="system.data.entity.infrastructure.sqlconnectionfactory, entityframework">       <parameters>         <parameter value="data source=(localdb)\v11.0; integrated security=true; multipleactiveresultsets=true" />       </parameters>     </defaultconnectionfactory>   </entityframework> </configuration> 

i using sql server express 2008

don't know problem database configration or web config

the user under web application pool (associated web application) running doesn't have permissions access database. need grant permissions or run under user has permissions. so, summarize: check under user application pool running, check that user has access database.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -