Link to home
Start Free TrialLog in
Avatar of JoeBo747
JoeBo747

asked on

Service Logon Failure

Hi

I am trying to give a web service access to a sql 2008 database which is on the same domain but a different server to the one where the web service is located.
I have set up a user logon in the security node on the server tree and added a new user to the security node within the database node and mapped this to the Logon set up in the previous stage.
When I set the connection string in my web service settings tab to the user set up in the sql server the test connect passes but when the services attempts a connection via this connection I get:
Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Avatar of blandyuk
blandyuk
Flag of United Kingdom of Great Britain and Northern Ireland image

Can you please post your SQL connection string, (obviously blanking the password). If you using a trusted connection, it'll be trying to connect using the IIS IUSR_[machinename] user or ASPNET user.
Avatar of JoeBo747
JoeBo747

ASKER

Hi blandyuk

Thanks for your reply the connection string is below, I am not sure what the issue is should I be using a logon that is mapped to an NT AUTHORITY\NETWORK SERVICE account on  the server?
Regards
Joe
Data Source=sql1\;Initial Catalog=Transport_Comp1;Persist Security Info=True;User ID=LocationUser;Password=zxxxy
ASKER CERTIFIED SOLUTION
Avatar of blandyuk
blandyuk
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks for the assistance this worked.