Hello.
I'm developing a VS2005(VB), ASP.NET 2.0, .Net Framwwork 2.0, WSE 3.0, Web
Application.
In the following code i'm getting an error on the SetPolicy line. The error
is :
"Parameter name: Policy 'XataClientPolicy' is not configured in the system"
Dim proxy As New xatanetconduitwebservice.XataNetConduitWebServiceWse
proxy.Url =
"https://www.xatanet.net/XataNetWebService/XataNetConduitWebService.asmx"
Dim user As New UsernameToken(txtCompany & "\" & txtUserName, txtPassword,
PasswordOption.SendHashed)
proxy.SetClientCredential(Of UsernameToken)(user)
proxy.SetPolicy("XataClientPolicy")
I have 'XataClientPolicy' as an application policy on the policy tab of the
WSE3.0 settings. The wse3policyCache.Config is in my project and it has the
policy 'XataClientPolicy' policy name in it. I can see it.
I don't know why i am getting this error message.
Any help would be gratefully appreciated.
Thanks,
Tony
Tony Girgenti - 16 Feb 2007 16:57 GMT
Just to let others know, i paid Microsft for a support incident to resolve
this problem.
Part of the problem was that i could not check the Check box "Enable
Microsoft Web Services Enhancement Soap Protocol Factory" on the General tab
of the WSE Settings 3.0 dialog.
They resolved it by telling me to create a new web application in VS2005.
Go to the WSE Settings 3.0 dialog, set both the "Enable this project for Web
Services Enhancements" and the "Enable Microsoft Web Services Enhancement
Soap Protocol Factory" on the General tab. Then go to the Policy and create
a policy with the same name as the one i was using in my converted program.
Then they had me copy the following lines from the WEB.CONFIG of the new web
application to the WEB.CONFIG of the converted application.
This line because the converted application was still using "Services2":
<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>
These lines just before the </system.web>:
<webServices>
<soapExtensionImporterTypes>
<add type="Microsoft.Web.Services3.Description.WseExtensionImporter,
Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" />
</soapExtensionImporterTypes>
<soapServerProtocolFactory type="Microsoft.Web.Services3.WseProtocolFactory,
Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" />
</webServices>
These lines after the </system.web>:
<microsoft.web.services3>
<policy fileName="wse3policyCache.config" />
</microsoft.web.services3>
After that, i ran the application and it never blew up on the SetPolicy
command.
They said that the conversion from VS2003 to VS2005 did not convert the
WEB.CONFIG file. That is why it was saying "Policy 'XataClientPolicy' is
not configured in the system".
Good luck.
Tony
> Hello.
>
[quoted text clipped - 23 lines]
> Thanks,
> Tony