c# - Error Logging for MVC 5 -


this first time working log4net , error logging. trying deploy mvc5 application. have location on network , path \\dev\wwwroot\scheduler.

what have done far?

1) published project on location following configurations:

  • changed copy output directory copy always
  • changed build action files in models , controllers folder compile

  • changed copy local system.web.mvc , system.web.routing , system.web.abstractions true

  • after publishing models , controllers folder gets copied inside \dev\wwwroot\bccscheduler\bin folder on location. enter image description here

enter image description here

2) , start application giving url bccscheduler.dev.rgc.lcal/appointments/details/?clientid=1001 when run application. an error occurred while processing request

3) tried logging errors using log4net

what need with?

1) how enable logging when deploy application

2) folder structure correct on network location error when give url bccscheduler.dev.rgc.lcal/appointments/details/?clientid=1001. should deploy application correctly>

if cannot run application locally on deployed server, try modifying web config include this:

<configuration>    <system.web>       <customerrors mode="remoteonly"/>    </system.web> </configuration> 

https://technet.microsoft.com/en-ca/library/bb684665.aspx

this should provide stack trace can figure out going on.

also, please post log4net.config if file/path related issue


Comments