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 / April 2005

Tip: Looking for answers? Try searching our database.

autoIssueSecurityContextToken SoapActor

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Thomas S. Trias - 11 Mar 2005 19:31 GMT
How can I set the SoapActor for the default SecurityContextService created
for the assembly when

<autoIssueSecurityContextToken enabled="true" />

is specified in the web.config?  Even if my endpoint resolves to a web
servce with a speficied SoapActorAttribute, and I use the same endpoint to
aquire an SCT, the SoapActor is NOT set for the token service, and I get a
WSE816 unreachable.

If I have to use a custom SCT service, is there any way to include the
handling in my existing web service code, or do I have to create a separate
http handler compiled in its own assembly?

If I have to create a handler, how do I register it for the same URL as my
service (so that I do not have to change the client code), while still
providing the default processing for the other web methods and WSDL retreival?

Thanks,

Thomas S. Trias
Senior Developer
Afni Insurance Services
http://www.afniinc.com/
Thomas S. Trias - 15 Mar 2005 19:39 GMT
I tried using the largely undocumented "type" attribute on the
autoIssueSecurityContextToken:

     <autoIssueSecurityContextToken enabled="true"
type="JSLA.CustomSCTService, CustomSCTService" />

However, I can't seem to figure out how to setup the SoapActor for my custom
service; setting the SoapActorAttribute doesn't seem to do anything, and
neither does shadowing the Actor property.  Furthermore, I added the
following code to my service:

   Public Sub New()
     Throw New ApplicationException("Here")
   End Sub

and I am still getting the following fault:

     <soap:Fault>
       <faultcode
xmlns:code="http://schemas.xmlsoap.org/ws/2004/03/addressing">code:DestinationUnreachable</f
aultcode
>
       <faultstring>Microsoft.Web.Services2.Addressing.AddressingFault:
Destination Unreachable ---> System.Exception: WSE816: The <To> header must
match the value of an incoming message's HTTP Request Url if the soap
receiver does not have an actor name. The <To> header received contained
"http://external/MyService.asmx" while the HTTP Request Url was
"http://localhost/MyService.asmx".
  --- End of inner exception stack trace ---
  at
Microsoft.Web.Services2.WebServicesExtension.AutoIssueSecurityContextToken(SoapEnvelope request)
  at
Microsoft.Web.Services2.WebServicesExtension.BeforeDeserializeServer(SoapServerMessage message)</faultstring>
       <faultactor>http://external/MyService.asmx</faultactor>
     </soap:Fault>

So, my custom service class is never even instantiated!

Now I'm really out of ideas...

Thomas S. Trias
Senior Developer
Afni Insurance Services
http://www.afniinc.com/
Sidd - 25 Mar 2005 08:39 GMT
Hi Thomas,

   I am assuming that you are using a SoapService to accomplish this? Have
you tried inheriting your service from SecurityContextTokenService rather
than SoapService?

Thanks,

Sidd [MSFT]

> I tried using the largely undocumented "type" attribute on the
> autoIssueSecurityContextToken:
[quoted text clipped - 15 lines]
>       <soap:Fault>
>         <faultcode

xmlns:code="http://schemas.xmlsoap.org/ws/2004/03/addressing">code:Destinati
onUnreachable</faultcode>
>         <faultstring>Microsoft.Web.Services2.Addressing.AddressingFault:
> Destination Unreachable ---> System.Exception: WSE816: The <To> header must
[quoted text clipped - 4 lines]
>    --- End of inner exception stack trace ---
>    at

Microsoft.Web.Services2.WebServicesExtension.AutoIssueSecurityContextToken(S
oapEnvelope request)
>    at

Microsoft.Web.Services2.WebServicesExtension.BeforeDeserializeServer(SoapSer
verMessage message)</faultstring>
>         <faultactor>http://external/MyService.asmx</faultactor>
>       </soap:Fault>
[quoted text clipped - 7 lines]
> Afni Insurance Services
> http://www.afniinc.com/
Thomas S. Trias - 01 Apr 2005 19:29 GMT
Sidd,

I never saw your reply on the MSDN portal to the newsgroup, but I found it
on DotNetMonster...

My service is actually derived from System.Web.Services.WebService; I will
look up the relationship between SoapService and WebService.  Since the
enpoint is an asmx page, it looks like the asmx http handler is doing a lot
of work without ever instantiating my object (e.g. providing the page that
lists the operations, providing an HTTP test page for each operation,
providing a way to retreive the WSDL, mapping SoapActions to method calls).  
Inheriting from SecurityContextTokenService doesn't change the http handler
behavior, so I guess I have to just write my own full-blown http handler,
just to set the SoapActor for
http://schemas.xmlsoap.org/ws/2004/04/security/trust/RST/SCT requests.  I
don't want to lose any of the other functionality that the default asmx
handler provides in the process...

Thomas S. Trias
Senior Developer
Afni Insurance Services
http://www.afniinc.com/

---------------------------------------------------------------------------------------------------------------
Hi Thomas,

  I am assuming that you are using a SoapService to accomplish this? Have
you tried inheriting your service from SecurityContextTokenService rather
than SoapService?

Thanks,

Sidd [MSFT]

[quoted text clipped - 20 lines]
xmlns:code="http://schemas.xmlsoap.org/ws/2004/03/addressing">code:Destinati
onUnreachable</faultcode>
[quoted text clipped - 9 lines]
Microsoft.Web.Services2.WebServicesExtension.AutoIssueSecurityContextToken(S
oapEnvelope request)
>    at

Microsoft.Web.Services2.WebServicesExtension.BeforeDeserializeServer(SoapSer
verMessage message)</faultstring>
[quoted text clipped - 12 lines]

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.