Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object reference not set to an instance of an object
Message
From
07/06/2010 10:35:01
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
07/06/2010 09:57:30
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01467595
Message ID:
01467685
Views:
52
Hi Dan,

Is this business object assembly being used in a non MM application? The business objects need to access the data via the connection defined in the application configuration file and yes the factory is used. I am not sure what all would be needed to be able to do this without an mmApplication in the mix. I would be more inclined to create an mmApplication that uses a business object project and sent them that dll. This is what I do for WCF services is create a little mm application dll that access the mmWCF data. Then I can distribute that and it has the calls to the business objects along with all the needed mm app stuff included.

Tim

>I figured it might have something to do with the Factory. I followed the process of adding the app base and factory classes to the project as described in Help for the Windows Service project. Now I get the following error:
>
>
>System.Configuration.ConfigurationErrorsException was unhandled
>  Message="Configuration system failed to initialize"
>  Source="System.Configuration"
>  BareMessage="Configuration system failed to initialize"
>  Line=0
>  StackTrace:
>       at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
>       at System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName)
>       at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
>       at System.Configuration.ConfigurationManager.GetSection(String sectionName)
>       at System.Configuration.ConfigurationManager.get_AppSettings()
>       at OakLeaf.MM.Main.Managers.mmAppSettingsManager.GetSetting(String key, String defaultValue)
>       at OakLeaf.MM.Main.Managers.mmDatabaseManager..ctor()
>       at OakLeaf.MM.Main.Patterns.mmFactory.CreateDatabaseManager()
>       at OakLeaf.MM.Main.mmAppBase.get_DatabaseMgr()
>       at OakLeaf.MM.Main.Business.mmBusinessObject.GetDataAccessObject(String databaseKey)
>       at OakLeaf.MM.Main.Business.mmBusinessObject.FillDataSet(DataSet ds, String command, String tableName, String databaseKey, CommandType cmdType, IDbDataParameter[] dataParams)
>       at OakLeaf.MM.Main.Business.mmBusinessObjectGeneric`1.GetEntity(String command, String databaseKey, CommandType cmdType, IDbDataParameter[] dataParams)
>       at OakLeaf.MM.Main.Business.mmBusinessObjectGeneric`1.GetEntity(String command, String databaseKey, IDbDataParameter[] dataParams)
>       at OakLeaf.MM.Main.Business.mmBusinessObjectGeneric`1.GetEntity(String command, String databaseKey)
>       at OakLeaf.MM.Main.Business.mmBusinessObjectGeneric`1.GetEntity(String command)
>       at PIComponents.COSS.Data.WorkOrder.GetWorkOrderByJobNumber(String jobNumber)
>       at PIComponents.COSS.Data.COSSWorkOrder.GetWorkOrderInfo(String jobNumber)
>       at WindowsApplication1.Form1.Button1_Click(Object sender, EventArgs e) in C:\My Projects\COSSTest\WindowsApplication1\WindowsApplication1\Form1.vb:line 7
>       at System.Windows.Forms.Control.OnClick(EventArgs e)
>       at System.Windows.Forms.Button.OnClick(EventArgs e)
>       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
>       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.OnMessage(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 System.Windows.Forms.Application.Run(Form mainForm)
>       at WindowsApplication1.Main.Main() in C:\My Projects\COSSTest\WindowsApplication1\WindowsApplication1\Main.vb:line 11
>       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
>       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
>       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
>       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
>       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
>       at System.Threading.ThreadHelper.ThreadStart()
>
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform