473,797 Members | 3,160 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"Logging in" to a WCF service

I have a Windows application that must "log in" to a remote service.
Once logged in, for all subsequent service calls the Windows
application should somehow pass a "session context" in each message to
the service, which will then be compared to session information stored
in SQL Server. However, for each service call a new client proxy is
created, i.e. I'm not reusing the same proxy over and over.
Essentially, I need to emulate what traditional ASP.NET sessions do.

I've done pretty much all the research I can looking into WCF
federation (RSTRSTR) but haven't come up with anything understandable.
I also know that WCF's concept of a session is not inherently
sufficient for what I'd like to do. I was curious what best practices
there were or whether anyone else has attempted something like this.

Thanks.
Jun 27 '08 #1
1 2425
I have done something similar to this a while back with WCF. I ended up
using an encrypted token that held a session id and the time that the token
was created (used for expiration). We had a "log in server" that held
authentication information, this server would create our token and pass it
onto the server that is hosting the WCF service. If I recall correctly I
used an HttpModule to grab the encrypted token off of the request and
validated it at that time.. if it wasn't valid I simply closed the response
stream.

You could probably use something similar to this only hold an id in your
encrypted token that identifies session information that you have stored in
SQL Server. Just include the token on each of your calls through your
various proxies.

Jeremy Shovan

<na**********@g mail.comwrote in message
news:61******** *************** ***********@56g 2000hsm.googleg roups.com...
I have a Windows application that must "log in" to a remote service.
Once logged in, for all subsequent service calls the Windows
application should somehow pass a "session context" in each message to
the service, which will then be compared to session information stored
in SQL Server. However, for each service call a new client proxy is
created, i.e. I'm not reusing the same proxy over and over.
Essentially, I need to emulate what traditional ASP.NET sessions do.

I've done pretty much all the research I can looking into WCF
federation (RSTRSTR) but haven't come up with anything understandable.
I also know that WCF's concept of a session is not inherently
sufficient for what I'd like to do. I was curious what best practices
there were or whether anyone else has attempted something like this.

Thanks.
Jun 27 '08 #2

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

Similar topics

0
1453
by: pillbug22 | last post by:
Hi everyone I am trying to write a fairly simple VB.NET service (use a timer to poll a network location for a file, if file exists, send message) The service correctly start, stops, runs the timer, etc. I can tell this from a custom event log I created, and it adds new entries on start, stop, and each time the timer expires FYI...sice this is my first service to write, I'm going by the MSDN article at...
0
2023
by: Chris Mullins | last post by:
I have a Windows Service that I created using Visual Studio.NET 2003. No custom code, just an empty Windows Service. In VS.NET, I right click on the service, and say "Add Installer", to create a custom installer for it inside my project. No custom code, just an empty installer as generated by VS.NET. I then create a Deployment project, and set the "custom action" for each of the steps to run the installer found in the Windows Service...
9
6663
by: PG | last post by:
Hi gurus, I have AIX visual age C++ compiler version 5.0.2.3. I have a simple hello world program that gives compilation errors. Any help will be appreciated. Thanks PG ***test.cpp**** #include <stdio.h>
3
1434
by: bchoi | last post by:
Hi. I am trying to log (Not SQL Transaction log) all deleted rows into a custome log file after performing "cascade delete". I couldn't find any reference for this in SQL manual or News group. Byung Choi
2
2207
by: Sammy | last post by:
I have found it impossible to achieve this step. I tried HttpWebRequest with CookieContainer instantiated. It always returns an eBay page titled "Cookie Error" that says my browser does not accept cookies. I did set the UserAgent correctly to replicate Internet Explorer (which works perfectly well by the way). Any solutions please? I'm desparate!
3
5306
by: Mike | last post by:
I have created a web service for a client to consume. The element I am having trouble with is, as described in their WSDL: <xsd:element minOccurs="0" ref="LocalData" maxOccurs="1" /> <xsd:element name="LocalData"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:enumeration value="Y" /> <xsd:enumeration value="N" />
43
2761
by: markryde | last post by:
Hello, I saw in some open source projects a use of "!!" in "C" code; for example: in some header file #define event_pending(v) \ (!!(v)->vcpu_info->evtchn_upcall_pending & \ !(v)->vcpu_info->evtchn_upcall_mask) whereas evtchn_upcall_pending is of type unsigned char (and also evtchn_upcall_mask is of type unsigned char).
4
3356
by: Niron kag | last post by:
Hi, I have a windows service, which is currently installed, on my local computer. The problem is that when I look at the task manager, I see that the “Mem Usage”, become bigger and bigger. Has someone any idea why this happens? Anyway to solve this problem I thought to stop the service and start it programmatically when it’s “Mem Usage” is too big. Is it possible?
4
3900
by: fran7 | last post by:
Hi, from help in the javascript forum I found the error in some code but need help. This bit of code works perfectly, trouble is I am writing it to a javascript function so the height needs to be in &quot;&quot; instead of "" otherwise I get an error message. Can anyone suggest how to write it so that it writes &quot; instead of "". I have tried all combinations of adding &quot; to the code but as soon as I think I am there I get throw out again. if...
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9537
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
10246
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
10209
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
9066
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7560
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
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...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2934
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.