By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,948 Members | 1,585 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,948 IT Pros & Developers. It's quick & easy.

ASP.NET webforms cannot exec stored procs

P: n/a
Hi,

I have a Winforms application that access some SQLServer2000 stored
procedures.

I have now written some new Webforms pages to use some of the same stored
procs. The Webforms use the SAME data access classes (all of my business
logic and data access classes are in DLLs that are shared between the
Winforms and Webforms).

The Winforms are all ok, but the Webforms give me the following error when I
try to access the database through stored procs:

Execute access is denied to stored procedure "GetParts" in database
"Lcc" for owner "dbo"

The WinForms and WebForms all use the same db connection string:
<add key="connection_string" value="Server=(local);Database=lcc;Integrated
Security=True"/>

I guess it is an access rights problem, but what is the best way to resolve
it?

Do the Webforms connect as a different user?

Thanks,

Paul
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Paul R wrote:
Execute access is denied to stored procedure "GetParts" in database
"Lcc" for owner "dbo"

The WinForms and WebForms all use the same db connection string:
<add key="connection_string" value="Server=(local);Database=lcc;Integrated
Security=True"/>

I guess it is an access rights problem, but what is the best way to
resolve it?

Do the Webforms connect as a different user?


Though it depends on the setup of the web server and ASP.NET, the ASP.NET
code usually runs under a dedicated ASP.NET user. So you can either give
that user access to the stored procedures or you can change the setup of
the web server and ASP.NET, so that the ASP.NET code impersonates the
user who is sitting behind the web browser. Disable Anonymous access for the
folder/page in IIS and enable impersonation in web.config to do so.
Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.