Click here to Skip to main content
11,928,919 members (51,741 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET Visual-Studio , +
I have web Service :
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using Microsoft.Web.Services3;
[WebService(Namespace = "")]
public class Service : System.Web.Services.WebService
    public string GetValue()
       SoapContext soapContext1 = RequestSoapContext.Current;
       Security returnValue = default(Security);
       returnValue = soapContext1.Security;
       SecurityToken objSecurityToken = default(SecurityToken);
       objSecurityToken = soapContext1.IdentityToken;
        //Say hello to the guy that you know
        var name=RequestSoapContext.Current.IdentityToken.Identity.Name;
        return "Hello " + name;
I have post this XML :
<soap:Envelope xmlns:soap="" xmlns:xsi="" xmlns:xsd="" xmlns="" xmlns:wsu="">
        <Header >
            <!-- If calling system is storing the response, then they could populate  this field before saving -->
            <!--Optional field to pass. This may contain any tracking Id of the calling system -->
            <!-- This will not be sent in Reponse  -->
            <wsse:Security xmlns:wsse="">
                <wsse:UsernameToken wsu:Id="sample" xmlns:wsu="">
                    <!-- User Name was issued by Hub team. Please check with Hub team if you do not have it -->
                    <wsse:Password Type="">EVpXS/7yc/vDo+ZyIg+cc0fWderwrwer=</wsse:Password>
            <Extensions xsi:nil="true"/>
in web method
The value of
objSecurityToken is null and returnValue is null.
How i can find the value of Security(Username,Password,Nonce) in my web method(GetValue()).
Please suggest me how to get these value in web method
Posted 28-May-13 19:08pm
Edited 28-May-13 19:10pm
Mukeshlky4u 31-May-13 5:13am
Please help me...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.151126.1 | Last Updated 29 May 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100