Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi developers and programmers,

i was create a phone book software with c#
i was create a database with Visual Studio 2012
and i was conneted with LINQ Classes [LINQ to SQL Classes]

when i use in my computer , my software is perfect for working
but when i use in another computers , they have get something error

i was edited app.config

from :

[code]

<configuration>
<configsections>

<connectionstrings>
<add name="test.Properties.Settings.testingConnectionString">
connectionString="Data Source=(localdb)\Projects;Initial Catalog=test-db;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="test.Properties.Settings.testingConnectionString1">
connectionString="Data Source=(localdb)\Projects;Initial Catalog=test-db;Integrated Security=True"
providerName="System.Data.SqlClient" />


[/code]

to

[code]

<configuration>
<configsections>

<connectionstrings>
<add name="test.Properties.Settings.testingConnectionString">
connectionString="Data Source=|DataDirectory|;Initial Catalog=test-db;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="test.Properties.Settings.testingConnectionString1">
connectionString="Data Source=|DataDirectory|;Initial Catalog=test-db;Integrated Security=True"
providerName="System.Data.SqlClient" />


[/code]


Screen shot and error messages :

[img]http://s1.picofile.com/file/7906626769/Capture.png[/img]

[code]
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.


************** Exception Text **************
System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) ---> System.ComponentModel.Win32Exception (0x80004005): The network path was not found
.....


************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

...........
[/code]


please help me , thanks
Posted

If you think that your connection string is perfect and it has no issue and it works properly on your system then you should look at the LINQ code which is using the connection-string for connection to the database. Sometimes, it hard-code the connection string due to which the application stops working on other systems. If there is still nothing wrong, then you can use the remote-debugger to debug your code to get to know what is going wrong. Remote debugger comes with visual studio.
 
Share this answer
 
Hi Ram,

Please look into Your Solution[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900