locked
System.Security.SecurityException: Requested registry access is not allowed. RRS feed

  • Question

  • User-1920275317 posted

    I know there are a lot of posts here and other places on this, but I cant seem to coorelate any of them to this problem.

     I am using enterprise library for data and exceptions.

     I can read and write to the database from a page just fine.

    When I create an exception though i get the access not allowed error.

     Can anyone tell me why i am getting the error and how to fix it?

    I have installed services. and like i said before, the database portion seems to work fine.

     Here are the configuration files I have in my application.

     [WEB CONFIG]

    <configSections>

    <section name="enterpriselibrary.configurationSettings" type="System.Configuration.IgnoreSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

    </configSections>

    <eterpriselibrary.configurationSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" defaultSectio="" applicationName="Application" xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/configuration">

    <configurationSections>

    <configurationSection name="dataConfiguration" encrypt="false">

    <storageProvider xsi:type="XmlFileStorageProviderData" name="XML File Storage Provider" path="dataConfiguration.config" />

    <dataTransformer xsi:type="XmlSerializerTransformerData" name="Xml Serializer Transformer">

    <includeTypes />

    </dataTransformer>

    </configurationSection>

    </configurationSections>

    <keyAlgorithmStorageProvider xsi:nil="true" />

    </enterpriselibrary.configurationSettings>

     

    [DATA CONFIGURATION]

    <?xml verion="1.0" encoding="utf-8"?>

    <dataConfiguration>

    <xmlSerializerSection type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">

    <enterpriseLibrary.databaseSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" defaultInstance="Database Instance" 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.0.0.0, Culture=neutral, PublicKeyToken=null" />

    </databaseTypes>

     <instances>

     <instance name="Database Instance" type="Sql Server" connectionString="Sql Connection String" />

     <instance name="Exception Logging DB" type="Sql Server" connectionString="Exception Logging Connection" />

     </instances>

     <connectionStrings>

     <connectionString name="Exception Logging Connection">

     <parameters>

     <parameter name="database" value="Test" isSensitive="false" />

    <parameter name="Integrated Security" value="False" isSensitive="false" />

    <parameter name="Password" value="Ralph" isSensitive="true" />

    <parameter name="server" value="temporal" isSensitive="false" />

    <parameter name="User" value="jjohnson" isSensitive="false" />

     </parameters>

     </connectionString>

     <connectionString name="Sql Connection String">

     <parameters>

     <parameter name="database" value="Test" isSensitive="false" />

     <parameter name="Integrated Security" value="False" isSensitive="false" />

     <parameter name="Password" value="Ralph" isSensitive="true" />

     <parameter name="server" value="temporal" isSensitive="false" />

    <parameter name="User" value="jjohnson" isSensitive="false" />

    </parameters>

    </connectionString>

    </connectionStrings>

    </enterpriseLibrary.databaseSettings>

    </xmlSerializerSection>

    </dataConfiguration>

     

    [EXCEPTION HANDLING CONFIGURATION]

    <?xml version="1.0" encoding="utf-8"?>

    <exceptionHandlingConfiguration>

    <xmlSerializerSection type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.ExceptionHandlingSettings, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">

    <enterpriseLibrary.exceptionHandlingSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/exceptionhandling">

    <exceptionPolicies>

    <exceptionPolicy name="Exception Policy">

    <exceptionTypes>

    <exceptionType name="Exception" type="System.Exception, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" postHandlingAction="NotifyRethrow">

    <exceptionHandlers>

    <exceptionHandler xsi:type="LoggingExceptionHandlerData" name="Logging Handler" defaultLogCategory="General" defaultEventID="100" defaultSeverity="Error" defaultTitle="Enterprise Library Exception Handling" formatterTypeName="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.TextExceptionFormatter, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" minimumPriority="0" />

    </exceptionHandlers>

    </exceptionType>

    </exceptionTypes>

    </exceptionPolicy>

    </exceptionPolicies>

    </eterpriseLibrary.exceptionHandlingSettings>

    </xmlSerializerSection>

    </exceptionHandlingConfiguration>

     

    [LOGGING CONFIGURATION]

    <?xml version="1.0" encoding="utf-8"?>

    <loggingConfiguration>

    <xmlSerializerSection type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">

    <eterpriseLibrary.loggingSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" loggingEnabled="true" tracingEnabled="false" categoryFilterMode="AllowAllExceptDenied" distributionStrategy="In Process" minimumPriority="0" name="Client Settings" xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/logging">

    <categoryFilters />

    <distributionStrategies>

    <distributionStrategy xsi:type="InProcDistributionStrategyData" name="In Process" />

    </distributionStrategies>

    </enterpriseLibrary.loggingSettings>

    </xmlSerializerSection>

    </loggingConfiguration>

     

    [LOGGING DISTRIBUTOR CONFIGURATION]

    <?xml verion="1.0" encoding="utf-8"?>

    <loggingDistributorConfiguration>

    <xmlSerializerSection type="Microsoft.Practices.EnterpriseLibrary.Logging.Distributor.Configuration.DistributorSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">

    <enterpriseLibrary.loggingDistributorSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" defaultCategory="General" defaultFormatter="Text Formatter" xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/loggingdistributor">

    <sinks>

    <sink xsi:type="DatabaseSinkData" name="Database Sink" databaseInstanceName="Exception Logging DB" storedProcName="WriteLog" />

    <sink xsi:type="EventLogSinkData" name="Event Log Sink" eventLogName="Application" eventSourceName="Enterprise Library Logging" />

    <sink xsi:type="FlatFileSinkData" name="Flat File Sink" fileName="trace.log" header="----------------------------------------" footer="----------------------------------------" />

    </sinks>

    <categories>

    <category name="General">

    <destinations>

     <destination name="Event Log Destination" sink="Database Sink" format="Text Formatter" />

     </destinations>

     </category>

     <category name="Trace">

     <destinations>

     <destination name="Flat File Destination" sink="Flat File Sink" format="Text Formatter" />

    </destinations>

     </category>

    </categories>

    <formatters>

    <formatter xsi:type="TextFormatterData" name="Text Formatter">

    <template><![CDATA[Timestamp: {timestamp}

    ]]></template>

    </formatter>

    </formatters>

    </enterpriseLibrary.loggingDistributorSettings>

    </xmlSerializerSection>

    </loggingDistributorConfiguration>

    Monday, June 9, 2008 1:31 PM

Answers

  • User-1920275317 posted

    I had several issues when I installed vs.net. I believe that this is the root of my problems. I will upgrade to vs 2005 and work from there.

    Problem solved.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 11, 2008 11:32 AM

All replies

  • User-837620913 posted

    Yes, you don't have the required registry permissions - specifically the ASP.NET account does not have enough permissions to create a new event source in the event log.  Check out this KB article:

    http://support.microsoft.com/kb/329291 

    Monday, June 9, 2008 3:58 PM
  • User-1920275317 posted

    I have gone into the registry and added TEST like it said to do .. didnt work.

    I have given several different users full control to several things in there to no avail.

     

    Can anyone solve this?

    Monday, June 9, 2008 5:33 PM
  • User-1920275317 posted

    I had several issues when I installed vs.net. I believe that this is the root of my problems. I will upgrade to vs 2005 and work from there.

    Problem solved.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 11, 2008 11:32 AM