Securing webmethods webservice selectively using policy files.
- From: "Swapna" <yswapna44@xxxxxxxxxxx>
- Date: 14 Dec 2005 04:03:10 -0800
Hi,
I am using wse3.0 to secure webservice.
I have two web methods in this webservice
viz. HelloWorldWithSecurity.
HelloWorldWithOutSecurity.
1) Can I secure only HelloWorldWithSecurity and leave
HelloWorldWithOutSecurity not secured ?
Is it always necessary to specify the Policy attribute for the class in
the webservice if we are using the policy method to secure webservices
?
eg.
[WebService(Namespace = "http://www.contoso.com/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[Policy("ServicePolicy")] // is this necessary ???
public class Service : System.Web.Services.WebService
{
public Service () {
}
[WebMethod]
public string HelloWorldWithSecurity() {
return "Hello World with security";
}
[WebMethod]
public string HelloWorldWithOutSecurity() {
return "Hello World without security";
}
}
2) Can requestAction attribute of the protection element be used for
this ?
The problem I am facing is - If i dont specify the Policy attribute for
the class none of the methods are secured.
If I use the policy attribute all of them are secured irrespective of
the method name in the request action attribute.
Can anyone help me out with this ???
Thanks.
.
- Follow-Ups:
- Re: Securing webmethods webservice selectively using policy files.
- From: Pablo Cibraro
- Re: Securing webmethods webservice selectively using policy files.
- Prev by Date: RE: Problem accessing a database in the authenticatetoken function
- Next by Date: Securing webmethods webservice selectively using policy files.
- Previous by thread: RE: Problem accessing a database in the authenticatetoken function
- Next by thread: Re: Securing webmethods webservice selectively using policy files.
- Index(es):