Advertise with us
Control Panel
Forum
Hosting Help
ASP.NET 4.5 & SQL 2012 Hosting
Resources
Notice
Login
Members
Shared Hosting
|
Upgrade
|
Advertise
|
Tutorials
|
Home
»
Questions & Answers
»
Problem with ConnectionString
Problem with ConnectionString
11 Mar, 12
Author:
Brian Dale Miranda
Help!
I have uploaded my database to the database folder, then attached it using the database manager.. I got this error User does not have permission to perform this action.
Here is my ConnectionString:
<connectionStrings>
<add name=ConnectionString connectionString=Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\AGMSI.mdf;Integrated Security=True;User Instance=True
providerName=System.Data.SqlClient />
<add name=AGMSIConnectionString connectionString=Data Source=.\sqlexpress;Initial Catalog=AGMSI;Integrated Security=True
providerName=System.Data.SqlClient />
<add name=MasterConnection connectionString=Data Source=.\sqlexpress;Integrated Security=True
providerName=System.Data.SqlClient />
</connectionStrings>
If i change the User Instance to fale, i get this error CREATE DATABASE permission denied in database 'master'.
An attempt to attach an auto-named database for file C:\MemberSites\MemberSites_AspSpider_Ws\bdcm26\webroot\App_Data\AGMSI.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Please help.. Many thanks in advance!
Answers .............
Author:
Nishanth Mohan
Posted Date: 12 Mar, 12
Read below links.
http://www.aspspider.com/tips/Tip18.aspx
http://www.aspspider.com/tips/Tip16.aspx
http://aspspider.info/smsmallu
Author:
gopal sharan prasad
niit dhanbad
Posted Date: 19 Mar, 12
For Connection String take the help of ConnectionString hyperlink provided by Database Manager after attaching the database.Only then u will be able to get the connection.None can directly refer .mdf file.
Author:
jones del kano
Posted Date: 21 Mar, 12
Read below links.
http://www.aspspider.com/tips/Tip18.aspx
http://www.aspspider.com/tips/Tip16.aspx
http://aspspider.info/smsmallu
>
Author:
Robert
Posted Date: 26 Mar, 12
http://aspspider.ws/robertnandy
JQueryMobile
Detach and attach the database again.
Below is my connection string and it worked perfect for me.
<add name=connectionstring connectionString=Data Source=.\SQLEXPRESS;Initial Catalog=robertnandy_PMIPAD2;INTEGRATED SECURITY=TRUE;Persist Security Info=True;/>
Author:
inder Singh
Posted Date: 05 May, 12
Add the following
<add name=ConnectionString connectionString=Data Source=
your database host name with port number; Initial Catalog=`Database name` Persist Security Info=True;User Id=`user id` Password=`password` providerName=System.Data.SqlClient />
And on the C# file do the following
string connStr = System.Configuration.ConfigurationManager.ConnectionStrings[ConnectionString ].ConnectionString;
It works for me .
You must
login
to post answer for this question.
Total
members
:
251041
Average new registrations per day (in last 7 days):
8
New Registration:
Open
Register Now
Talk to Webmaster
Tony John
Facebook
Google+
Twitter
Advertise
Privacy Policy
Terms of use
Contact Us
SpiderWorks Technologies Pvt Ltd.
All Rights Reserved.