Hi,
yes, this also makes sense. In the HTTP module, no SOAP processing has
happened yet. The SoapContext stuff is filled in for you AFTER the stage
in the ASP pipeline where the HTTP module gets control. If you want to get
access to the payload data from the HTTP module, you need to crack the
input stream yourself.
I hope this helps
Dan Rogers
Microsoft Corporation
--------------------
From: "SA" <informatica@freemail.nl>
References: <#i#bfes4EHA.3908@TK2MSFTNGP12.phx.gbl>
Subject: Re: HttpModule not able to access SoapEnvelope
Date: Wed, 15 Dec 2004 11:40:01 -0600
Lines: 46
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.3790.224
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.224
Message-ID: <uVOf10s4EHA.2624@TK2MSFTNGP11.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices.enhancements
NNTP-Posting-Host: 65.82.123.186
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11
.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices.enhancements:5162
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices.enhancements
Actually, it turns out that the Security.Tokens collection of that
SoapContext object I have access to is empty as well... (it's not Nothing,
just empty).
I am sure I am passing a security token, because if I put the check in a web
method, it works.
--
---
Sven.
[quoted text, click to view] "SA" <informatica@freemail.nl> wrote in message
news:#i#bfes4EHA.3908@TK2MSFTNGP12.phx.gbl...
> Hi all,
>
> I want to ensure that my wSE 2.0 web service is being called with at least
> one security token.
>
> I have a function that validates that using the
> RequestContext.Security.Tokens collection.
>
> Instead of calling that function from every Soap Method, I want to put
this
> in an HttpModule. While I haven't actually tried it yet, I believe this
will
> work just fine. I can get to the request's SoapContext object.
>
> However, for future plans, I would also want access to the SoapEnvelope
for
> that request. I have tried hooking into three events: AUthenticateRequest,
> BeginRequest, and PreRequestHandlerExecute. In all of these events, the
> Envelope property of my SoapContext is Nothing (null).
>
> Is there a way I can access the Envelope in an HttpModule?
>
> Thanks,
>
> ---
>
> Sven.
>