Solved

Error: The SELECT permission was denied on the object...

Posted on 2013-06-05
2
294 Views
Last Modified: 2013-07-17
Hi

I've had this problem before and I got around it by adding 'NT AUTHORITY / NETWORK SERVICE' as a Login then creating a user on the DB and mapped it to that login.  However, I'm now using SQL Server 2012 (Express) and I don't see a way of mapping a user to a login.  Anyway, by what I've been reading, it may just be a problem with the user in my connection string which is:
<add name="MyConnectionString" connectionString="Data Source=USER-PC\SQLEXPRESS;Initial Catalog=UKPR;Integrated Security=True"
   providerName="System.Data.SqlClient" />
When I run a query in SQL Server to find out who the owner of the DB I'm trying to access is, it says 'USER-PC/USER' so what is wrong and what else do I need to do to grant SELECT, UPDATE etc permissions on my DB??
0
Comment
Question by:Lorna70
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 19

Accepted Solution

by:
Rimvis earned 250 total points
ID: 39221744
Hi Lorna70,

Are you running ASP.NET web site? what is the IIS version?

You need to check under what user account application pool is running. If it's under ApplicationPoolIdentity, you might try this solution:
http://paigecsharp.blogspot.co.uk/2012/05/iis-application-pool-identity-access-to.html

BTW, I think it's a bad idea to give database access to Network Service account. You should use dedicated account for that.
0
 

Author Comment

by:Lorna70
ID: 39222154
Thanks - yes it's an ASP.Net website - I'm using Web Developer 2010 Express on a Windows 7 (not server) pc so I didn't think I needed to go near IIS (I hate IIS as it's really different now and I can't find anything). Will look at your link though and see if I can solve this.  Also, I have several other websites on my pc which are connected no problem to the Databases and I didn't have to change anything in IIS - this is why I think it is a SQL Server login/user issue.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question