473,511 Members | 14,975 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 2410
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**********@gmail.comwrote in message
news:61**********************************@56g2000h sm.googlegroups.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
1438
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...
0
1999
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...
9
6647
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**** ...
3
1421
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....
2
2195
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...
3
5289
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" /> ...
43
2681
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 & \...
4
3341
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....
4
3872
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...
0
7371
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,...
0
7432
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...
1
7093
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...
0
5676
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,...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3230
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...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1583
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.