Thursday 15 March 2012

c# - When I Publish my project in iis log4net doesn't work -


When I debug it on Visual Studio it works perfectly, but when I put it on my IIS directory I try:

  & lt ;? XML version = "1.0"? & Gt; & Lt; Configuration & gt; & Lt; ConfigSections & gt; & Lt; Section name = "log4net" type = "log4net.config.loginNetConfigurationSectionHandler, log4net" /> & Lt; / ConfigSections & gt; & Lt; Log4net & gt; & Lt; Appender name = "logfiledeveloper" type = "log4net.Appender.RollingFileAppender" & gt; & Lt; Param name = "file" value = "c: \\ user \\ leandro \\ desktop \\ Caderneta.log" /> & Lt; Locking model type = "log4net.Appender.FileAppender + MinimalLock" /> & Lt; AppendToFile value = "true" /> & Lt; Rolling style value = "size" /> & Lt; MaxSizeRollBackups value = "3" /> & Lt; Max file type value = "1MB" /> & Lt; StaticLogFileName value = "true" /> & Lt; Layout type = "log4net.Layout.PatternLayout" & gt; & Lt; Param name = "ConversionPattern" value = "% n% n [% t]% -5p% c% n% m% n" / & gt; & Lt; / Layout & gt; & Lt; / Appender & gt; & Lt; Root & gt; & Lt; Level value = "error" /> & Lt; Appender-Rif ref = "LogfileUpdate" /> & Lt; / Root & gt; & Lt; / Log4net & gt; & Lt; System.web & gt; & Lt; Compilation debug = "true" targetFramework = "4.0" /> & Lt; Webservices & gt; & Lt; Protocol & gt; & Lt; Add name = "http post" / & gt; & Lt; Add name = "html gate" /> & Lt; / Protocol & gt; & Lt; / Webservices & gt; & Lt; /system.web> & Lt; / Configuration & gt; First of all, I tried to put Caderneta.log on the ultimate name, but it does not seem that it has been made. The path to my server exists for  C: \ users \ leandro \ Desktop \ Caderneta.log , but it is still not making the Caderneta file.   

Find that folder in Windows Explorer and give security permissions to the following local users if they exist:

NETWORKSERVICE

IIS AppPool \ DefaultAppPool

No comments:

Post a Comment