Hi.
No mater what I do, I can't seem to define my custom usernameTokenManager
type properly in my client app pointing to my WSE 3.0 web service.
my custom usernameTokenManager is in the root name space of my web service
Public Class customUsernameTokenManager
Inherits UsernameTokenManager
the config is:
<microsoft.web.services3>
<security>
<securityTokenManager>
<add
type="WebSvcsNameSpace.customUsernameTokenManager,WebSvcsAssemblyNameName"
namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" localName="UsernameToken" />
</securityTokenManager>
<policy fileName="wse3policyCache.config" />
</security>
</microsoft.web.services3>
just for your notes, WebSvcsAssemblyNameName and WebSvcsNameSpace are the
same name in my world - let's call is XWebService
I'm lost.
Any attempt any any combination of naming fails.
Help!
Robert Achmann - 31 Jul 2007 16:20 GMT
ok - here's the exception I get:
System.Configuration.ConfigurationErrorsException was unhandled
BareMessage="WSE032: There was an error loading the
microsoft.web.services3 configuration section."
Line=0
Message="WSE032: There was an error loading the microsoft.web.services3
configuration section."
Source="Microsoft.Web.Services3"
StackTrace:
at
Microsoft.Web.Services3.Configuration.WebServicesConfiguration.get_Current()
at
Microsoft.Web.Services3.Configuration.WebServicesConfiguration.get_MessagingConfiguration()
at Microsoft.Web.Services3.WebServicesClientProtocol..ctor()
at ConsoleTestBed.ws_xWebService.xWebServiceWSWse..ctor() in
C:\Projects\xWebServiceWS\ConsoleTestBed\Web
References\ws_xWebService\Reference.vb:line 40
at ConsoleTestBed.Module1.Main() in
C:\Projects\xWebServiceWS\ConsoleTestBed\Module1.vb:line 9
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Inner Exception is also a System.Configuration.ConfigurationErrorsException:
{"WSE040: Type xWebServiceWS.customUsernameTokenManager,xWebService could
not be loaded.
Please check the configuration file.
(C:\Projects\xWebServiceWS\ConsoleTestBed\bin\Debug\ConsoleTestBed.vshost.exe.config line 14)"}
Hope this helps.
> Hi.
>
[quoted text clipped - 27 lines]
>
> Help!
Robert Achmann - 01 Aug 2007 20:10 GMT
I got it all working!!!
I noticed a couple of things to make it really easy to work with the wizard,
and so that changes the wizard makes actually go into the web service site.
I don’t create an ASP web service from any project template in VS 2005.
I create a virtual dir on the web server that points to an empty directory
and allow execute permissions with a Low (IIS Process) Application Protection
setting. ( I will be depending on hardware SSL)
I then open up my solution that has NO web services in it.
I add the existing empty web site manually (not create a new web service)
I add a new asmx web service file, and web.config file, to the web site.
I set up a web method call and make sure my client is updated with that web
reference, and test it.
THEN I use the WSE 3.0 wizard to set up my custom Policy….
THEN I follow the code steps in the Hands on Lab for WSE3.0 Security:
(this meant I had to read something...
...If all else fails, read the instructions)
Hands-On Lab - HOL202 Introduction to WSE 3.0 Security
It all works. Yay!
I can wrap up my test client and web service for anyone who wants it.
R.
vidhyasudha - 11 Aug 2008 13:48 GMT
Hello,
I have the same the problem as described by you. I have a webserive
application and on it's code behind i wrote the custom security class for
WSE 3.0. I have added the reference to this webservice on the client side.I
have applied all the changes explained in the post. Still getting the same
issues. Any thought on this will help me.#
Cheers,
Vids