rickarde 0 Newbie Poster

Hi

I'm into deep (at least that's what it feels like) trouble

Short background:

I'm calling a COM+ component from an ASP and I get an error when doing so.
I'm using Win XP Sp3, .NET framework 1.1, EntLib 1.1 (rebuilt w strong names = ok) and a local SQL Server wich is to be called by the COM+.

Having struggled to get some info about the error from the COM+ I finally get some logging into the event log and I've nailed down the source of the main problem now.

the code that's generates the exception is:

db = DatabaseFactory.CreateDatabase(DB_INSTANCE_MYDB);

where DB_INSTANCE_MYDB is the string 'DataAccessLO-Filter' which should corespond to one of the connection strings in dataConfiguration.config file seen below

<?xml version="1.0" encoding="utf-8"?>
<dataConfiguration>
  <xmlSerializerSection type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=1.1.0.0, Culture=neutral, PublicKeyToken=23C723BBFF21D6C1">
    <enterpriseLibrary.databaseSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" defaultInstance="DataAccessLO-Filter" xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/data">
      <databaseTypes>
        <databaseType name="Sql Server" type="Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase, Microsoft.Practices.EnterpriseLibrary.Data, Version=1.1.0.0, Culture=neutral, PublicKeyToken=23C723BBFF21D6C1" />
      </databaseTypes>
      <instances>
        <instance name="DataAccessLOAI" type="Sql Server" connectionString="LOAI" />
        <instance name="DataAccessLO-Filter" type="Sql Server" connectionString="LeadsOnline-Filter" />
      </instances>
      <connectionStrings>
        <connectionString name="LeadsOnline-Filter">
          <parameters>
            <parameter name="database" value="db_leadsonline" isSensitive="false" />
            <parameter name="Password" value="filter_buss-service" isSensitive="true" />
            <parameter name="server" value="Z9303833" isSensitive="false" />
            <parameter name="User ID" value="filter_buss-service" isSensitive="false" />
          </parameters>
        </connectionString>
        <connectionString name="LOAI">
          <parameters>
            <parameter name="database" value="lo_alpha_integration" isSensitive="false" />
            <parameter name="password" value="int_leadsonline" isSensitive="true" />
            <parameter name="server" value="Z9303833" isSensitive="false" />
            <parameter name="user id" value="int_leadsonline" isSensitive="false" />
          </parameters>
        </connectionString>
      </connectionStrings>
    </enterpriseLibrary.databaseSettings>
  </xmlSerializerSection>
</dataConfiguration>

So in the event log i get the following output when logging the exception:

Exception in LeadCandidateHandler.processCandidate: msg=Unknown Error (-1)., Stacktrace:    at System.IO.__Error.WinIOError(Int32 errorCode, String str)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at System.CodeDom.Compiler.CodeCompiler.FromSourceBatch(CompilerParameters options, String[] sources)
   at System.CodeDom.Compiler.CodeCompiler.FromSource(CompilerParameters options, String source)
   at System.CodeDom.Compiler.CodeCompiler.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSource(CompilerParameters options, String source)
   at System.Xml.Serialization.Compiler.Compile()
   at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings)
   at System.Xml.Serialization.XmlSerializer..ctor(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, String defaultNamespace)
   at System.Xml.Serialization.XmlSerializer..ctor(Type type, Type[] extraTypes)
   at Microsoft.Practices.EnterpriseLibrary.Configuration.SerializerCache.CreateXmlSerializer(Type valueType, Type[] types)
   at Microsoft.Practices.EnterpriseLibrary.Configuration.SerializerCache.GetSerializer(Type baseType, Type[] types)
   at Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationSettingsLoader.CreateXmlSerializer(Type[] types)
   at Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationSettingsLoader.Build(XmlNode node)
   at Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationSettingsLoader.Build(String configurationFile)
   at Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationFile.GetConfig(String configKey)
   at Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationBuilder.ReadMetaConfiguration()
   at Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationBuilder.LoadMetaConfiguration(String configurationFile)
   at Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationBuilder..ctor()
   at Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationManager..ctor()
   at Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationManager.get_Current()
   at Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationManager.GetCurrentContext()
   at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseFactory.CreateDatabase(String instanceName)
   at XXX.LeadsOnline.FilterBS.FilterBusinessService.LeadCandidateHandler.getCandidate(Int32 caseId, String userId)
   at XXX.LeadsOnline.FilterBS.FilterBusinessService.LeadCandidateHandler.processCandidate(Int32 caseId, String userId, String objectType, String routingDest, String SRType, String stateCode, String stateInfo, String toEmail)

My suspicion is that there is some problem with parsing one or more of the config xml files, but I'm not really sure.

There might be more information that needs to be provided but this is what I can come to think of right now. Is there a way to get the EntLib to output some logging - except modifying the source code, which is my last choice. But I do have the source code, so if necessary, I'll do that.

Cheers
/Rickard