Print Page | Close Window

The type initializer for 'IdeaBlade.Util.TraceFns' threw an exception.

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1528
Printed Date: 23-Apr-2025 at 6:03pm


Topic: The type initializer for 'IdeaBlade.Util.TraceFns' threw an exception.
Posted By: Douglas
Subject: The type initializer for 'IdeaBlade.Util.TraceFns' threw an exception.
Date Posted: 23-Oct-2009 at 6:46am
Hi,
 
I have a class that is stored in the GAC  and is Com visible which is called by an MSMQ trigger. This class uses Ideablade assemblies.
On my development machine my assmebly in the GAC works fine and can use Ideablade assemblies with no problems. However, on the staging machine the following error is returned
 
"The type initializer for 'IdeaBlade.Util.TraceFns' threw an exception."
 
I believe that this is caused by ideablade not being able to write to the DebugLog.xml. I have tried various different security configurations including giving everybody read write access but to no avail.
 
please help!
 
here is my config file
 
<?xml version="1.0" encoding="utf-8"?>
<ideaBlade xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance - http://www.w3.org/2001/XMLSchema-instance " xmlns:xsd=" http://www.w3.org/2001/XMLSchema - http://www.w3.org/2001/XMLSchema " version="1.07">
  <useDTC>false</useDTC>
  <copyLocal>false</copyLocal>
  <loginManagerRequired>false</loginManagerRequired>
  <enforceDynamicTypeSecurityOnServer>false</enforceDynamicTypeSecurityOnServer>
  <logging>
    <archiveLogs>false</archiveLogs>
    <logFile>DebugLog.xml</logFile>
    <usesSeparateAppDomain>false</usesSeparateAppDomain>
    <port>0</port>
  </logging>
  <rdbKey name="default" databaseProduct="Unknown">
        <connection>Provider=SQLOLEDB.1;Password=;Persist Security Info=True;User ID=;Initial Catalog=MapHouse_New;Data Source=SQL01</connection>
    <probeAssemblyName>Domain</probeAssemblyName>
  </rdbKey>
  <rdbKey name="Web" databaseProduct="Unknown">
    <!--LIVE-->
        <connection>Provider=SQLOLEDB.1;Password=;Persist Security Info=True;User ID=;Initial Catalog=MapHouse_Web;Data Source=sql01</connection>
    <probeAssemblyName>Alphasoft.TheMapHouse.WebDomain</probeAssemblyName>
  </rdbKey>
  <remoting>
    <remotePersistenceEnabled>false</remotePersistenceEnabled>
    <communicationsTechnology>Remoting</communicationsTechnology>
    <remoteBaseURL>http://localhost</remoteBaseURL>
    <serverPort>9009</serverPort>
    <serviceName>PersistenceService</serviceName>
    <serverDetectTimeoutMilliseconds>-1</serverDetectTimeoutMilliseconds>
    <proxyPort>0</proxyPort>
  </remoting>
  <notificationService>
    <enabled>false</enabled>
    <serverPort>0</serverPort>
    <clientPort>0</clientPort>
  </notificationService>
  <webService>
    <remoteBaseURL />
    <serverPort>0</serverPort>
    <serviceName />
    <authentication>None</authentication>
  </webService>
  <appUpdater />
</ideaBlade>



Replies:
Posted By: kimj
Date Posted: 23-Oct-2009 at 9:31am
Try turning the debuglog off altogether to see if write permissions are indeed the problem.  You can turn it off by changing the element to:
  <logFile></logFile>
 
Also check the Event Viewer log to see if any errors show up there.

 


Posted By: Douglas
Date Posted: 25-Oct-2009 at 4:53am
Hi,

Thanks for the response.

After turning off the debuglog the process completed successfully.

What could causing debug logging to fail?


Posted By: kimj
Date Posted: 25-Oct-2009 at 7:27am
Most likely write permissions, although you did mention you gave Everyone read/write access...  You can try specifying a full path for the debug log to a folder like c:\temp or similar which you know to be unsecured -- if that works then it is a permissions issue.

To specify the full path, you can use something like:
   <logFile>c:\temp\Debuglog.xml</logFile>



Print Page | Close Window