SQl Server Permission prob in asp.net ap

T

Tina

I'm using SS2005 Developer edition with an ASP.Net 2.0 application, testing
in VS 2005.....

I have created two TableAdapters that reside in my App_Code directory that
were created with the new Data Set Designer. They both access that same
database but one uses a stored procedure and the other uses a SQL Query.

In SQL Server Management Studio all tables and all SPs are prefixed with
dbo.

The TableAdapter that uses the stored procedure works find but the one that
uses the Query gets the following error: SELECT permission denied on object
'TableName', database 'DatabaseName', schema 'dbo'.

The query that fails works fine in the vs 2005 development environment. I
figure it must have something to do with the ASPNET user and I notice that
this is my only database that has a MACHINENAME/ASPNET user (but the other
DBs get accessed just fine without it)

Help!!
T
 
A

Andrew Morton

Tina said:
I'm using SS2005 Developer edition with an ASP.Net 2.0 application,
testing in VS 2005.....

I have created two TableAdapters that reside in my App_Code directory
that were created with the new Data Set Designer. They both access
that same database but one uses a stored procedure and the other uses
a SQL Query.

In SQL Server Management Studio all tables and all SPs are prefixed
with dbo.

The TableAdapter that uses the stored procedure works find but the
one that uses the Query gets the following error: SELECT permission
denied on object 'TableName', database 'DatabaseName', schema 'dbo'.

The query that fails works fine in the vs 2005 development
environment. I figure it must have something to do with the ASPNET
user and I notice that this is my only database that has a
MACHINENAME/ASPNET user

Using ASP.NET on Windows 2003, you need to give the NETWORK SERVICE user
appropriate permissions in the DB, or whatever account w3p.exe runs in .
(Yes, there is a space in the name of that user which can be a nuisance
when trying to enter it.)
(but the other DBs get accessed just fine without it)

But are they being accessed by the asp.net worker process (w3p.exe)?

Andrew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top