| | | Join Date: Mar 2010
Posts: 3
| |
Hello bytes community!
My friend is in a bit of a situation and i've been trying to help him for a while now. He runs a business to where someone coded a .NET 1.1 program that connects to a SQL server in order to saves all it database information. The issue is that I can't move that program over because I don't know what it requires in order to run on another computer. He bought the program long ago from a college grad and that student is no longer available for assistance.
He's not worried about the information getting moved over as long as we can get the program moved one his old Windows 2000 Desktop to a newer computer with Windows 7.
If i copy the program directly to a another computer and run it, I can have it run, however, it continuously get exceptions due to what I think is it trying to connect to a SQL server that isn't there. Unfortunately though, I'm not entirely sure that is the case... I was wondering if someone can help tell me find out how it needs the SQL server to run (or what database it calls for) so that I can get it running on a new computer as soon as possible. (I am also wiling to send copies of the program as necessary for any help on this would be greatly appreciated.)
The current error I receive when im running it on a new computer is the following:
"See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box. -
************** Exception Text **************
-
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlClient.SqlException: 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)
-
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
-
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
-
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
-
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
-
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
-
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
-
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
-
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
-
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
-
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
-
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
-
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
-
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
-
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
-
at System.Data.SqlClient.SqlConnection.Open()
-
--- End of inner exception stack trace ---
-
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
-
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
-
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
-
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
-
at Microsoft.VisualBasic.CompilerServices.LateBinding.FastCall(Object o, MethodBase method, ParameterInfo[] Parameters, Object[] args, Type objType, IReflect objIReflect)
-
at Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn)
-
at Microsoft.VisualBasic.CompilerServices.LateBinding.LateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack)
-
at CustomLinenSolutions.claCustomLinenData.AddLoginInformation(Int64& lngUserLoginID, Int32 intAppType)
-
at CustomLinenSolutions.frmMain.frmMain_Load(Object sender, EventArgs e)
-
at System.Windows.Forms.Form.OnLoad(EventArgs e)
-
at System.Windows.Forms.Form.OnCreateControl()
-
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
-
at System.Windows.Forms.Control.CreateControl()
-
at System.Windows.Forms.Control.WmShowWindow(Message& m)
-
at System.Windows.Forms.Control.WndProc(Message& m)
-
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
-
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
-
at System.Windows.Forms.Form.WmShowWindow(Message& m)
-
at System.Windows.Forms.Form.WndProc(Message& m)
-
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
-
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
-
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
-
-
-
************** Loaded Assemblies **************
-
mscorlib
-
Assembly Version: 2.0.0.0
-
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
-
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
-
----------------------------------------
-
CustomLinenSolutions
-
Assembly Version: 4.7.2.0
-
Win32 Version: 4.7.2.0
-
CodeBase: file:///C:/Users/Sir%20Sicarius/Desktop/CLS%20Files/CustomLinenSolutions.exe
-
----------------------------------------
-
System.Windows.Forms
-
Assembly Version: 2.0.0.0
-
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
-
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
-
----------------------------------------
-
System
-
Assembly Version: 2.0.0.0
-
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
-
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
-
----------------------------------------
-
System.Drawing
-
Assembly Version: 2.0.0.0
-
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
-
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
-
----------------------------------------
-
Microsoft.VisualBasic
-
Assembly Version: 8.0.0.0
-
Win32 Version: 8.0.50727.4927 (NetFXspW7.050727-4900)
-
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
-
----------------------------------------
-
System.Data
-
Assembly Version: 2.0.0.0
-
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
-
CodeBase: file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
-
----------------------------------------
-
System.Configuration
-
Assembly Version: 2.0.0.0
-
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
-
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
-
----------------------------------------
-
System.Xml
-
Assembly Version: 2.0.0.0
-
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
-
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
-
----------------------------------------
-
System.Transactions
-
Assembly Version: 2.0.0.0
-
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
-
CodeBase: file:///C:/Windows/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
-
----------------------------------------
-
System.EnterpriseServices
-
Assembly Version: 2.0.0.0
-
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
-
CodeBase: file:///C:/Windows/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
-
----------------------------------------
-
************** 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.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box."
| |
best answer - posted by regalis |
Hmmm...
I think you should look if there is a configurationfile where the databasename, tables, user, password and IP stands in there.
If no config is available maybe check the Databases the App is working with and try to rebuild them on the new Computer.(But i don't know if that is a good(working) solution, because i'm no Database expert :D)
greetz regalis
| | | | Join Date: Mar 2010 Location: Germany
Posts: 9
| | | re: Porting a custom .net application to a new machine JIT errors
System.Data.SqlClient.SqlException: 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)
The SQLServer is not accessible....
No network connection to Server?
No access rights on the Server?
Do you have the source code of the program or just the executable?
| | | | Join Date: Mar 2010
Posts: 3
| | | re: Porting a custom .net application to a new machine JIT errors
I have just the executable, i do not have the source. I am willing to do what I can to help but I have no idea where to start..
I put the program on a new computer, and installed MS SQL server express 2005 to see if it would work, but again i'm not entirely sure where to begin. Let me know if there is anything else I can include...
Thank you for you reply though..
| | | | Join Date: Mar 2010 Location: Germany
Posts: 9
| | | re: Porting a custom .net application to a new machine JIT errors
Hmmm...
I think you should look if there is a configurationfile where the databasename, tables, user, password and IP stands in there.
If no config is available maybe check the Databases the App is working with and try to rebuild them on the new Computer.(But i don't know if that is a good(working) solution, because i'm no Database expert :D)
greetz regalis
|  | | | Join Date: Mar 2006
Posts: 1,938
| | | re: Porting a custom .net application to a new machine JIT errors
Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
Was this program running on a single computer before, or was it connecting to another database server on the network?
Have you setup the SQL server to allow remote connections?
| | | | Join Date: Mar 2010
Posts: 3
| | | re: Porting a custom .net application to a new machine JIT errors
Guys, thank you all for the help. I recently got with a programmer to help him rewrite the code and found out it was due to the SQL using named pipes. It was only running on a single computer, so right now, im making an image of it using VMware and loading it onto another computer temporarily until i have this programmer rewrite it.
Thanks again for all of the replies and assistance everyone!!!!
You guys are awesome.
|  | | | |