PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 5.00 average.

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

 
 
dgilbert@cragmonttech.com
Guest
Posts: n/a
 
      17th May 2007
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?

 
Reply With Quote
 
 
 
 
Marc Gravell
Guest
Posts: n/a
 
      17th May 2007
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

 
Reply With Quote
 
 
 
 
Marc Gravell
Guest
Posts: n/a
 
      18th May 2007
> microsoft.public.windows.developer.winfx.indigo group
Oops! my bad... my aggregator confused me... I thought this was
somewhere else ;-p

Marc

 
Reply With Quote
 
Marc Gravell
Guest
Posts: n/a
 
      18th May 2007
(ahh... multipost... don't do that ;-p)

 
Reply With Quote
 
dgilbert@cragmonttech.com
Guest
Posts: n/a
 
      18th May 2007
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?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
AJAX enabled WCF Service Vs Standard WCF Service Simon Microsoft C# .NET 0 13th Oct 2009 10:13 AM
AJAX enabled WCF Service Vs Standard WCF Service Simon Microsoft ASP .NET 0 13th Oct 2009 10:13 AM
WCF service, non-wcf client using mutual certificate authenticatio Rick Microsoft Dot NET Framework 1 28th Mar 2008 03:04 PM
WCF: WCF service is not visible from clients outside the development computer. Mike Microsoft VB .NET 0 26th Dec 2007 06:08 PM
WCF client browsing the same WCF service hosting on multiple PC Bandu Microsoft C# .NET 1 27th Jul 2007 02:09 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:04 AM.