Database Tracelistener issues on server

Topics: Logging Application Block
Apr 26, 2007 at 1:56 PM
Hi Everyone,

My logging application block works absolutely fine on my local machine.
But when I move that onto server, I'm getting this error

System.Configuration.ConfigurationErrorsException: The entry 'connString' has already been added. (E:\RemoteLoggingWebService\web.config line 57)
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.GetSection(String configKey, Boolean getLkg, Boolean checkPermission)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String configKey)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)

Can anyone help me out please?

With regards,
Apr 26, 2007 at 9:02 PM
The error implies you have two definitions of the same connection string. Assuming you've checked that you don't have duplicate definitions in your main web.config file, some other options are that it may be defined in machine.config or in a parent or child web.config file. Also check that you have a "web application" defined in IIS for your web root - if not, ASP.NET may be merging your web.config with other ones that are not meant to be a part of the same application.

Apr 30, 2007 at 5:45 PM
Edited Apr 30, 2007 at 6:00 PM
Thank you very much for your reply.
Problem was that ASP.NET was merging web.config with other file.

With regards,
Apr 30, 2007 at 6:00 PM

I changed the name of the connection string.
When I execute the code it is not giving me any errors but values are not being written into the database.

Can you help me out please?

With regards,
Apr 30, 2007 at 9:18 PM
Edited May 1, 2007 at 12:25 PM
check your event log you may find the problem in the properties description. My isssue is the WriteLog stored proc is expecting @Category parameter and it is not receiving this. Anyone willing to offer some advice would be greatly appreciated.
The AddCategory stored proc is returning a string, but I am not sure why it is not passing it into the Write Log stored proc.

I discovered why my values were not writing to the database. the WriteLog stored proc should not be inserting the Category value. the AddCategory stored proc takes care of the Category with an update