Write to Application or Session Variables from Winform App???

  • Thread starter Thread starter Lucas Tam
  • Start date Start date
L

Lucas Tam

Is there a way to write to IIS' Application or Session variables from a
Winforms application? I am trying to share application state between a web
application and a desktop app.

Remoting would work too but seems to be an overkill - I only want to pass
one value.
 
No, they are separate applications and need to use some sort of remote
procedure call mechanism, like remoting or web services offer.
 
no problem. look at the webclient, or webservice. if your webservice is in
the same vdir as the web application then you can share application dta. if
you want your winform app to share session, then just add the session cookie
support in winform app. you could add the session id to webform request.

-- bruce (sqlwork.com)



| Is there a way to write to IIS' Application or Session variables from a
| Winforms application? I am trying to share application state between a web
| application and a desktop app.
|
| Remoting would work too but seems to be an overkill - I only want to pass
| one value.
|
| --
| Lucas Tam ([email protected])
| Please delete "REMOVE" from the e-mail address when replying.
| http://members.ebay.com/aboutme/coolspot18/
 
What you could try is copying your .exe file to your wwwroot of your web
server and then launching your app via a url.
http://localhost/yourapp.exe

This your app will be launched within the contex of your IIS host session.
Then, you probably can user the System.Web.HttpContex (i think thats it) to
write and retreive data from session variables. I have seen this done before;
and they had to do it this way.
 
Back
Top