Hi, we need to check the connection information, how are you connecting. Its obvious that different information/user is taken one is going thru and other is complaining.
Add the user ASPNET user to the SQL Server, and add it as a user to the database, with appropriate permissions.
If this answered your question, be sure to mark it as the answer. Then you give credit to people who help you, and others will know that the question is already answered.
My SQL Server blog (swedish): http://www.underlandet.com/SqlServer
Marked as answer by Bo Chen – MSFT on Apr 22, 2008 10:08 AM
I did what u said, still not working !!!!!!! the problem is that when i run from VS2005 it works fine ..but when i make an alias and run it through local host directly it doesn't work !!!!???
I did what u said, still not working !!!!!!! the problem is that when i run from VS2005 it works fine ..but when i make an alias and run it through local host directly it doesn't work !!!!???
So, after you have add the asp.net working process account (generally speaking aspnet in xp box and network service in a server box) into your sql server permission list, you still cannot access the database. Do I understand you right? If yes, I think then
you need to check if you have set "immpersonate" in your asp.net authentication configuration (in web.config, check if this tag <identity immpersonate="true"> exist). If yes, you need to make sure that the login account which asp.net immersonated has accutall
got the permission right to access your db.
Hope my suggestion helps
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Marked as answer by Bo Chen – MSFT on Apr 22, 2008 10:05 AM
majd_wadi
Member
513 Points
225 Posts
The SELECT permission was denied on the object '', database '', schema 'dbo'.
Apr 15, 2008 08:59 PM|LINK
hay there...
i'm developing a website using visual studio 2005, when i run it from VS it works fine and it can access the DB.
but when i make an alias and run it directly from localhost ..i keep getting this message when i try to fill a DATASET ..
can anyone help me ?thanx
~Please mark as answer if this helps u~
vishalbade
Participant
1126 Points
187 Posts
Re: The SELECT permission was denied on the object '', database '', schema 'dbo'.
Apr 15, 2008 09:12 PM|LINK
Hi, we need to check the connection information, how are you connecting. Its obvious that different information/user is taken one is going thru and other is complaining.
Could you let us know about ur connection string.
stanley310
Member
250 Points
36 Posts
Re: The SELECT permission was denied on the object '', database '', schema 'dbo'.
Apr 15, 2008 09:26 PM|LINK
try to run the following though sql management studio (replace tblYourTableName with your table name)
majd_wadi
Member
513 Points
225 Posts
Re: The SELECT permission was denied on the object '', database '', schema 'dbo'.
Apr 16, 2008 11:11 AM|LINK
hi again, thx 4 reply.
this is the connection string ...i haven't made any users attached to the DB or anything ..
connectionString="Data Source=MAJD\SQLEXPRESS;Initial Catalog=MobileStudentPortal;Integrated Security=True"
~Please mark as answer if this helps u~
BlogPortalis...
Contributor
2451 Points
345 Posts
Re: The SELECT permission was denied on the object '', database '', schema 'dbo'.
Apr 16, 2008 11:19 AM|LINK
Add the user ASPNET user to the SQL Server, and add it as a user to the database, with appropriate permissions.
My SQL Server blog (swedish): http://www.underlandet.com/SqlServer
virendra1983
Contributor
3257 Points
653 Posts
Re: The SELECT permission was denied on the object '', database '', schema 'dbo'.
Apr 16, 2008 11:23 AM|LINK
Hi,
I fixed the error by assigning the default schema for the database to DBO.
eg: Login to SQL using SA > Security > User > select username > properties
Make sure that 'Users = username' & 'Schema = DBO'
majd_wadi
Member
513 Points
225 Posts
Re: The SELECT permission was denied on the object '', database '', schema 'dbo'.
Apr 17, 2008 08:17 PM|LINK
how can i login to SQL as SA ?
i'm SQL management studio ..please explain me how !
~Please mark as answer if this helps u~
virendra1983
Contributor
3257 Points
653 Posts
Re: The SELECT permission was denied on the object '', database '', schema 'dbo'.
Apr 18, 2008 04:18 AM|LINK
You can login using windows authentication also.
majd_wadi
Member
513 Points
225 Posts
Re: The SELECT permission was denied on the object '', database '', schema 'dbo'.
Apr 19, 2008 06:13 PM|LINK
~Please mark as answer if this helps u~
Bo Chen – MS...
All-Star
17706 Points
1389 Posts
Re: The SELECT permission was denied on the object '', database '', schema 'dbo'.
Apr 21, 2008 02:20 AM|LINK
Hi majd_wadi ,
So, after you have add the asp.net working process account (generally speaking aspnet in xp box and network service in a server box) into your sql server permission list, you still cannot access the database. Do I understand you right? If yes, I think then you need to check if you have set "immpersonate" in your asp.net authentication configuration (in web.config, check if this tag <identity immpersonate="true"> exist). If yes, you need to make sure that the login account which asp.net immersonated has accutall got the permission right to access your db.
Hope my suggestion helps