• RSS
  • Twitter
  • FaceBook

Security Forums

Log in

FAQ | Search | Usergroups | Profile | Register | RSS | Posting Guidelines | Recent Posts

Encryption of log4net in config file

Users browsing this topic:0 Security Fans, 0 Stealth Security Fans
Registered Security Fans: None
Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Networking

View previous topic :: View next topic  
Author Message
Log4Help
Just Arrived
Just Arrived


Joined: 23 Aug 2010
Posts: 0


Offline

PostPosted: Mon Aug 23, 2010 12:04 pm    Post subject: Encryption of log4net in config file Reply with quote

Hi everyone,

I am trying to encrypt sections of the application configuration file (app.exe.config) for security purposes. I succeeded in encrypting the appSettings and connectionStrings. However, I get the following error when I try to encrypt the log4net part:

System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handler for log4net: Could not load file or assembly 'log4net' or one of its dependencies.

The system cannot find the file specified. (C:\Documents and Settings\My Documents\Visual Studio 2008\WebSites\Encryption\web.config line 33) ---> System.IO.FileNotFoundException: Could not load file or assembly 'log4net' or one of its dependencies. The system cannot find the file specified.
at System.Configuration.TypeUtil.GetTypeWithReflectionPermission(IInternalConfigHost host, String typeString, Boolean throwOnError)
at System.Configuration.MgmtConfigurationRecord.CreateSectionFactory(FactoryRecord factoryRecord)
at System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere)
--- End of inner exception stack trace ---
at System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere)

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.Configuration.GetSection(String sectionName)
at Service.EncryptSection(String sectionName, String provider) in c:\Documents and Settings\My Documents\Visual Studio 2008\WebSites\Encryption\App_Code\Service.cs:line 55
at Service.Encrypt() in c:\Documents and Settings\My Documents\Visual Studio 2008\WebSites\Encryption\App_Code\Service.cs:line 25


I should be grateful if anyone can help on how to encrypt the log4net part. I have also used aspnet_regiss.exe. I got the same error. I don't understand. It just cannot find the log4net section. Can anyone help?
Back to top
View user's profile Send private message
Display posts from previous:   

Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Networking All times are GMT + 2 Hours
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Community Area

Log in | Register