Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...log4Net problem after upgrade to v 6.0log4Net problem after upgrade to v 6.0
Previous
 
Next
New Post
8/9/2011 8:44 AM
 
Hi,
I upgraded dnn from 5.6.2 to 6.0
Everything works fine except one thing.

In the file app_code\Global.asax.vb I have already added following change in method Global_BeginRequest (at the end):
log4net.Config.XmlConfigurator.ConfigureAndWatch(New System.IO.FileInfo("[path to my xml-file here]"))

(This code defines the log4net integration used in my project, located in DesktopModules, and this code was working before the upgrade.)

After the upgrade to 6.0 I get following error:
BC30560: 'XmlConfigurator' is ambiguous in the namespace 'log4net.Config'.

I have a dll in the dnn/bin-folder named log4net.dll, which is referred in my project.
(this dll has been a part of my existing project)
I can see that a new dll is added to the dnn/bin-folder after the 6.0 install, DotNetNuke.Log4Net.dll

Is there a workaround to make my log4net-implementation still work, or is there a way to use the now embedded dotnetnuke.log4net functions?

Kind regards,
Aage Eilertsen.

 
New Post
8/9/2011 2:39 PM
 
hmm, with log4net being a new dependency I guess you could be seeing namespace resolution issues (though the new dll was created with a fully qualified namespace of dotnetnuke.log4net to avoid this) -i think you may be seeing an odd clash probably caused by a using DotNetNuke.Instrumentation reference. As for using the core version you just call DnnLog.Info, DnnLog.Error etc.

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
8/9/2011 5:17 PM
 
cathal connolly wrote:
 (though the new dll was created with a fully qualified namespace of dotnetnuke.log4net to avoid this)

 Then, there was a mistake in the DNN code, because if you open dotnetnuke.log4net.dll assembly with Reflector, the namespaces within it are plain "namespace log4net". Do you mean, this was not the Core team intention? If so, they should change the namespace to be "dotnetnuke.log4net"

 
New Post
8/9/2011 5:54 PM
 
Im wondering if this is not something more to do with a version conflict - as I understand it - the current version of log4net - is designed to be configured via the web.config without the need for changes in globals ?
 
New Post
8/9/2011 6:01 PM
 
sort of, I think, because internally dotnetnuke.log4net.dll is using namespace "log4net" instead of "dotnetnuke.log4net".
If dotnetnuke.log4net.dll is updated to use namespace "dotnetnuke.log4net", there would be no version conflict.
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...log4Net problem after upgrade to v 6.0log4Net problem after upgrade to v 6.0


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out