0
Then mention with path.
Note : The same path should be present in client place aslo.
0
Are you using sql server or mdf
?
0
Just provide your database name
0
Database Name or Database Location ?
0
Hi Methoun,
In configuration file, you have missed to mention your database name in initial catelog. PLease mention your database name there.
0
HI Methoun,
Please add some screen shots
0
Now show the error
Additional information: Configuration system failed to initialize
0
Change your sql connection code also,
App.config.cs
<configuration> <connectionStrings> <add name="Test" connectionString="Data Source=yourservername;Initial Catalog=yourdatabasename;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings> </configuration>
In reference Add - > System.configuration
In Page,
using system.configurations;
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionString["Test"].toString());
0
Still now show thats error bro
0
HI Methoun,
What is your issue in that?
0
<configuration><connectionStrings><add name="Test" connectionString="Data Source=.;Initial Catalog=D:\MESMANAGEMENT\MESMANAGEMENT\DATABASE\MESMANAGEMENT.MDF;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings> </configuration> ????????????
0
HI Methoun,
You just move your connection string in to app.config file.Once you move it and get the connection string from app.config. While you deploying your application in client environment, the app.config file will be editable. you change the server name in that.
Please refer app.config for connection string,
<configuration> <connectionStrings> <add name="Test" connectionString="Data Source=.;Initial Catalog=OmidPayamak;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings> </configuration>