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 / January 2007

Tip: Looking for answers? Try searching our database.

No SoapContext

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
APA - 17 Jan 2007 09:46 GMT
In the constructor of my web service I have no access to the SoapContext (i.e. RequestSoapContext.Current).  Not only that but I have implemented a
customer UsernameTokenmanger.AuthenticateToken method and it doesn't call that either.  I have the following setup in my web.config

<configSections>
    <section name="microsoft.web.services3" type="Microsoft.Web.Services3.Configuration.WebServicesConfiguration, Microsoft.Web.Services3,        
Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</configSections>

and

<microsoft.web.services3>
    <security>
        <securityTokenManager type="AppCommonProj.CustomUsernameTokenManager, AppCommonProj"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" qname="wsse:UsernameToken"/>
    </security>
    <diagnostics/>
</microsoft.web.services3>

I'm using a testing tool (that works fine with other web services that I've developed in .NET 1.1 but this web service is developed in .NET2.0 using
WSE3.   I'm not really doing anything odd just checking the SoapContext to see if the request was made using SOAP and not using POST or GET.  Here's
what I'm doing in my web service's constructor.

        SoapContext sContext = RequestSoapContext.Current;
        if (sContext == null)
        {
            throw new Exception("Invalid web service request.");
        }

sContext is always null.  Have no idea why and I don't understand why the UsernameTokenmanger.AuthenticateToken method is not being called either.

TIA.
APA - 17 Jan 2007 12:00 GMT
Well I got by this problem when I went through the WSE3 setup wizard and then deleted all the policy crap that it created.  However, my custom
AuthenticateToken method is still not called.  The WSE3 setup wizard modifed the securityTokenManager element to look like this but it still never
calls it (and never tried even with the policy stuff).

  <microsoft.web.services3>
    <security>
      <securityTokenManager>
        <add type="AppCommonProj.ASPDNSFUsernameTokenManager, AppCommonProj"
namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" localName="UsernameToken" />
      </securityTokenManager>
    </security>
    <diagnostics />
  </microsoft.web.services3>

What took me 10 minutes in WSE2 is taking 6 hours in WSE3 what a POS.

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.