Obtain HttpContext.Current from seperate console app

W

Weston Weems

first the problem:
I'd like to be able to clear particular cache items from
a consol application running on the same server as the
asp.net website.

My problem is that if I reference System.Web and then try
System.Web.HttpContext.Current

I always get null, which sort of makes sense. ANyone else
have better ideas on how to achieve this?

Thanks.
 
M

Marina

The console application is running in a separate process then the web
application. I see no way that it could possibly tap into the other process
and access the HttpContext of a particular web application.

You would need a web page/web service sitting in that web application
capable of performing this task. Your console app can then make a request to
the page/web service to tell it that it is time to do its work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top