0

I am developing a Software that has a Database (I'm Using SQL Server 2008) and I want to deploy it on a Client Computer. So I created an Installer Using Visual Studio Installer project.

Everything runs fine on my computer (I tried installed it and tested it) but when I installed it on my client's computer, it gets the following error:

Date and Time:         9/27/2013 9:42:58 PM
Machine Name:          USER-PC
IP Address:            fe80::642b:46db:a6db:6be6%13
Current User:          user-PC\user

Application Domain:    Demeter2012.exe
Assembly Codebase:     file:///C:/Program Files/Konekthing/Demeter/Demeter2012.exe
Assembly Full Name:    Demeter2012, Version=2.0.0.0, Culture=neutral,PublicKeyToken=null
Assembly Version:      2.0.0.0
Assembly Build Date:   9/20/2013 7:49:52 PM

Exception Source:      .Net SqlClient Data Provider
Exception Type:        System.Data.SqlClient.SqlException
Exception Message:     
Exception Target Site: OnError

---- Stack Trace ----
System.Data.SqlClient.SqlInternalConnection.OnError(exception As SqlException,breakConnection As Boolean)
   Demeter2012.exe: N 00162
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
   Demeter2012.exe: N 00238
System.Data.SqlClient.TdsParser.Connect(serverInfo As ServerInfo, connHandler As SqlInternalConnectionTds, ignoreSniOpenTimeout As Boolean, timerExpire As Int64, encrypt As Boolean, trustServerCert As Boolean, integratedSecurity As Boolean)
   Demeter2012.exe: N 00315
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(serverInfo As ServerInfo, newPassword As String, ignoreSniOpenTimeout As Boolean, timeout As TimeoutTimer, owningObject As SqlConnection)
   Demeter2012.exe: N 00184
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(serverInfo As ServerInfo, newPassword As String, redirectedUserInstance As Boolean, owningObject As SqlConnection, connectionOptions As SqlConnectionString, timeout As TimeoutTimer)
   Demeter2012.exe: N 00312
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(owningObject As SqlConnection, timeout As TimeoutTimer, connectionOptions As SqlConnectionString, newPassword As String, redirectedUserInstance As Boolean)
   Demeter2012.exe: N 00200
System.Data.SqlClient.SqlInternalConnectionTds..ctor(identity As DbConnectionPoolIdentity, connectionOptions As SqlConnectionString, providerInfo As Object, newPassword As String, owningObject As SqlConnection, redirectedUserInstance As Boolean)
   Demeter2012.exe: N 00234
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(options As DbConnectionOptions, poolGroupProviderInfo As Object, pool As DbConnectionPool, owningConnection As DbConnection)
   Demeter2012.exe: N 00603
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(owningConnection As DbConnection, pool As DbConnectionPool, options As DbConnectionOptions)
   Demeter2012.exe: N 00031
System.Data.ProviderBase.DbConnectionPool.CreateObject(owningObject As DbConnection)
   Demeter2012.exe: N 00527
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(owningObject As DbConnection)
   Demeter2012.exe: N 00070
System.Data.ProviderBase.DbConnectionPool.GetConnection(owningObject As DbConnection)
   Demeter2012.exe: N 00471
System.Data.ProviderBase.DbConnectionFactory.GetConnection(owningConnection As DbConnection)
   Demeter2012.exe: N 00111
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(outerConnection As DbConnection, connectionFactory As DbConnectionFactory)
   Demeter2012.exe: N 00110
System.Data.SqlClient.SqlConnection.Open()
   Demeter2012.exe: N 00139
System.Data.Common.DbDataAdapter.FillInternal(dataset As DataSet, datatables As DataTable[], startRecord As Int32, maxRecords As Int32, srcTable As String, command As IDbCommand, behavior As CommandBehavior)
   Demeter2012.exe: N 00122
System.Data.Common.DbDataAdapter.Fill(dataTables As DataTable[], startRecord As Int32, maxRecords As Int32, command As IDbCommand, behavior As CommandBehavior)
   Demeter2012.exe: N 00164
System.Data.Common.DbDataAdapter.Fill(dataTable As DataTable)
   Demeter2012.exe: N 00113
Demeter2012.Model.DataSetTableAdapters.NodeTableAdapter.GetDataByActive()
   Demeter2012.exe: N 00100
Demeter2012.MonitorFunction.PopulateNodeId()
   Demeter2012.exe: N 00067
Demeter2012.MonitorFunction.PopulateNodeIDComboBoxes()
   Demeter2012.exe: N 00015
Demeter2012.MainWindow.Window_Loaded(sender As Object, e As RoutedEventArgs)
   Demeter2012.exe: N 00047
System.Windows.RoutedEventHandlerInfo.InvokeHandler(target As Object, routedEventArgs As RoutedEventArgs)
   Demeter2012.exe: N 00100
System.Windows.EventRoute.InvokeHandlersImpl(source As Object, args As RoutedEventArgs, reRaised As Boolean)
   Demeter2012.exe: N 00312
System.Windows.UIElement.RaiseEventImpl(sender As DependencyObject, args As RoutedEventArgs)
   Demeter2012.exe: N 00246
System.Windows.UIElement.RaiseEvent(e As RoutedEventArgs)
   Demeter2012.exe: N 00019
System.Windows.BroadcastEventHelper.BroadcastEvent(root As DependencyObject, routedEvent As RoutedEvent)
   Demeter2012.exe: N 00315
System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(root As Object)
   Demeter2012.exe: N 00144
MS.Internal.LoadedOrUnloadedOperation.DoWork()
   Demeter2012.exe: N 00021
System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
   Demeter2012.exe: N 00072
System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   Demeter2012.exe: N 00149
System.Windows.Media.MediaContext.RenderMessageHandlerCore(resizedCompositionTarget As Object)
   Demeter2012.exe: N 00138
System.Windows.Media.MediaContext.RenderMessageHandler(resizedCompositionTarget As Object)
   Demeter2012.exe: N 00139
System.Windows.Media.MediaContext.Resize(resizedCompositionTarget As ICompositionTarget)
   Demeter2012.exe: N 00059
System.Windows.Interop.HwndTarget.OnResize()
   Demeter2012.exe: N 00369
System.Windows.Interop.HwndTarget.HandleMessage(msg As WindowMessage, wparam As IntPtr, lparam As IntPtr)
   Demeter2012.exe: N 00865
System.Windows.Interop.HwndSource.HwndTargetFilterMessage(hwnd As IntPtr, msg As Int32, wParam As IntPtr, lParam As IntPtr, handled As Boolean&)
   Demeter2012.exe: N 00041
MS.Win32.HwndWrapper.WndProc(hwnd As IntPtr, msg As Int32, wParam As IntPtr, lParam As IntPtr, handled As Boolean&)
   Demeter2012.exe: N 00189
MS.Win32.HwndSubclass.DispatcherCallbackOperation(o As Object)
   Demeter2012.exe: N 00124
System.Windows.Threading.ExceptionWrapper.InternalRealCall(callback As Delegate, args As Object, numArgs As Int32)
   Demeter2012.exe: N 00082
MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(source As Object, method As Delegate, args As Object, numArgs As Int32, catchHandler As Delegate)
   Demeter2012.exe: N 00065
System.Windows.Threading.Dispatcher.InvokeImpl(priority As DispatcherPriority, timeout As TimeSpan, method As Delegate, args As Object, numArgs As Int32)
   Demeter2012.exe: N 00179
MS.Win32.HwndSubclass.SubclassWndProc(hwnd As IntPtr, msg As Int32, wParam As IntPtr, lParam As IntPtr)
   Demeter2012.exe: N 00259
MS.Win32.UnsafeNativeMethods.ShowWindow(hWnd As HandleRef, nCmdShow As Int32)
   Demeter2012.exe: N 00000
System.Windows.Window.ShowHelper(booleanBox As Object)
   Demeter2012.exe: N 00270
System.Windows.Window.Show()
   Demeter2012.exe: N 00061
Demeter2012.LogIn.btn_login_Click(sender As Object, e As RoutedEventArgs)
   Demeter2012.exe: N 00249
System.Windows.RoutedEventHandlerInfo.InvokeHandler(target As Object, routedEventArgs As RoutedEventArgs)
   Demeter2012.exe: N 00100
System.Windows.EventRoute.InvokeHandlersImpl(source As Object, args As RoutedEventArgs, reRaised As Boolean)
   Demeter2012.exe: N 00312
System.Windows.UIElement.RaiseEventImpl(sender As DependencyObject, args As RoutedEventArgs)
   Demeter2012.exe: N 00246
System.Windows.UIElement.RaiseEvent(e As RoutedEventArgs)
   Demeter2012.exe: N 00019
System.Windows.Controls.Primitives.ButtonBase.OnClick()
   Demeter2012.exe: N 00055
System.Windows.Controls.Button.OnClick()
   Demeter2012.exe: N 00079
System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(e As MouseButtonEventArgs)
   Demeter2012.exe: N 00157
System.Windows.UIElement.OnMouseLeftButtonUpThunk(sender As Object, e As MouseButtonEventArgs)
   Demeter2012.exe: N 00074
System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(genericHandler As Delegate, genericTarget As Object)
   Demeter2012.exe: N 00048
System.Windows.RoutedEventArgs.InvokeHandler(handler As Delegate, target As Object)
   Demeter2012.exe: N 00039
System.Windows.RoutedEventHandlerInfo.InvokeHandler(target As Object, routedEventArgs As RoutedEventArgs)
   Demeter2012.exe: N 00118
System.Windows.EventRoute.InvokeHandlersImpl(source As Object, args As RoutedEventArgs, reRaised As Boolean)
   Demeter2012.exe: N 00312
System.Windows.UIElement.ReRaiseEventAs(sender As DependencyObject, args As RoutedEventArgs, newEvent As RoutedEvent)
   Demeter2012.exe: N 00259
System.Windows.UIElement.OnMouseUpThunk(sender As Object, e As MouseButtonEventArgs)
   Demeter2012.exe: N 00177
System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(genericHandler As Delegate, genericTarget As Object)
   Demeter2012.exe: N 00048
System.Windows.RoutedEventArgs.InvokeHandler(handler As Delegate, target As Object)
   Demeter2012.exe: N 00039
System.Windows.RoutedEventHandlerInfo.InvokeHandler(target As Object, routedEventArgs As RoutedEventArgs)
   Demeter2012.exe: N 00118
System.Windows.EventRoute.InvokeHandlersImpl(source As Object, args As RoutedEventArgs, reRaised As Boolean)
   Demeter2012.exe: N 00312
System.Windows.UIElement.RaiseEventImpl(sender As DependencyObject, args As RoutedEventArgs)
   Demeter2012.exe: N 00246
System.Windows.UIElement.RaiseTrustedEvent(args As RoutedEventArgs)
   Demeter2012.exe: N 00060
System.Windows.Input.InputManager.ProcessStagingArea()
   Demeter2012.exe: N 00654
System.Windows.Input.InputManager.ProcessInput(input As InputEventArgs)
   Demeter2012.exe: N 00067
System.Windows.Input.InputProviderSite.ReportInput(inputReport As InputReport)
   Demeter2012.exe: N 00079
System.Windows.Interop.HwndMouseInputProvider.ReportInput(hwnd As IntPtr, mode As InputMode, timestamp As Int32, actions As RawMouseActions, x As Int32, y As Int32, wheel As Int32)
   Demeter2012.exe: N 00981
System.Windows.Interop.HwndMouseInputProvider.FilterMessage(hwnd As IntPtr, msg As WindowMessage, wParam As IntPtr, lParam As IntPtr, handled As Boolean&)
   Demeter2012.exe: N 01063
System.Windows.Interop.HwndSource.InputFilterMessage(hwnd As IntPtr, msg As Int32, wParam As IntPtr, lParam As IntPtr, handled As Boolean&)
   Demeter2012.exe: N 00109
MS.Win32.HwndWrapper.WndProc(hwnd As IntPtr, msg As Int32, wParam As IntPtr, lParam As IntPtr, handled As Boolean&)
   Demeter2012.exe: N 00189
MS.Win32.HwndSubclass.DispatcherCallbackOperation(o As Object)
   Demeter2012.exe: N 00124
System.Windows.Threading.ExceptionWrapper.InternalRealCall(callback As Delegate, args As Object, numArgs As Int32)
   Demeter2012.exe: N 00082
MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(source As Object, method As Delegate, args As Object, numArgs As Int32, catchHandler As Delegate)
   Demeter2012.exe: N 00065
System.Windows.Threading.Dispatcher.InvokeImpl(priority As DispatcherPriority, timeout As TimeSpan, method As Delegate, args As Object, numArgs As Int32)
   Demeter2012.exe: N 00179
MS.Win32.HwndSubclass.SubclassWndProc(hwnd As IntPtr, msg As Int32, wParam As IntPtr, lParam As IntPtr)
   Demeter2012.exe: N 00259
MS.Win32.UnsafeNativeMethods.DispatchMessage(msg As MSG&)
   Demeter2012.exe: N 00000
System.Windows.Threading.Dispatcher.PushFrameImpl(frame As DispatcherFrame)
   Demeter2012.exe: N 00192
System.Windows.Threading.Dispatcher.PushFrame(frame As DispatcherFrame)
   Demeter2012.exe: N 00072
System.Windows.Application.RunDispatcher(ignore As Object)
   Demeter2012.exe: N 00039
System.Windows.Application.RunInternal(window As Window)
   Demeter2012.exe: N 00291
System.Windows.Application.Run(window As Window)
   Demeter2012.exe: N 00040
Demeter2012.App.Main()
   Demeter2012.exe: N 00053

Since everyone asked, here I provide you my Connection string in my App.config file:

<?xml version="1.0"?>
   <configuration>
   <configSections>
   </configSections>
   <connectionStrings>
      <add name="Demeter2012.Properties.Settings.Demeter_DbConnectionString"
          connectionString="Data Source=MOHAMMADFAJARRI\SURROGATES;Initial Catalog=DB_Demeter;Persist Security Info=True;User ID=sa;Password=wsnadmin;"
        providerName="System.Data.SqlClient" />
   </connectionStrings>
   <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup></configuration>

A side note though : User-PC is my client computer's name, and MOHAMMADFAJARRI is my Computer's name. SURROGATES is the name of Server in SQL Server that stored the database DB_Demeter used by this application

Any suggestion on where did I do wrong?

Nadeem_MK
  • 7,533
  • 7
  • 50
  • 61
  • A very simple question. Do you have installed SQL Server on the client PC or configured the connection string to reach an existant SQL Server where is located your database? And no message in the exception? – Steve Sep 28 '13 at 09:27
  • Where is the SQL DB hosted? – Christian Phillips Sep 28 '13 at 09:28
  • @Steve I have installed the SQL Server and also configured the connection string, since It worked on my computer. Should I make a change to the connection string on my client's machine? – Mohammad Fajar Rizky Sep 28 '13 at 09:39
  • @christiandev the plan is to install the database with the application to the client's machine, is there a way for me to do this? – Mohammad Fajar Rizky Sep 28 '13 at 09:41
  • @MohammadFajarRizky yes you can deploy database with installer, You can use SMO to deploy database. – Kurubaran Sep 28 '13 at 09:44
  • It sounds like either the install hasn't worked or the connection string is incorrect – Christian Phillips Sep 28 '13 at 09:44
  • @christiandev to be honest I don't understand why this is happening, I followed the tutorial to make an installer with a database via the connection string. It worked fine on my computer, but it just don't work on my client's computer :( – Mohammad Fajar Rizky Sep 28 '13 at 09:50
  • @christiandev about the connection string, could you give me an example of a correct way of making it? – Mohammad Fajar Rizky Sep 28 '13 at 10:01

0 Answers0