|
-
Sep 8th, 2011, 02:52 PM
#3
Re: A network-related or instance-specific error occurred while establishing a connec
 Originally Posted by sapator
Hi.
The web site administration tool,that i believe is the asp.net tool you use will probably create your database as a file in the App_Data as you are writing here.
Is this what you want or do you want to put the database in an sql server on the published machine?
If you want the file on the App_Data then your connectionstring on web.config would look somehting like this:
Code:
</configSections>
<connectionStrings>
<add name="DatabaseConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
If you want the data in an sql server then it will look like this:
Code:
<connectionStrings>
<add name="SqlServerConnectionStringTest" connectionString="Data Source=MY-SQLSRV\;Initial Catalog=Database2;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
Sap,
That sounds like what I need, but I'm not sure where to use the connection string. I can't figure out where the web tool sets this data. Somewhere, it has to have a connection string like this, so it knows where to pull the data from, but I can't find it.
Any ideas?
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|