SELECT permission denied...

Discussion in 'ASP .Net Security' started by Lastie, Oct 1, 2004.

  1. Lastie

    Lastie Guest

    Hi all,

    I’m an ASP developer but I just started to try and learn ASP.NET. I have
    the following code but it seems like I have a permissions problem.

    <%@ Page Language="VB" Debug="true" %>
    <%@ import namespace="System.Data" %>
    <%@ import namespace="System.Data.SqlClient" %>

    <%
    Dim connWebLinks As New SqlConnection("Data Source=(local);Initial
    Catalog=dbWebLinks;Integrated Security=SSPI")
    Dim Cmd As New SqlCommand("SELECT * FROM tblLinks", connWebLinks)
    connWebLinks.Open
    Dim myReader = Cmd.ExecuteReader()

    myReader.Close
    connWebLinks.Close
    %>

    I get this error:

    System.Data.SqlClient.SqlException: SELECT permission denied on object
    'tblLinks', database 'dbWebLinks', owner 'dbo'.

    I have added <computer name>\ASPNET to the ‘users’ for the database
    ‘dbWeblinks’ in SQL Server and given it all the permissions I can see, this
    includes SELECT on the table ‘tblWeblinks’.

    Can anyone help me?

    Thanks,

    Steve
     
    Lastie, Oct 1, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Goblin
    Replies:
    1
    Views:
    8,513
  2. Mr.KisS
    Replies:
    1
    Views:
    17,744
    Teemu Keiski
    Jul 9, 2004
  3. =?Utf-8?B?TGFzdGll?=

    SELECT permission denied...

    =?Utf-8?B?TGFzdGll?=, Oct 1, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    20,198
    =?Utf-8?B?TGFzdGll?=
    Oct 2, 2004
  4. Donald Adams

    ASPNET Select permission denied...

    Donald Adams, May 23, 2006, in forum: ASP .Net Security
    Replies:
    3
    Views:
    272
    Dominick Baier [DevelopMentor]
    May 23, 2006
  5. palmiere
    Replies:
    1
    Views:
    473
    Erwin Moller
    Feb 9, 2004
Loading...

Share This Page