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

SQL data access via Service Account from ASP.NET

Hello,

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
0
kreddy01
Asked:
kreddy01
1 Solution
 
kreddy01Author Commented:
help please
0
 
PryratesCommented:
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:
http://www.devtoolshed.com/content/impersonate-user-aspnet
or like that
http://www.codeproject.com/Articles/107940/Back-to-Basic-ASP-NET-Runtime-Impersonation

Here is a good article covering that toppic:
http://msdn.microsoft.com/en-us/library/ff647404.aspx

Hope that helps

0
 
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.
0

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