Solved

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

Posted on 2013-06-05
2
285 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
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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

708 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now