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 / October 2006

Tip: Looking for answers? Try searching our database.

having problems getting routing working with username token policy

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mike wolf - 09 Oct 2006 20:36 GMT
hello all could some one please direct me to docs on setting up a routing
service to work w/ a policy assertion on the destination web service.

I can not seem to get it to work.

I have overwritten the SoapHttpRouter and the GetRequestPolicy() and
GetForwardRequestPolicy to return the server policy, the destination web
service is also set up as a proticol factory, and its self set up w/ an
identical policy to the router. but no matter what configuration I try I
continually get

Exception Details: System.InvalidOperationException: Security requirements
are not satisfied because the security header is not present in the incoming
message.

any help would be greatly appreciated
Pablo Cibraro [MVP] - 10 Oct 2006 15:24 GMT
Sure, you can find some documentation and a good implementation of a Soap
Router here,
http://msdn.microsoft.com/library/en-us/dnpag2/html/WSS_Ch6_ImpPerimServRout_WSE
30.asp

That code belongs to the Security Patterns guide published by the Microsoft
Patterns & Practices team.

Regards,
Pablo Cibraro
http://weblogs.asp.net/cibrax

> hello all could some one please direct me to docs on setting up a routing
> service to work w/ a policy assertion on the destination web service.
[quoted text clipped - 13 lines]
>
> any help would be greatly appreciated
mike wolf - 11 Oct 2006 14:10 GMT
Thanks pablo appreciate the response, I have tried to use the permiter
routing example, but im still getting an exception when it trys to route

"System.InvalidOperationException: Security requirements are not satisfied
because the security header is not present in the incoming message."

in my router I have 2 policies, one for the incomming request and one for
the forwarded request.

I have created my own soaprouter, with some diagnostics, I see it gets
through the constructor and the getrequest but never makes it to
GetForwardRequestPolicy.  I believe its getting blocked on the router policy,
but cant seem to figure out why...

   public class MessageRouter : SoapHttpRouter
   {
       public MessageRouter()
           : base()
       {
           EventLog.WriteEntry("router", "constructor",
EventLogEntryType.Information);
       }

       
       /// <summary>
       /// Returns a WSE policy to be used between the router and the service
       /// </summary>
       /// <returns></returns>
       protected override Policy GetForwardRequestPolicy()
       {
           EventLog.WriteEntry("router", "forward",
EventLogEntryType.Information);

           PolicyConfiguration configuration =
WebServicesConfiguration.PolicyConfiguration;
           Policies policies = configuration.GetPolicies();
           Policy policy = policies["forward"];

           return policy;
       }

       /// <summary>
       /// Returns a WSE policy to be used between the client and the router
       /// </summary>
       protected override Policy GetRequestPolicy()
       {
           EventLog.WriteEntry("router", "request",
EventLogEntryType.Information);

           // Lookup in the configuration for the policy
           PolicyConfiguration configuration =
WebServicesConfiguration.PolicyConfiguration;
           Policies policies = configuration.GetPolicies();
           Policy policy = policies["request"];
           EventLog.WriteEntry("router", "request end",
EventLogEntryType.Information);

           return policy;
       }

> Sure, you can find some documentation and a good implementation of a Soap
> Router here,
[quoted text clipped - 23 lines]
> >
> > any help would be greatly appreciated
Pablo Cibraro [MVP] - 12 Oct 2006 14:59 GMT
Hi Mike,

Did you take a look to the WSE trace files on the router ?. You will be able
to find more details about the error in those files.
If you do not understand the problem described in the trace, feel free to
post the content here so I can take a look.

Regards,
Pablo.

> Thanks pablo appreciate the response, I have tried to use the permiter
> routing example, but im still getting an exception when it trys to route
[quoted text clipped - 90 lines]
>> >
>> > any help would be greatly appreciated
mike wolf - 12 Oct 2006 17:59 GMT
thanks pablo, I found my problem... via the tracing and the event log and
overwritting some methods just for tracing...

silly mistake, I didnt understand that with in a single policy you can have
mulitple assertions, so in the service you need the assertion for both the
router and the client... the client being the first assertion in the policy...

thanks for the help

> Hi Mike,
>
[quoted text clipped - 100 lines]
> >> >
> >> > any help would be greatly appreciated

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.