SQL data access via Service Account from ASP.NET

Posted on 2011-10-21
Last Modified: 2012-05-12

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
Question by:kreddy01

    Author Comment

    help please
    LVL 13

    Accepted Solution

    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

    LVL 19

    Expert Comment

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

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now