Re: Error : "SELECT permission denied on object"

From: Teemu Keiski (joteke_at_aspalliance.com)
Date: 07/09/04


Date: Fri, 9 Jul 2004 10:18:40 +0300

Hi,

could it be this issue mentioned on beta's readme.

"
4.12. SQL Server Express installation does not provide access permission
for the ASP.NET worker process account nor for non-administrators.

The SQL Server Express installation does not grant access to the ASP.NET
worker process identity (ASPNET on Windows 2000 and Windows XP; NETWORK
SERVICE on Windows Server 2003), nor to non-Administrators on the local
machine. As a result, filesystem Web applications will run under the Visual
Web Developer Web Server for users who are not Administrators, and all IIS
Web applications cause permission denied errors at runtime. This is a known
limitation of Web applications that access SQL Server Express databases in
this release.

To resolve this issue

Workarounds for this issue are listed below. However, neither workaround is
recommended on machines that have network connections, since the workarounds
expose serious security holes.

For filesystem Web applications (i.e., Web applications that run under the
Visual Web Developer Web Server): Add the current user to the Administrator
group on the local machine.

For IIS Web applications: Add the ASP.NET worker process identity (ASPNET or
NETWORK SERVICE) to the Administrator group on the local machine.

SQL Server 2000 databases will work for both types of web applications
provided they have been configured correctly to provide access either to the
ASP.NET worker process identity or the current user (or both).
"

-- 
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
"Mr.KisS" <anonymous@discussions.microsoft.com> wrote in message
news:2955901c46543$10a6d640$a501280a@phx.gbl...
> Hi,
>
> In my aspx page i use a stocked procedure and in this
> procedure, there is a SELECT query. And whene the aspx page
> calls the procedure i get this exception :
>
> System.Data.SqlClient.SqlException: SELECT permission
> denied on object 'users', database 'wizou', schema 'dbo'.
>
> So, i must give the authorisation to ASPNET to use SELECT
> queries but, i'm on SQL 2005 and there isn't Enterprise
> Manager. How to make it with SQLCMD?
>
> Thanks all :)


Relevant Pages

  • Re: Database for .NET Windows, PPC, and elsewhere?
    ... > with web applications. ... Replication is necessary. ... > I could go the SQL Server way, and it would certainly work, but it has ... with ADOCE on the PPC. ...
    (microsoft.public.dotnet.general)
  • Re: SQL Server 2005 - getting Bruteforced
    ... The SQL Server is running on an Internet Server with ASP.NET v2 remotely. ... We are testing several Web Applications there with a Remote Team. ... The ASP.NET Applications are using SQL Authentication instead of Windows ... Here's an example ADO.NET connection string using integrated security. ...
    (microsoft.public.sqlserver.security)
  • Re: SQL Server 2005 - getting Bruteforced
    ... We are testing several Web Applications there with a Remote Team. ... The ASP.NET Applications are using SQL Authentication instead of Windows Authentication. ... Also you can move SQL Server off of port 1433, and change your connection strings accordingly. ...
    (microsoft.public.sqlserver.security)
  • table and class
    ... in my web application (as quite all web applications) i have a lot of ... (integrating javascript and css) ... or should i mix javascript "classes" and PHP classes? ... PostgreSQL 8.2.4 / MS SQL server 2005 ...
    (php.general)
  • RE: Login failed for user (null).
    ... used at signon to authenticate in SQL Server. ... connect the remote SQL Server database), is there any other data accessing ... What's the security identity used to access the remote SQL Server, ... the worker process identity. ...
    (microsoft.public.dotnet.framework.aspnet.security)