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

Tip: Looking for answers? Try searching our database.

WSE 3 > VB.Net > CreateClientOutputFilter

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeroen - 26 Mar 2006 23:51 GMT
I would like to add an UsernameToken to every outgoing wse request. I created
a custom clientoutputfilter and put the assertion together with a Policy in
my wse3Policycache. On the webservices server i have a custom usernametoken
manager wich validates the message.

Is it possible to define the custom filter for all wse3 webservice requests,
without defining the policy imperatively in code?

Otherwise i have to edit al my existing ASP.net 2.0 Code, and set the policy
like:

          // create policy
           Policy policy = new Policy();
           policy.Assertions.Add(assert);

           // and set it to web service
          srv.SetPolicy(policy);
Pablo Cibraro - 27 Mar 2006 15:14 GMT
Hi,

You can also define the policy declaratively by means of an attribute in the
web service proxy.
However, there is no way to apply security for all requests without
specifying a policy.

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

>I would like to add an UsernameToken to every outgoing wse request. I
>created
[quoted text clipped - 18 lines]
>            // and set it to web service
>           srv.SetPolicy(policy);
Jeroen - 29 Mar 2006 15:25 GMT
Hi Pablo,

Thanks for your reply, the reason i'm asking this, is because we are using
ObjectDatasources to fill datalists and other stuff. I can change the
typename for the objectdatasource to classname + Wse but I don't have the
option to add the wse policy imperatively. I have found a solution with
partial classes, but cannot get it to work.  

Our policy contains an custom securitypolicyassertion with a
clientoutputfilter as SendSecurityFilter wich adds an usernametoken to the
security.tokens collection.

This is what i have tried:

Namespace svcSecurityService

<Microsoft.Web.Services3.Policy("FrontendWSESecurity")> _
Partial Class SecurityServiceWse
Inherits Microsoft.Web.Services3.WebServicesClientProtocol

End Class

End Namespace

' Tried this, but also didn't work
<Microsoft.Web.Services3.Policy("FrontendWSESecurity")> _
Partial Class monitoring
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load

Dim SecurityService As New svcSecurityService.SecurityServiceWse
'' // Toepassen policy op de webservice....
SecurityService.SetPolicy(Basis.Configuratie.Beveiliging.WsePolicy.GetPolicy)

We are developing our asp.net webapplication entirely in VB.

Regards,

Jeroen

> Hi,
>
[quoted text clipped - 29 lines]
> >            // and set it to web service
> >           srv.SetPolicy(policy);
Jeroen - 29 Mar 2006 15:32 GMT
The setpolicy used imperatively works like a charm.....

But i need the suggested class
<Microsoft.Web.Services3.Policy("FrontendWSESecurity")> attribute to work.....

Regards,

Jeroen

> Hi Pablo,
>
[quoted text clipped - 70 lines]
> > >            // and set it to web service
> > >           srv.SetPolicy(policy);

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.