ASP.NET web service does not connect with database in IIS7 -


when try publish asp.net web service application on iis7, application works perfect when debugging visual studio. but, when try access webservice iis typing on browser: http://localhost:port/service1.asmx , click on method , click "invoke" gives me error:

system.data.sqlclient.sqlexception: select permission denied on object 'marimi', database 'emagazin', schema 'dbo'.    @ system.data.sqlclient.sqlconnection.onerror(sqlexception exception, boolean breakconnection, action`1 wrapcloseinaction)    @ system.data.sqlclient.sqlinternalconnection.onerror(sqlexception exception, boolean breakconnection, action`1 wrapcloseinaction)    @ system.data.sqlclient.tdsparser.throwexceptionandwarning(tdsparserstateobject stateobj, boolean callerhasconnectionlock, boolean asyncclose)    @ system.data.sqlclient.tdsparser.tryrun(runbehavior runbehavior, sqlcommand cmdhandler, sqldatareader datastream, bulkcopysimpleresultset bulkcopyhandler, tdsparserstateobject stateobj, boolean& dataready)    @ system.data.sqlclient.sqldatareader.tryconsumemetadata()    @ system.data.sqlclient.sqldatareader.get_metadata()    @ system.data.sqlclient.sqlcommand.finishexecutereader(sqldatareader ds, runbehavior runbehavior, string resetoptionsstring)    @ system.data.sqlclient.sqlcommand.runexecutereadertds(commandbehavior cmdbehavior, runbehavior runbehavior, boolean returnstream, boolean async, int32 timeout, task& task, boolean asyncwrite)    @ system.data.sqlclient.sqlcommand.runexecutereader(commandbehavior cmdbehavior, runbehavior runbehavior, boolean returnstream, string method, taskcompletionsource`1 completion, int32 timeout, task& task, boolean asyncwrite)    @ system.data.sqlclient.sqlcommand.runexecutereader(commandbehavior cmdbehavior, runbehavior runbehavior, boolean returnstream, string method)    @ system.data.sqlclient.sqlcommand.executereader(commandbehavior behavior, string method)    @ system.data.sqlclient.sqlcommand.executereader()    @ webservice.service1.getmarime() in c:\users\eduard\desktop\mag_beta01\mag\webservice\service1.asmx.cs:line 741 

my connection database in web.config :

<connectionstrings>     <add name="connection" connectionstring="data source=eduard-pc\edd;initial catalog=emag; integrated security=true;" providername="system.data.sqlclient"/>   </connectionstrings> 

and use application pool asp.net v4.0 classic

i've searched solutions on google haven't found helpful.... thank in advance...

the application pool identity has no permissions on database: either not use integrated security, or create dedicated user appool has database permissions.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -