Hi Curt,
Thanks for reply.
Since this is simple class, I cannot use simply "Server.MapPath".
Note that this class function gets called from "Application_Start" event in
seperate thread.
Thanks and Regards,
Sakharam Phapale
"Curt_C [MVP]" <software_at_darkfalz.com> wrote in message
news:62**********************************@microsof t.com...
Just using Server.MapPath() wont work to retrieve the server file?
What does it return?
--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
"Sakharam" wrote:
Hi All,
I am developing a scheduler object for my web application. I am starting
new
thread on Application_Start event.
Everything works fine except following issue.
I am using following statement in it to get physical path of file.
strTemplateFile =
System.Web.HttpContext.Current.Server.MapPath("myF ile.txt")
But, Since thread is not running against any request, I can't get
HttpContent.Current object and it throws NullReference Exception.
When I start scheduler from web page it works fine.
Can anyone guide me how to achieve this when code runs on
Application_start
event not against any request.
Any help will be appreciated.
Thanks and Regards,
Sakharam Phapale