Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / February 2005

Tip: Looking for answers? Try searching our database.

SessionId in tokenmanager

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
S?ren M. Olesen - 11 Feb 2005 09:30 GMT
Hi

Is it possible to get hold of the curent session id when inside a
TokenManager?? or is the only unique idintification the CurrentThread??

What I'd like to, is from a WebMethos to get hold of an object instantiated
in the TokenManager ??

TIA

S?ren
Dilip Krishnan - 16 Feb 2005 05:38 GMT
Hello Søren,
  I would not do something like that... That would be inherently bad design,
because WSE is a soap stack that can be used over different transports...
and trying to identify it with a thread of execution would jeopardize that
notion! It would be good if you post what yr trying to achieve so we can
come up with alternate suggestions

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com

> Hi
>
[quoted text clipped - 8 lines]
>
> Søren
S?ren M. Olesen - 16 Feb 2005 06:49 GMT
Hi Dilip

What I'm trying to archive it to make sure that some initialization code is
called before any of the webmethos code is executed. I've noticed that the
TokenManager is called on each request to a webservice, but there doesn't
seem to be any linke between the tokenmanager and the webmethod, so I was
wondering if I could make one using a sessionid or threadid.
What't I'd really like is the possibility to get a beforre_webmethod and a
after_webmethod code called.

Regards,

S?ren

> Hello S?ren,
>   I would not do something like that... That would be inherently bad
[quoted text clipped - 22 lines]
>>
>> S?ren
Dilip Krishnan - 16 Feb 2005 14:27 GMT
Hello Søren,
  You can certainly acheive that by tapping into the events using a HttpModule...
the easiest way being using the global.asax httpmodule. It has events of
the likes of before request, after request etc

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com

> Hi Dilip
>
[quoted text clipped - 40 lines]
>>>
>>> Søren
William Stacey [MVP] - 16 Feb 2005 17:51 GMT
> What I'm trying to archive it to make sure that some initialization code is
> called before any of the webmethos code is executed. I've noticed that the
[quoted text clipped - 3 lines]
> What't I'd really like is the possibility to get a beforre_webmethod and a
> after_webmethod code called.

I have wanted that as well before.  As you say, it should be an event or
even a method you can override in the SoapService class.  That way, it would
work regardless of the transport (http, tcp, lpc, etc)

Signature

William Stacey, MVP
http://mvp.support.microsoft.com

Dilip Krishnan - 16 Feb 2005 19:58 GMT
Hello William Stacey [MVP],
 There is in the asmx model using HttpModules... In the soapservice derived
world you can always derive from soap service and have events defined in
the service that get invoked based on the amount of information you need.
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com

>> What I'm trying to archive it to make sure that some initialization
>> code
[quoted text clipped - 14 lines]
> or even a method you can override in the SoapService class.  That way,
> it would work regardless of the transport (http, tcp, lpc, etc)
Sami Vaaraniemi - 17 Feb 2005 08:07 GMT
>> What I'm trying to archive it to make sure that some initialization code
> is
[quoted text clipped - 11 lines]
> would
> work regardless of the transport (http, tcp, lpc, etc)

You could override SoapService.Receive(SoapEnvelope message). To see which
method is about to be called, take a look at
message.Context.Addressing.Action.Value.

Regards,
Sami

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.