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

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.
 
S

Scott Allen

No, they are separate applications and need to use some sort of remote
procedure call mechanism, like remoting or web services offer.
 
B

bruce barker

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/
 
G

Guest

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.
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top