Solved

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

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

690 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