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.

LVL 1
JoeBo747Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

blandyukCommented:
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.
JoeBo747Author Commented:
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
blandyukCommented:
mmm, your specifying the user directly so it should be ok. Try the below as your connection string:

Server=sql1; Database=Transport_Comp1; Uid=LocationUser; Pwd=the_pass;

Also, try logging onto the SQL Server Management Studio with the user specified above in your connection string. If it fails, your login is incorrect.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JoeBo747Author Commented:
thanks for the assistance this worked.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.