473,322 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Porting a custom .net application to a new machine JIT errors

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.

Expand|Select|Wrap|Line Numbers
  1. ************** Exception Text **************
  2. 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)
  3.    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
  4.    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
  5.    at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
  6.    at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
  7.    at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
  8.    at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
  9.    at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
  10.    at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
  11.    at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
  12.    at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
  13.    at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
  14.    at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
  15.    at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
  16.    at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
  17.    at System.Data.SqlClient.SqlConnection.Open()
  18.    --- End of inner exception stack trace ---
  19.    at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
  20.    at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
  21.    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
  22.    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
  23.    at Microsoft.VisualBasic.CompilerServices.LateBinding.FastCall(Object o, MethodBase method, ParameterInfo[] Parameters, Object[] args, Type objType, IReflect objIReflect)
  24.    at Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn)
  25.    at Microsoft.VisualBasic.CompilerServices.LateBinding.LateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack)
  26.    at CustomLinenSolutions.claCustomLinenData.AddLoginInformation(Int64& lngUserLoginID, Int32 intAppType)
  27.    at CustomLinenSolutions.frmMain.frmMain_Load(Object sender, EventArgs e)
  28.    at System.Windows.Forms.Form.OnLoad(EventArgs e)
  29.    at System.Windows.Forms.Form.OnCreateControl()
  30.    at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
  31.    at System.Windows.Forms.Control.CreateControl()
  32.    at System.Windows.Forms.Control.WmShowWindow(Message& m)
  33.    at System.Windows.Forms.Control.WndProc(Message& m)
  34.    at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
  35.    at System.Windows.Forms.ContainerControl.WndProc(Message& m)
  36.    at System.Windows.Forms.Form.WmShowWindow(Message& m)
  37.    at System.Windows.Forms.Form.WndProc(Message& m)
  38.    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  39.    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  40.    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  41.  
  42.  
  43. ************** Loaded Assemblies **************
  44. mscorlib
  45.     Assembly Version: 2.0.0.0
  46.     Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
  47.     CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
  48. ----------------------------------------
  49. CustomLinenSolutions
  50.     Assembly Version: 4.7.2.0
  51.     Win32 Version: 4.7.2.0
  52.     CodeBase: file:///C:/Users/Sir%20Sicarius/Desktop/CLS%20Files/CustomLinenSolutions.exe
  53. ----------------------------------------
  54. System.Windows.Forms
  55.     Assembly Version: 2.0.0.0
  56.     Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
  57.     CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
  58. ----------------------------------------
  59. System
  60.     Assembly Version: 2.0.0.0
  61.     Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
  62.     CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
  63. ----------------------------------------
  64. System.Drawing
  65.     Assembly Version: 2.0.0.0
  66.     Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
  67.     CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
  68. ----------------------------------------
  69. Microsoft.VisualBasic
  70.     Assembly Version: 8.0.0.0
  71.     Win32 Version: 8.0.50727.4927 (NetFXspW7.050727-4900)
  72.     CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
  73. ----------------------------------------
  74. System.Data
  75.     Assembly Version: 2.0.0.0
  76.     Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
  77.     CodeBase: file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
  78. ----------------------------------------
  79. System.Configuration
  80.     Assembly Version: 2.0.0.0
  81.     Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
  82.     CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
  83. ----------------------------------------
  84. System.Xml
  85.     Assembly Version: 2.0.0.0
  86.     Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
  87.     CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
  88. ----------------------------------------
  89. System.Transactions
  90.     Assembly Version: 2.0.0.0
  91.     Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
  92.     CodeBase: file:///C:/Windows/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
  93. ----------------------------------------
  94. System.EnterpriseServices
  95.     Assembly Version: 2.0.0.0
  96.     Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
  97.     CodeBase: file:///C:/Windows/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
  98. ----------------------------------------
  99.  
************** 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."
Mar 20 '10 #1

✓ answered 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

5 1753
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?
Mar 20 '10 #2
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..
Mar 20 '10 #3
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
Mar 21 '10 #4
jkmyoung
2,057 Expert 2GB
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?
Mar 22 '10 #5
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.
Mar 22 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Chris Travers | last post by:
Hi all; A few years ago, I set about porting a PHP application from MySQL to PostgreSQL, after realizing that MySQL wasn't going to be able to handle it. In order to do this, I built a light,...
0
by: Rhys666 | last post by:
OK, an issue I've come across before, but never found a cause for or resolution of, has decided to become the bane of my life again with ASP.Net Custom Error Pages. Basically, my web application...
4
by: Pat | last post by:
In my Web.config i have :- <customErrors mode="On" defaultRedirect="genericerror.htm"> <error statusCode="404" redirect="pagenotfound.aspx"/> </customErrors to get page not found error but...
5
by: Graham | last post by:
I have created a custom MembershipProvider called "LassieMembershipProvider" that derives from "MembershipProvider". This providor is located in a Businesslogic layer dll called...
2
by: kramer.newsreader | last post by:
I am develoing a C# web application on a remote server. I have publish access to this server, but not permission to change configuration setting. When I try to load my page, I get the following...
2
by: TD | last post by:
I've read several posts here that say global variables are reset whenever an unhandled error occurs. I want to use a custom form property instead of a global variable to store a boolean value. My...
8
by: Mark A. Sam | last post by:
Hello I am working locally with Visual Web Developer 2005 Express. Before I even installed it, the information from Microsoft was that you could FTP it to a remote site and it should work. The...
0
by: Eniac | last post by:
Hello, I've started using Enterprise Library 2.0 recently and I've encountered a problem that seems to be ... well... undocumented :) Basically, when I set a Trace Listener (formatted event...
5
by: BK-Chicago | last post by:
I am in the midst of porting a massive MFC application from VS6.0 to VS8.0. While i have fixed most of the compile time errors, i do have quite a linker error that i have not been able to resolve....
5
by: shobhah | last post by:
Hi, We have a complete succsssfully working product on 32bit sparc solaris machine for which compiler used is CC 5.8 Now we are migarting our product from 32 bit to 64bit sparc solaris machine....
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.