Application Diagram problem with WSE 3.0

I have a solution that contains an ASP.NET web service that uses WSE 3.0.  It also uses a custom UsernameTokenManager.  The application compiles and runs properly.  However, when I attempt to open an Application Diagram, Visual Studio locks the diagram and displays the following error:

Application definition MyWebService is locked because there is an error in C:\MySolution\MyWebService.web.config.  WSE040: Type MyProject.MyUsernameTokenManager, MyProject could not be loaded.  Please check the configuration file.

The configuration file is correct, since the application works fine, and has worked fine for a long time.  The web.config lines in question are:

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

The custom UsernameTokenManager is contained in a class library and the web service project has a project reference to the class library. The assembly exists in the web service bin folder; like I said, the application runs just fine.  The only time there is a problem loading is when I try to open an Application Diagram.

Any ideas

Oh, I should mention that WSE 3.0 is installed.



Answer this question

Application Diagram problem with WSE 3.0

  • K.Kong

    Hi Ian,

    Microsoft.Web.Service3.dll is in the GAC on my machine as well. I installed WSE 3.0 as Visual Studio Developer. WSE works just fine, the only time I have a problem is using the system/application designers. If I comment out the custom username token manager from the web.config then the designers work, but that's not a practical workaround. Here is my web.config, thanks for your help:

    < xml version="1.0" >
    <configuration
    >
    <
    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
    >
    <
    system.web
    >
    <
    webServices
    >
    <
    soapExtensionImporterTypes
    >
    <
    add type="Microsoft.Web.Services3.Description.WseExtensionImporter, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    />
    </
    soapExtensionImporterTypes
    >
    <
    wsdlHelpGenerator href=""
    />
    <
    soapServerProtocolFactory type="Microsoft.Web.Services3.WseProtocolFactory, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    />
    </
    webServices
    >
    <
    compilation debug="true"
    >
    <
    assemblies
    >
    <
    add assembly="Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
    />
    <
    add assembly="System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"
    />
    <
    add assembly="System.Messaging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"
    />
    <
    add assembly="System.Configuration.Install, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"
    />
    <
    add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"
    />
    </
    assemblies
    >
    </
    compilation
    >
    <
    identity impersonate="true"></identity
    >
    </
    system.web
    >
    <
    microsoft.web.services3
    >
    <
    policy fileName="wse3policyCache.config"
    />
    <
    security
    >
    <
    securityTokenManager
    >
    <
    add type="MyProject.MyUsernameTokenManager, MyProject" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" localName="UsernameToken"
    />
    </
    securityTokenManager
    >
    </
    security
    >
    </
    microsoft.web.services3
    >
    </
    configuration>


  • Stefan Toller

    Hi John,

    This sounds like another instance of the problem described at http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=739843&SiteID=1. Please try the workaround detailed in that post and let me know if it works or not.

    Regards,

    Ian Bavey Lead Software Development Engineer

    Team Architect


  • Kuei-yang Lo

    Hi John,

    I'm seeing the same problem now. You should be able to fix it by repeating the workaround described earlier for MyProject.dll. Please let me know if this fixes the issue for you.

    Thanks,

    Ian


  • donbox5

    Unfortunately the workaround you used is the only solution available today. To make the solution a bit easier you may want to consider creating a post-build step that copies the assemblies to the PrivateAssemblies directory.

    Regards,

    Ian


  • pessi

    Hi Ian,

    I tried placing MyProject.dll in the PrivateAssemblies folder but that didn't work. I changed the reference from the project to the specific assembly in the PrivateAssemblies folder but that didn't help either. Is there some part of the "workaround" that I'm missing

    Thanks!

    John


  • LouArnold

    I tried the workaround and it didn't make any difference. This line was already in my web.config:

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

    I copied the Microsoft.Web.Services3.dll into PrivateAssemblies; is there something else I should do Right now I have to comment out the <securityTokenManager> in order to work with the diagrams.

    Thanks!


  • sebahattingokce

    I finally got this working. I had to add some other assemblies that were used by MyProject.dll. I didn't have to include all of its references and I'm not sure why I needed these two. These project references will change often during development and it will be quite cumbersome to copy these assemblies to PrivateAssemblies constantly. Is there any other resolution to this problem

    Thanks!

    John


  • OC

    Hi John,

    I tried installing WSE 3.0 on my machine and added the same section to a config file but can still open an Application Designer. On my machine Microsoft.Web.Services3.dll is installed in the GAC. Is that also true on your machine What install options did you use when installing WSE 3.0 I chose Visual Studio Developer.

    Is it possible that you could forward a more complete snippet of your config file so that I can debug further as it's possible there are some other interactions going on that I don't have visibility into.

    Ian


  • Application Diagram problem with WSE 3.0