• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 152
  • Last Modified:

SQL data access via Service Account from ASP.NET


I am writing a WCF service to access a stored procedure in SQL 2000.
I am unable to make it possible since VS2010 does not support SQL 2000.
I tried SQLMetal Builder to build the LINQ2SQL context, but no use.
So finally, i am writing a web service in VS2008.
I am able to access the Stored Procedure via SQL Authentication.
But i have a service account which i should be using to run the web service under to access the stored procedure.

How can i do that?
Any advice regarding VS2010 will be appreciated.

Thank You
1 Solution
kreddy01Author Commented:
help please
You have to grand access to the SQL server for your service account.
If the SQL Server and the WCF-Service are running on the same machine you can use a local account to do that.
SQL Server 2000 was a long time ago, but you somehow you will be able to manage to add some user account to the server.

If they are running on different machines you will need AD some account.
If the service is run under the service account you will have to do nothing at all regarding the connection to the SQL server.
Otherwise you will need to do some impersonate stuff around the call of the Stored procedure.

You can do that the "hard" way like that:
or like that

Here is a good article covering that toppic:

Hope that helps

Amandeep Singh BhullarCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now