Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Indigo

OperationContext.Current or HttpContext.Current in MembershipProvider within WCF Service = null?

Update your Vista Drivers Update Your Drivers Now!!
 
 
Thread Tools Display Modes
Old 05-17-2007   #1 (permalink)
dgilbert@cragmonttech.com
Guest


 

OperationContext.Current or HttpContext.Current in MembershipProvider within WCF Service = null?

I have a custom membership provider that I am using to authenticate
users in a WCF web service hosted IIS. I want to be able to see any
cookies that come across and save session variables, but I cannot get
to the OperationContext.Current nor the HttpContext.Current (I am
using aspNetCompatibility=true and confirmed that it is enabled in the
debugger) - both are null. Is there a setting someplace that will
enable these to be available to the MembershipProvider? When I get
into the service they are available, but not before. Is there an
alternative way to get to cookie and session data in WCF?


My System SpecsSystem Spec
Old 05-17-2007   #2 (permalink)
Marc Gravell
Guest


 

Re: OperationContext.Current or HttpContext.Current in MembershipProvider within WCF Service = null?

WCF deliberately divorces itself from the transport, as WCF must work
equally with HTTP, TCP, MSMQ, carrier-pidgeon, etc.

What specifically are you looking to do? For custom authentication,
see below; for other operations, "inspectors" are often the way to
go...

You might also find the
microsoft.public.windows.developer.winfx.indigo group more apt.

http://groups.google.co.uk/group/mic...40905d321cce17

Marc

My System SpecsSystem Spec
Old 05-17-2007   #3 (permalink)
Marc Gravell
Guest


 

Re: OperationContext.Current or HttpContext.Current in MembershipProvider within WCF Service = null?

> microsoft.public.windows.developer.winfx.indigo group
Oops! my bad... my aggregator confused me... I thought this was
somewhere else ;-p

Marc

My System SpecsSystem Spec
Old 05-17-2007   #4 (permalink)
Marc Gravell
Guest


 

Re: OperationContext.Current or HttpContext.Current in MembershipProvider within WCF Service = null?

(ahh... multipost... don't do that ;-p)

My System SpecsSystem Spec
Old 05-18-2007   #5 (permalink)
dgilbert@cragmonttech.com
Guest


 

Re: OperationContext.Current or HttpContext.Current in MembershipProvider within WCF Service = null?

On May 17, 4:44 pm, Marc Gravell <marc.grav...@gmail.com> wrote:
> WCF deliberately divorces itself from the transport, as WCF must work
> equally with HTTP, TCP, MSMQ, carrier-pidgeon, etc.
>
> What specifically are you looking to do? For custom authentication,
> see below; for other operations, "inspectors" are often the way to
> go...
>
> You might also find the
> microsoft.public.windows.developer.winfx.indigo group more apt.
>
> http://groups.google.co.uk/group/mic...ws.developer.w...
>
> Marc


I need to pass in a third-party session id, along with the username
and password that is used for authentication for a WCF service that is
hosted in IIS. I was hoping to use a cookie to return the session id
to the client and have them resubmit it on each request. I am using a
custom membership provider to implement the custom authentication
logic. I use this membership provider for web apps also so it has to
be ASP.NET compatible. When I use the attribute to make WCF ASP.NET
compatible I see neither the HttpContext nor the
OperationContext.Current objects. These appear to not be instantiated
until I get past the authentication process in WCF - in plain asp.net
this works fine. Can anyone confirm that this is normal behavior for
WCF? Also, is there a way that cookie data gets mapped to objects in
WCF? Lastly, other than using custom tokens or explicit parameters,
are there any other recommended approaches to passing in data to be
used in the preprocessing of a WCF service request?

My System SpecsSystem Spec
 
Update your Vista Drivers Update Your Drivers Now!!

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the most current version of WLM? Jorie Live Mail 1 08-07-2008 11:04 AM
Current Update Anton Katz [MSFT] Live Folder Share 6 11-15-2007 02:26 PM
how do I keep powershells current directory and dotnets current directory in sync Harald Ums \(2179630\) PowerShell 1 06-21-2007 05:10 PM



Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008