473,799 Members | 3,158 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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 (RE********@rog ers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 18 '05 #1
3 2324
No, they are separate applications and need to use some sort of remote
procedure call mechanism, like remoting or web services offer.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Mon, 08 Nov 2004 19:53:11 GMT, Lucas Tam <RE********@rog ers.com>
wrote:
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.


Nov 18 '05 #2
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)

"Lucas Tam" <RE********@rog ers.com> wrote in message
news:Xn******** *************** ****@140.99.99. 130...
| 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 (RE********@rog ers.com)
| Please delete "REMOVE" from the e-mail address when replying.
| http://members.ebay.com/aboutme/coolspot18/
Nov 18 '05 #3
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.Http Contex (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.

"Lucas Tam" wrote:
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 (RE********@rog ers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4373
by: mark4asp | last post by:
What are the best methods for using global constants and variables? I've noticed that many people put all global constants in a file and include that file on every page. This is the best way of doing it - is it not? Once the application has loaded the page it is cached and is immediately available for other pages. With global variables - the best thing to do would be to use application variables - so long as there weren't too many...
9
2456
by: William LaMartin | last post by:
I have a problem, mentioned here before, of Session and Application variables disappearing at one site but not at others or on my development computer. The problem is illustrated by an example at http://www.lamartin.com/dotnet/sessiontestset.aspx, were I set Session, Application and Cache variables on the first page and then on the second page view them as the second page is refreshed every five seconds. Before 10 refreshes, the...
1
1279
by: usl2222 | last post by:
Hi, I'm building this web application using asp.net and c# as code behind. Currently I save all my session data in session variables. One of the things that this application must do, is to invoke another instance of the same application, with different parameters, of course. Then the second invokation can potentially couse a third invokation, etc.
6
1272
by: Just D | last post by:
Hi, How slowly is to work with these objects - Application and Session ? Is it much better to create a huge project or some static library and place all variables/constants there instead of many Session objects? When I removed some of Session objects and replaced by another approaches I got an illusion that application started working significantly faster? Is it true?
3
1453
by: Terry Holland | last post by:
Ive read that to build scalable web apps it is not recommended that state be stored in session variables. My understanding of this is that, with many users using the application concurrently, the amount of memory required to store all their session variables would very quickly exhaust the web server's memory. Also, if the application is to run on a web farm, there is no guarantee that all requests for a session will be dealt with by the...
1
1090
by: pamelafluente | last post by:
Hello I have been asking around about some suggestions about the best way to web enable an existing big Win app (wich includes a magazine page setter). Must say with no much success, as most people are sticking either with win apps or with web app, and it seems there not many people with working experience in this area. After some reading I am becoming convinced that the most effective way is a combination of 2 approach:
7
2242
by: Victor | last post by:
I've got two domain names sharing the same IP address that use ASP VBScript If I set a session variable with domain 1, it is only available for domain 1 - this is correct? If I set an application variable with domain 1, the app variable is sharing across all domains using that IP address - this is correct? This is the behavior I am seeing and I want to make sure that my server is set up correct. I especially want to make sure...
0
5020
by: bharathreddy | last post by:
Here I will given an example on how to access the session, application and querystring variables in an .cs class file. Using System.Web.HttpContext class. 1) For accesing session variables : System.Web.HttpContext.Current.Session 2) For accesing Application variables : System.Web.HttpContext.Current.Application 3) For accesing QueryString variables : System.Web.HttpContext.Current.Request.QueryString Here is a simple example where...
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9538
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10470
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10247
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10214
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10023
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5459
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2935
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.