Click here to Skip to main content
11,805,266 members (53,394 online)
Rate this: bad
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 18:08pm
Edited 28-May-13 18:10pm
Mukeshlky4u at 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
0 OriginalGriff 315
1 Richard Deeming 200
2 Sergey Alexandrovich Kryukov 170
3 CPallini 160
4 CHill60 150
0 OriginalGriff 3,255
1 Maciej Los 1,990
2 KrunalRohit 1,907
3 CPallini 1,855
4 Richard MacCutchan 1,227

Advertise | Privacy | Mobile
Web03 | 2.8.151002.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