473,385 Members | 1,357 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

ASP.NET webforms cannot exec stored procs

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
1 1700
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ken | last post by:
Hello, I have a webform that gets a record from SQL Server by using a stored procedure. The stored procedure uses 3 parameters in which after the record is found, stored procedure #2 runs to...
0
by: CR | last post by:
To check out stored procs that are under VSS control via my client machine using .NET, I believe I need to change the Options - Database Tools - Server Explorer - STored Procedures - Enable Version...
7
by: trint | last post by:
My boss wants me to use stored procedures, but I thought somehow that using c# that ADO.Net was better. Any help is appreciated. Thanks, Trint
3
by: Peter Afonin | last post by:
Hello, Our SQL server used to run under System account, and I had no problems executing DTS packages from the ASP.NET: Dim oPkg As DTS.Package oPkg = CreateObject("DTS.Package")...
2
by: Ken | last post by:
Hello, I have a webform that gets a record from SQL Server by using a stored procedure. The stored procedure uses 3 parameters in which after the record is found, stored procedure #2 runs to...
45
by: John | last post by:
Hi When developing vb.bet winform apps bound to sql server datasource, is it preferable to use SELECTs or stored procedure to read and write data from/to SQL Server? Why? Thanks Regards
1
by: kentk | last post by:
Is there a difference in how SQL Server 7 and SQL 2000 processes SQL passed from a program by an ADO command object. Reason I ask is I rewrote a couple applications a couple years ago were the SQL...
15
by: Burt | last post by:
I'm a stored proc guy, but a lot of people at my company use inline sql in their apps, sometimes putting the sql in a text file, sometimes hardcoding it. They don't see much benefit from procs, and...
8
by: Frank Calahan | last post by:
I've been looking at LINQ and it seems very nice to be able to make queries in code, but I use stored procs for efficiency. If LINQ to SQL only works with SQL Server and stored procs are more...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.