I have these policy endpoints defined:
<endpoint uri="http://localhost/bbb/a1/service.asmx">
... all endpint definition
</endpoint>
<endpoint uri="http://localhost/bbb/a2/service.asmx">
... all endpint definition
</endpoint>
When I run this under SP1, everything goes fine.
With SP2 it seems unable to distinguish both endpoints uri.
Here is the stack trace:
System.Web.Services.Protocols.SoapHeaderException:
System.Web.Services.Protocols.SoapHeaderException: Server unavailable,
please try later --->
Microsoft.Web.Services2.Policy.PolicyDocumentException: WSE453: An error was
encountered loading or parsing the policy document in the following file:
c:/webservice/policycache.config. ---> System.ArgumentException: An entry
with the same key already exists. at
System.Collections.Specialized.ListDictionary.Add(Object key, Object value)
at System.Collections.Specialized.HybridDictionary.Add(Object key, Object
value) at Microsoft.Web.Services2.Policy.PolicyMappings.LoadXml(XmlElement
element) at
Microsoft.Web.Services2.Policy.PolicyDocument.LoadXml(IDictionary table,
ArrayList expressions, PolicyMappings policyMaps, XmlElement element) at
Microsoft.Web.Services2.Policy.PolicyDocument.LoadDocumentFromDisk() --- End
of inner exception stack trace --- at
Microsoft.Web.Services2.Policy.PolicyDocument.LoadDocumentFromDisk() at
Microsoft.Web.Services2.Policy.PolicyDocument.Initialize() at
Microsoft.Web.Services2.Policy.PolicyDocument.GetPolicyMaps() at
Microsoft.Web.Services2.Policy.PolicyDocument.GetMappedPolicyExpression(Uri
to, String requestAction) at
Microsoft.Web.Services2.Policy.PolicyManager.Lookup(Uri to, String action)
at Microsoft.Web.Services2.Policy.SimplePolicyVerifier.Verify(SoapEnvelope
message) at Microsoft.Web.Services2.Policy.PolicyManager.Verify(SoapEnvelope
message) at
Microsoft.Web.Services2.Policy.PolicyVerificationInputFilter.ProcessMessage(SoapEnvelope
envelope) at
Microsoft.Web.Services2.Pipeline.ProcessInputMessage(SoapEnvelope envelope)
at
Microsoft.Web.Services2.WebServicesExtension.BeforeDeserializeServer(SoapServerMessage
message) --- End of inner exception stack trace ---

Signature
Hernan de Lahitte
http://weblogs.asp.net/hernandl
Hernan de Lahitte - 16 Dec 2004 16:03 GMT
I got the answer.
WSE won?t let you have two different endpoints mapped to the same physical
location. This is because of a canonicalization process that the endpoint
uri suffers when WSI parse the policy file.

Signature
Hernan de Lahitte
http://weblogs.asp.net/hernandl
http://www.lagash.com/english/index.html
"An expert is one who knows more and more about less and less until he knows
absolutely everything about nothing".
>I have these policy endpoints defined:
> <endpoint uri="http://localhost/bbb/a1/service.asmx">
[quoted text clipped - 42 lines]
> Microsoft.Web.Services2.WebServicesExtension.BeforeDeserializeServer(SoapServerMessage
> message) --- End of inner exception stack trace ---