Link to home
Start Free TrialLog in
Avatar of Lorna70
Lorna70

asked on

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

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??
ASKER CERTIFIED SOLUTION
Avatar of Rimvis
Rimvis
Flag of Lithuania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Lorna70
Lorna70

ASKER

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.