i have developed webservice using webmethod
- [WebMethod]
- public string HelloWorld()
- {
- return "Hello World";
- }
- public UserDetails User;
- [WebMethod]
- [SoapHeader("User", Required = true)]
- public string SayHello(string userName)
- {
- if (User != null)
- {
- if (User.IsValid())
- return string.Format("Hello...{0} ☺ ", userName);
- else
- return "Error in authentication";
- }
- else
- {
- return "Error in authentication";
- }
- }
All working Fine
but issue is when i run from desktop app its data (request and response) shown in web debugging software Like Fiddler.
even SOAP header is Shown.
(see attached screenshot)
How can i secure this Type of web Service (web method)