Control Panel
Forum
Hosting Help
ASP.NET 4 & SQL 2008 R2 Hosting
Resources
Notice
Login
Members
Shared Hosting
|
Upgrade
|
Advertise
|
Tutorials
|
AdSense revenue sharing sites
|
Exam 70-680 Practice Tests
|
Silverlight games
Total
members
:
210364
Average new registrations per day (in last 7 days):
16
New Registration:
Open
Register Now
Home
»
Questions & Answers
»
System.Data.SqlClient.SqlException: User does not have perm...
System.Data.SqlClient.SqlException: User does not have permission to perform this action.
8/30/2010
Author:
rava rava
hey everyone I'm doing a school project it works fine on the VWD 2008 express and when I try to open a page that uses the DB on the aspspider this error comes up: System.Data.SqlClient.SqlException: User does not have permission to perform this action.
I've been searching the net for days and can't find a solution does anyone have an idea???
this is my connection string from the web.config:
<add name=UsersConnectionString1 connectionString=Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Users.mdf;Integrated Security=True;User Instance=True providerName=System.Data.SqlClient/>
thanx for ur time :)
Answers .............
Author:
Ahmed Talu
Posted Date: 8/30/2010
*************************************************
rava rava
Your connection string is wrong. First of all, you are not allowed to run USER INSTANCE of SQL Server at ASPSPIDER. Second, you must not include file extension (.mdf) for SQL databases in the connection string. If your database is called Users.mdf then your connection string will be:
"Data Source=.\SQLExpress;Persist Security Info=True;Integrated Security=SSPI;Initial Catalog=biuproj_Users"
I suggest you first test the SQL connection using *.aspx to simply retrieve some records from a database. Do not waste time trying to get login etc to work before you have verified that your connection is working.
*************************************************
Please look at this thread
http://www.aspspider.com/qa/Question4220.aspx
and check that you've put the SQL database in the correct folder.
The domain you are using (aspspider.ws) have SQL Server 2005 Express installed. SQL Server 2008 Express is currently only installed at:
aspspider.biz
aspspider.net
aspspider.org
(there are some posts in in this forum related to this matter).
*************************************************
Posts by ASPSPIDER regarding SQL and MS ACCESS databases:
http://www.aspspider.com/tips/Tip18.aspx
http://www.aspspider.com/tips/Tip16.aspx
http://www.aspspider.com/tips/Tip15.aspx
*************************************************
Author:
rava rava
Posted Date: 8/31/2010
thank you so much :)
Author:
Lance Parcero
Posted Date: 9/9/2010
THANKS!
Author:
chaleune pierre
Posted Date: 5/9/2011
Hi all,
I'm doing learn ASP MVC and it work fine for fine with VS2010. When i try an page with data, i have the same problem than rava.
following link :
http://aspspider.ws/askme/Home/AskmeParametrageCodePays
Here
is the connectingstring in the web config before change :
<add name=ApplicationServices connectionString=data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true providerName=System.Data.SqlClient/>
<add name=AskmeDBConnectionString connectionString=Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\AskmeDB.mdf;Integrated Security=True;User Instance=True providerName=System.Data.SqlClient/>
<add name=AskmeDBEntities connectionString=metadata=res://*/Models.CodePaysDBModel.csdl|res://*/Models.CodePaysDBModel.ssdl|res://*/Models.CodePaysDBModel.msl;provider=System.Data.SqlClient;provider connection string="data source=.\SQLEXPRESS;attachdbfilename=|DataDirectory|\AskmeDB.mdf;integrated security=True;user instance=True;multipleactiveresultsets=True;App=EntityFramework" providerName=System.Data.EntityClient/>
<add name=CodePaysDBEntities connectionString=metadata=res://*/Models.CodePaysDBModel.csdl|res://*/Models.CodePaysDBModel.ssdl|res://*/Models.CodePaysDBModel.msl;provider=System.Data.SqlClient;provider connection string="data source=.\SQLEXPRESS;attachdbfilename=|DataDirectory|\AskmeDB.mdf;integrated security=True;user instance=True;multipleactiveresultsets=True;App=EntityFramework" providerName=System.Data.EntityClient/>
After changing
<connectionStrings>
<add name=ApplicationServices connectionString=data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true providerName=System.Data.SqlClient/>
<add name=AskmeDBConnectionString connectionString=Data Source=.\SQLExpress;Persist Security Info=True;Integrated Security=SSPI;Initial Catalog=askme_AskmeDB providerName=System.Data.SqlClient/>
<add name=AskmeDBEntities connectionString=metadata=res://*/Models.CodePaysDBModel.csdl|res://*/Models.CodePaysDBModel.ssdl|res://*/Models.CodePaysDBModel.msl;provider=System.Data.SqlClient;provider connection string="data source=.\SQLEXPRESS;attachdbfilename=|DataDirectory|\AskmeDB.mdf;integrated security=True;user instance=True;multipleactiveresultsets=True;App=EntityFramework" providerName=System.Data.EntityClient/>
<add name=CodePaysDBEntities connectionString=metadata=res://*/Models.CodePaysDBModel.csdl|res://*/Models.CodePaysDBModel.ssdl|res://*/Models.CodePaysDBModel.msl;provider=System.Data.SqlClient;provider connection string="data source=.\SQLEXPRESS;attachdbfilename=|DataDirectory|\AskmeDB.mdf;integrated security=True;user instance=True;multipleactiveresultsets=True;App=EntityFramework" providerName=System.Data.EntityClient/>
</connectionStrings>
Ps : I did not change the first line yet. I'll do the user acces later.
Author:
chaleune pierre
Posted Date: 5/9/2011
Hi all,
I'm doing learn ASP MVC and it work fine for fine with VS2010. When i try an page with data, i have the same problem than rava.
following link :
http://aspspider.ws/askme/Home/AskmeParametrageCodePays
Here
is the connectingstring in the web config before change :
<add name=ApplicationServices connectionString=data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true providerName=System.Data.SqlClient/>
<add name=AskmeDBConnectionString connectionString=Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\AskmeDB.mdf;Integrated Security=True;User Instance=True providerName=System.Data.SqlClient/>
<add name=AskmeDBEntities connectionString=metadata=res://*/Models.CodePaysDBModel.csdl|res://*/Models.CodePaysDBModel.ssdl|res://*/Models.CodePaysDBModel.msl;provider=System.Data.SqlClient;provider connection string="data source=.\SQLEXPRESS;attachdbfilename=|DataDirectory|\AskmeDB.mdf;integrated security=True;user instance=True;multipleactiveresultsets=True;App=EntityFramework" providerName=System.Data.EntityClient/>
<add name=CodePaysDBEntities connectionString=metadata=res://*/Models.CodePaysDBModel.csdl|res://*/Models.CodePaysDBModel.ssdl|res://*/Models.CodePaysDBModel.msl;provider=System.Data.SqlClient;provider connection string="data source=.\SQLEXPRESS;attachdbfilename=|DataDirectory|\AskmeDB.mdf;integrated security=True;user instance=True;multipleactiveresultsets=True;App=EntityFramework" providerName=System.Data.EntityClient/>
After changing
<connectionStrings>
<add name=ApplicationServices connectionString=data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true providerName=System.Data.SqlClient/>
<add name=AskmeDBConnectionString connectionString=Data Source=.\SQLExpress;Persist Security Info=True;Integrated Security=SSPI;Initial Catalog=askme_AskmeDB providerName=System.Data.SqlClient/>
<add name=AskmeDBEntities connectionString=metadata=res://*/Models.CodePaysDBModel.csdl|res://*/Models.CodePaysDBModel.ssdl|res://*/Models.CodePaysDBModel.msl;provider=System.Data.SqlClient;provider connection string="data source=.\SQLEXPRESS;attachdbfilename=|DataDirectory|\AskmeDB.mdf;integrated security=True;user instance=True;multipleactiveresultsets=True;App=EntityFramework" providerName=System.Data.EntityClient/>
<add name=CodePaysDBEntities connectionString=metadata=res://*/Models.CodePaysDBModel.csdl|res://*/Models.CodePaysDBModel.ssdl|res://*/Models.CodePaysDBModel.msl;provider=System.Data.SqlClient;provider connection string="data source=.\SQLEXPRESS;attachdbfilename=|DataDirectory|\AskmeDB.mdf;integrated security=True;user instance=True;multipleactiveresultsets=True;App=EntityFramework" providerName=System.Data.EntityClient/>
</connectionStrings>
Ps : I did not change the first line yet. I'll do the user acces later.
You must
login
to post answer for this question.
Advertise
Privacy Policy
Terms of use
Contact Us
SpiderWorks Technologies Pvt Ltd.
All Rights Reserved.