Problems in running DAAB QuickStart of ETL 3.1

Topics: Data Access Application Block
Aug 14, 2007 at 3:55 AM
Edited Aug 14, 2007 at 3:58 AM
I have encountered 2 problems and I have resolved one.
1st problem:
In order to run the DAAB QuickStart, I have to change the server name in the App.config. I followed the instruction documented in the Introduction to the Data Access Application Block and used the Enterprise Library Configuration Console to change it. Well, this caused the error mentioned in this blog http://blogs.msdn.com/tomholl/archive/2007/04/19/avoiding-configuration-pitfalls-with-incompatible-copies-of-enterprise-library.aspx. I have fixed this issue by either setting the PublicKeyToken to null or editing the original app.config file with Configuration Editor.
2nd problem:
I got the following error when I click the View Walkthrough button. I'm running the QuickStart on a 64bit Windows XP machine. The error occurs at this statement Me.viewerProcess.Start().

System.ComponentModel.Win32Exception was unhandled
ErrorCode=-2147467259
Message="The system cannot find the file specified"
Source="System"
StackTrace:
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
at DataAccessQuickStart.QuickStartForm.viewWalkthroughButton_Click(Object sender, EventArgs e) in D:\EntLib3Src\Quick Starts\Copy of Data\VB\DataAccessQuickStart\QuickStartForm.vb:line 417
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd, Message& m)
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.GroupBox.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at DataAccessQuickStart.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Aug 14, 2007 at 12:54 PM
Hi,

About problem #1, you should be able to solve it without having to change the configuration file manually by setting the configuration set for the solution, as described in Tom's post.

#2 seems to be a problem with your VS installation. The QuickStart will attempt to launch the help explorer, and it relies on the CommonProgramFiles environment variable to be properly set. Please check this.

Regards,
Fernando
Aug 14, 2007 at 6:46 PM
Hi Fernando,

Can you explain about how to set CommonProgramFiles environment variable? I'm using VS2005 SP1 and I have no problem using help inside VS2005.

Microsoft Visual Studio 2005 version 8.0.50727.762 (SP .050727-7600)
Microsoft Document Explorer version 8.0.50727.762 SP
Microsoft .NET Framework version 2.0.50727
Microsoft Windows XP Professional x64 Edition Service Pack 2

Regards,
Peter
Aug 14, 2007 at 7:16 PM
Hi,

AFAIK it should have been set when you installed VS... The value is usually C:\Program Files\Common Files.

Fernando
Aug 14, 2007 at 7:45 PM
Hi Fernando.

I have resolved the issue by changing the coding in the function GetHelpViewExecutable of QuickStartForm.vb. The function is getting the value from CommonProgramFiles which has the value C:\Program Files\Common Files. However, the dexplore.exe is located in C:\Program Files (x86)\Common Files....I changed the function to get the value from CommonProgramFiles(x86).

If my environment variables are correct, anyone using the ETL in 64bit OS will hit the same problem.

Peter
Aug 14, 2007 at 7:52 PM
That's true. Good catch.

Thanks,
Fernando
Aug 14, 2007 at 8:29 PM
Hi Fernando,

Thanks for mentioning the CommonProgramFiles otherwise I will not able to resolve this since I'm new to .NET.


Peter
Aug 14, 2007 at 8:40 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.