asp.net - Conversion from string "~/app.config" to type 'Integer' is not valid -
in web service gloval.asax, put log4net.config.xmlconfigurator.configure(new fileinfo(server.mappath("~/web.config")))
in application_start
. now, have console application. i'm try put log4net.config.xmlconfigurator.configure(new fileinfo(appdomain.currentdomain.basedirectory("~/app.config")))
, conversion string "~/app.config" type 'integer' not valid. whats causes this?
turn option strict on , you'll see error @ compile time.
appdomain.currentdomain.basedirectory
string. when reference in brackets after it's expecting character index, "~/app.config" isn't.
try appdomain.currentdomain.basedirectory & "/app.config"
instead.
Comments
Post a Comment