StrataFrame Forum

Database connection problems

http://forum.strataframe.net/Topic17428.aspx

By Jeff Pagley - 6/27/2008

Hi SF Team,

This morning we installed some Web application templates we got from you below.

first i did this one....
 
 
then i did this one
 

Now I get the following error occurs (stack trace below) when executing my application SFSPreferencesBO.RetrieveSecurityPreferences() in the AppMain module.  Please help.  I am unable to continue to develop until I get this resolved.

Thanks! 

The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception.
Exception (TypeInitializationException): Source="System.Data"; Target=null; Tag=null; TypeName="System.Data.SqlClient.SqlConnection";
Message = "The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception."
InnerException (TypeInitializationException): Source="System.Data"; Target=null; Tag=null;
Message = "The type initializer for 'System.Data.SqlClient.SqlConnectionFactory' threw an exception."
StackTrace = " at System.Data.SqlClient.SqlConnection..cctor()"
InnerException (TypeInitializationException): Source="System.Data"; Target=null; Tag=null;
Message = "The type initializer for 'System.Data.SqlClient.SqlPerformanceCounters' threw an exception."
StackTrace =
" at System.Data.SqlClient.SqlConnectionFactory..ctor()
at System.Data.SqlClient.SqlConnectionFactory..cctor()"
InnerException (ConfigurationErrorsException): Source="System.Configuration"; Target=null; Tag=null; Line=21;
Message =
"The value of the property 'traceOutputOptions' cannot be parsed. The error is: The enumeration value must be one of the following: None, LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId, Callstack. (C:\Documents and
Settings\JPagley\Desktop\Projects\CMPR\bin\Debug\CMPR.vshost.exe.config line 21)"
StackTrace =
" at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)
at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean ch... (truncated) ...olean checkPermission)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName)
at System.Diagnostics.DiagnosticsConfiguration.GetConfigSection()
at System.Diagnostics.DiagnosticsConfiguration.Initialize()
at System.Diagnostics.Switch.InitializeConfigSettings()
at System.Diagnostics.Switch.InitializeWithStatus()
at System.Diagnostics.Switch.get_SwitchSetting()
at System.Diagnostics.TraceSwitch.get_Level()
at System.Data.ProviderBase.DbConnectionPoolCounters..ctor(String categoryName, String categoryHelp)
at System.Data.SqlClient.SqlPerformanceCounters..ctor()
at System.Data.SqlClient.SqlPerformanceCounters..cctor()"
BareMessage = "The value of the property 'traceOutputOptions' cannot be parsed. The error is: The enumeration value must be one of the following: None, LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId, Callstack."
Filename = "C:\Documents and Settings\JPagley\Desktop\Projects\CMPR\bin\Debug\CMPR.vshost.exe.config"
Errors (ConfigurationException[]): Length=1; Rank=1; Count=1;
#0 (ConfigurationErrorsException): Source=null; Target=null; Tag=null; StackTrace=null; BareMessage=(->BareMessage); Filename=(->Filename); Line=21;
Message =
"The value of the property 'traceOutputOptions' cannot be parsed. The error is: The enumeration value must be one of the following: None, LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId, Callstack. (C:\Documents and
Settings\JPagley\Desktop\Projects\CMPR\bin\Debug\CMPR.vshost.exe.config line 21)"
Errors (ConfigurationException[]): Length=1; Rank=1; Count=1;
#0 (ConfigurationErrorsException): Source=null; Target=null; Tag=null; StackTrace=null; BareMessage=(->BareMessage); Filename=(->Filename); Line=21;
Message =
"The value of the property 'traceOutputOptions' cannot be parsed. The error is: The enumeration value must be one of the following: None, LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId, Callstack. (C:\Documents and
Settings\JPagley\Desktop\Projects\CMPR\bin\Debug\CMPR.vshost.exe.config line 21)"
Errors (ConfigurationException[]): Length=1; Rank=1; Count=1;
#0 (ConfigurationErrorsException): Source=null; Target=null; Tag=null; StackTrace=null; BareMessage=(->BareMessage); Filename=(->Filename); Line=21;
Message =
"The value of the property 'traceOutputOptions' cannot be parsed. The error is: The enumeration value must be one of the following: None, LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId, Callstack. (C:\Documents and
Settings\JPagley\Desktop\Projects\CMPR\bin\Debug\CMPR.vshost.exe.config line 21)"
Errors (ConfigurationException[]): Length=1; Rank=1; Count=1;
#0 (ConfigurationErrorsException): Source=null; Target=null; Tag=null; StackTrace=null; BareMessage=(->BareMessage); Filename=(->Filename); Line=21;
Message =
"The value of the property 'traceOutputOptions' cannot be parsed. The error is: The enumeration value must be one of the following: None, LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId, Callstack. (C:\Documents and
Settings\JPagley\Desktop\Projects\CMPR\bin\Debug\CMPR.vshost.exe.config line 21)"
Errors (ConfigurationException[]): Length=1; Rank=1; Count=1;
#0 (ConfigurationErrorsException): Source=null; Target=null; Tag=null; StackTrace=null; BareMessage=(->BareMessage); Filename=(->Filename); Line=21;
Message =
"The value of the property 'traceOutputOptions' cannot be parsed. The error is: The enumeration value must be one of the following: None, LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId, Callstack. (C:\Documents and
Settings\JPagley\Desktop\Projects\CMPR\bin\Debug\CMPR.vshost.exe.config line 21)"
Errors (ConfigurationException[]): Length=1; Rank=1; Count=1;
#0 (ConfigurationErrorsException): Source=null; Target=null; Tag=null; StackTrace=null; BareMessage=(->BareMessage); Filename=(->Filename); Line=21;
Message =
"The value of the property 'traceOutputOptions' cannot be parsed. The error is: The enumeration value must be one of the following: None, LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId, Callstack. (C:\Documents and
Settings\JPagley\Desktop\Projects\CMPR\bin\Debug\CMPR.vshost.exe.config line 21)"
Errors (ConfigurationException[]): Length=1; Rank=1; Count=1;
#0 (ConfigurationErrorsException): Source=null; Target=null; Tag=null; StackTrace=null; BareMessage=(->BareMessage); Filename=(->Filename); Line=21;
Message =
"The value of the property 'traceOutputOptions' cannot be parsed. The error is: The enumeration value must be one of the following: None, LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId, Callstack. (C:\Documents and
Settings\JPagley\Desktop\Projects\CMPR\bin\Debug\CMPR.vshost.exe.config line 21)"
Errors (ConfigurationException[]): Length=1; Rank=1; Count=1;
#0 (ConfigurationErrorsException): Source=null; Target=null; Tag=null; StackTrace=null; BareMessage=(->BareMessage); Filename=(->Filename); Line=21;
Message =
"The value of the property 'traceOutputOptions' cannot be parsed. The error is: The enumeration value must be one of the following: None, LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId, Callstack. (C:\Documents and
Settings\JPagley\Desktop\Projects\CMPR\bin\Debug\CMPR.vshost.exe.config line 21)"
Errors (ConfigurationException[]): Length=1; Rank=1; Count=1;
#0 =
{System.Configuration.ConfigurationErrorsException: The value of the property 'traceOutputOptions' cannot be parsed. The error is: The enumeration value must be one of the following: None, LogicalOperationStack, DateTime, Timestamp, ProcessId,
ThreadId, Callstack. (C:\Documents and Settings\JPagley\Desktop\Projects\CMPR\bin\Debug\CMPR.vshost.exe.config line 21) ---> UJ.ExceptionManagement.Classes.EmsInnerException: (This is EmsInnerException helper object)
--- End of inner exception stack trace ---}
Values = System.Configuration.ConfigurationException[]
Values = System.Configuration.ConfigurationException[]
Values = System.Configuration.ConfigurationException[]
Values = System.Configuration.ConfigurationException[]
Values = System.Configuration.ConfigurationException[]
Values = System.Configuration.ConfigurationException[]
Values = System.Configuration.ConfigurationException[]
Values = System.Configuration.ConfigurationException[]
Values = System.Configuration.ConfigurationException[]
TypeName = "System.Data.SqlClient.SqlPerformanceCounters"
TypeName = "System.Data.SqlClient.SqlConnectionFactory"
Environment: ThreadIdentity="" DateTime=["2008-06-27 13:02:08.709"] ThreadName=null WindowsIdentity="STRUSS\JPagley" ThreadId="10" DomainName="CMPR.vshost.exe" OSVersion=["Microsoft Windows NT 5.1.2600 Service Pack 3"] MachineName="1LPJPAGLEY"
UserName="JPagley"
Remaining Stack Trace - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
at System.Data.SqlClient.SqlConnection..ctor()
at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
at MicroFour.StrataFrame.Data.SqlDataSourceItem.CreateBlankDbConnection()
at MicroFour.StrataFrame.Data.DbDataSourceItem.GetDataTable(DbCommand Command, OnChangeEventHandler CallBack)
at MicroFour.StrataFrame.Data.SqlDataSourceItem.GetDataTable(DbCommand Command, OnChangeEventHandler CallBack)
at MicroFour.StrataFrame.Data.DataLayer.GetDataTable(DbCommand Command, Boolean RegisterNotification)
at MicroFour.StrataFrame.Business.BusinessLayer.FillDataTable(DbCommand CommandToExecute)
at MicroFour.StrataFrame.Security.BusinessObjects.SFSUsersBO.FillByUserName(String UserName)
at MicroFour.StrataFrame.Security.Login.AuthenticateUser(String Username, String Password, String Domain, SFSUsersBO& User)
at MicroFour.StrataFrame.Security.Login.AttemptLogin(Object sender, EventArgs e)
at CMPR.LoginForm.OnAttemptLogin() in C:\Documents and Settings\JPagley\Desktop\Projects\CMPR\Forms\LoginForm.vb:line 30
at CMPR.LoginForm.cmdOk_Click(Object sender, EventArgs e) in C:\Documents and Settings\JPagley\Desktop\Projects\CMPR\Forms\LoginForm.vb:line 285
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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Comments:
EMS warning: maximum number of iterations reached when processing objects.

By StarkMike - 6/27/2008

Hey Guys, I think I fixed it. I googled the "type initializer" and the System.Data.SqlClient.SqlConnection exception and it talked about invalid entries in the app.config file... so I just deleted the app.config file in the root folder of the project and the vshost.config file in the bin\debug folder... so far it works...
By Trent L. Taylor - 6/27/2008

That just allows you to setup web projects versus web sites.  One thing I would recommend is loading the 1.6.6 beta build also as there were some template fixes for the web project solutions.  However, if you already have your solution created and working, then it wouldn't really buy you anything.  Just a little food for thought.
By StarkMike - 6/27/2008

Thanks for the reply! I weary about installing a BETA build on our development machines... lol
By Trent L. Taylor - 6/27/2008

I understand...FWIW, this is a supported build and we actually use this ourselves in the field already.  We use ourselves as guinea pigs before our users.  So though this is still a beta, it is supported and I know that we already have a lot of other developers using it...and it has been really quiet, so I am pretty confident in the build.