c# - Log4Net : Error creating the web proxy specified in the 'system.net/defaultproxy' configuration section -


i have strange error :

in web config have :

<system.diagnostics>     <trace autoflush="true">       <listeners>         <add name="textwritertracelistener" type="system.diagnostics.textwritertracelistener" initializedata="c:\tmp\log4net.txt" />       </listeners>     </trace> 

so when try connect www.google.com (for example) code. have error :

error creating web proxy specified in 'system.net/defaultproxy' configuration section 

if remove tmp path have :

<system.diagnostics>     <trace autoflush="true">       <listeners>         <add name="textwritertracelistener" type="system.diagnostics.textwritertracelistener" initializedata="c:\log4net.txt" />       </listeners>     </trace> 

all works fine.

strange isn't ?

someone has idea ?

i found,

i think it's bug in iis.

the problem have website hosted on iis, in website, have application webservices.

my website , webservices have own web.config.

but listener name same on 2 web.config, when value different, had problem above.

so fix change name of listener :

<system.diagnostics>     <trace autoflush="true">       <listeners>         <add name="textwritertracelistener2" type="system.diagnostics.textwritertracelistener" initializedata="c:\tmp\log4net.txt" />       </listeners>     </trace> 

name="textwritertracelistener2" webservice , name="textwritertracelistener" website.

but better separate them on iis (i later) thanks, help.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -