Groups | Blog | Home
all groups > dotnet web services enhancements > november 2007 >

dotnet web services enhancements : WSE 2 and 3 dual mode, problems


Tim Mackey
11/21/2007 4:29:58 PM
hi,
i am in the situation of needing to support a WSE2 winforms client and a
WSE3 winforms client.
i have set up the web site with a separate ASMX file for each, and both
clients work if they are the first to access their respective web service.
the WSE2 client works consistently, but the WSE3 client fails after an
undetermined time, it seems to be related to any activity on the WSE2
service. possibly the WSE2 soapExtensionImporterType is overriding the WSE3
one somehow. i tried clearing this section in the WSE3 section of
web.config, but that had no effect. 'touching' the web.config file allows
both clients to begin working again. is there a better approach to this
problem than what i am currently doing?

relevant sections from web.config below.
thanks in advance for any help
tim

<?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" />
<section name="microsoft.web.services2"
type="Microsoft.Web.Services2.Configuration.WebServicesConfiguration,
Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" />
</configSections>

....

<compilation defaultLanguage="c#" debug="true">
<assemblies>
<add assembly="Microsoft.Web.Services2, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="Microsoft.Web.Services3, Version=3.0.0.0,
Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

....

<location path="WSE2.asmx">
<system.web>
<webServices>
<soapExtensionTypes>
<add type="Microsoft.Web.Services2.WebServicesExtension,
Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" priority="1" group="0" />
</soapExtensionTypes>
</webServices>
</system.web>
</location>

<location path="WSE3.asmx">
<system.web>
<webServices>
<soapServerProtocolFactory
type="Microsoft.Web.Services3.WseProtocolFactory, Microsoft.Web.Services3,
Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<soapExtensionImporterTypes>
<add
type="Microsoft.Web.Services3.Description.WseExtensionImporter,
Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
</soapExtensionImporterTypes>
</webServices>
</system.web>
</location>

....

<microsoft.web.services3>
<policy fileName="policyCache3.config"/>
<security>
<securityTokenManager>
<add type="CustomUsernameTokenManager3"
namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
localName="UsernameToken"/>
</securityTokenManager>
</security>
</microsoft.web.services3>

<microsoft.web.services2>
<messaging>
<maxRequestLength>10000</maxRequestLength>
</messaging>
<security>
<securityTokenManager type="CustomUsernameTokenManager2"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
qname="wsse:UsernameToken" />
<defaultTtlInSeconds>86400</defaultTtlInSeconds>
<timeToleranceInSeconds>86400</timeToleranceInSeconds>
</security>
<policy>
<cache name="policyCache2.config" />
</policy>
</microsoft.web.services2>
stcheng@online.microsoft.com
11/22/2007 4:28:49 AM
Hi Tim,

From your description, you have two winform clients, one use WSE2 and
another use WSE3. And the server-side WSE2 and WSE3 service are hosted in
the same ASP.NET application/project, and you got problem with them to work
together, right?

If this is the case, I think the problem should be due to some collision
between the two WSE framework. As we know, WSE just use a
soapextension(injected in ASP.NET webservice processing pipeline) to do
those WSE processing. If you use both ones in your project, that means
there contains two extensions there, there is no gurantee that this will
work. Is it possible that the two WSE parts be separated in two
application. One ASP.NET 1.1 webservice and another ASP.NET 2.0 webservice?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
From: "Tim Mackey" <tim.mackey@community.nospam>
Subject: WSE 2 and 3 dual mode, problems
Date: Wed, 21 Nov 2007 16:29:58 -0000

hi,
i am in the situation of needing to support a WSE2 winforms client and a
WSE3 winforms client.
i have set up the web site with a separate ASMX file for each, and both
clients work if they are the first to access their respective web service.
the WSE2 client works consistently, but the WSE3 client fails after an
undetermined time, it seems to be related to any activity on the WSE2
service. possibly the WSE2 soapExtensionImporterType is overriding the WSE3
one somehow. i tried clearing this section in the WSE3 section of
web.config, but that had no effect. 'touching' the web.config file allows
both clients to begin working again. is there a better approach to this
problem than what i am currently doing?

relevant sections from web.config below.
thanks in advance for any help
tim

<?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" />
<section name="microsoft.web.services2"
type="Microsoft.Web.Services2.Configuration.WebServicesConfiguration,
Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" />
</configSections>

...

<compilation defaultLanguage="c#" debug="true">
<assemblies>
<add assembly="Microsoft.Web.Services2, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="Microsoft.Web.Services3, Version=3.0.0.0,
Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

...

<location path="WSE2.asmx">
<system.web>
<webServices>
<soapExtensionTypes>
<add type="Microsoft.Web.Services2.WebServicesExtension,
Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" priority="1" group="0" />
</soapExtensionTypes>
</webServices>
</system.web>
</location>

<location path="WSE3.asmx">
<system.web>
<webServices>
<soapServerProtocolFactory
type="Microsoft.Web.Services3.WseProtocolFactory, Microsoft.Web.Services3,
Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<soapExtensionImporterTypes>
<add
type="Microsoft.Web.Services3.Description.WseExtensionImporter,
Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
</soapExtensionImporterTypes>
</webServices>
</system.web>
</location>

...

<microsoft.web.services3>
<policy fileName="policyCache3.config"/>
<security>
<securityTokenManager>
<add type="CustomUsernameTokenManager3"
namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit
y-secext-1.0.xsd"
localName="UsernameToken"/>
</securityTokenManager>
</security>
</microsoft.web.services3>

<microsoft.web.services2>
<messaging>
<maxRequestLength>10000</maxRequestLength>
</messaging>
<security>
<securityTokenManager type="CustomUsernameTokenManager2"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri
ty-secext-1.0.xsd"
qname="wsse:UsernameToken" />
<defaultTtlInSeconds>86400</defaultTtlInSeconds>
<timeToleranceInSeconds>86400</timeToleranceInSeconds>
</security>
<policy>
<cache name="policyCache2.config" />
</policy>
stcheng@online.microsoft.com
11/26/2007 2:25:27 AM
Hi Tim,

Any progress on this issue? If there is anything else need help, please
feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



This posting is provided "AS IS" with no warranties, and confers no rights.





--------------------
From: stcheng@online.microsoft.com (Steven Cheng[MSFT])
Organization: Microsoft
Date: Thu, 22 Nov 2007 04:28:49 GMT
Subject: RE: WSE 2 and 3 dual mode, problems


Hi Tim,

From your description, you have two winform clients, one use WSE2 and
another use WSE3. And the server-side WSE2 and WSE3 service are hosted in
the same ASP.NET application/project, and you got problem with them to work
together, right?

If this is the case, I think the problem should be due to some collision
between the two WSE framework. As we know, WSE just use a
soapextension(injected in ASP.NET webservice processing pipeline) to do
those WSE processing. If you use both ones in your project, that means
there contains two extensions there, there is no gurantee that this will
work. Is it possible that the two WSE parts be separated in two
application. One ASP.NET 1.1 webservice and another ASP.NET 2.0 webservice?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
From: "Tim Mackey" <tim.mackey@community.nospam>
Subject: WSE 2 and 3 dual mode, problems
Date: Wed, 21 Nov 2007 16:29:58 -0000

hi,
i am in the situation of needing to support a WSE2 winforms client and a
WSE3 winforms client.
i have set up the web site with a separate ASMX file for each, and both
clients work if they are the first to access their respective web service.
the WSE2 client works consistently, but the WSE3 client fails after an
undetermined time, it seems to be related to any activity on the WSE2
service. possibly the WSE2 soapExtensionImporterType is overriding the WSE3
one somehow. i tried clearing this section in the WSE3 section of
web.config, but that had no effect. 'touching' the web.config file allows
both clients to begin working again. is there a better approach to this
problem than what i am currently doing?

relevant sections from web.config below.
thanks in advance for any help
tim

<?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" />
<section name="microsoft.web.services2"
type="Microsoft.Web.Services2.Configuration.WebServicesConfiguration,
Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" />
</configSections>

...

<compilation defaultLanguage="c#" debug="true">
<assemblies>
<add assembly="Microsoft.Web.Services2, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="Microsoft.Web.Services3, Version=3.0.0.0,
Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

...

<location path="WSE2.asmx">
<system.web>
<webServices>
<soapExtensionTypes>
<add type="Microsoft.Web.Services2.WebServicesExtension,
Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" priority="1" group="0" />
</soapExtensionTypes>
</webServices>
</system.web>
</location>

<location path="WSE3.asmx">
<system.web>
<webServices>
<soapServerProtocolFactory
type="Microsoft.Web.Services3.WseProtocolFactory, Microsoft.Web.Services3,
Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<soapExtensionImporterTypes>
<add
type="Microsoft.Web.Services3.Description.WseExtensionImporter,
Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
</soapExtensionImporterTypes>
</webServices>
</system.web>
</location>

...

<microsoft.web.services3>
<policy fileName="policyCache3.config"/>
<security>
<securityTokenManager>
<add type="CustomUsernameTokenManager3"
namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit
y-secext-1.0.xsd"
localName="UsernameToken"/>
</securityTokenManager>
</security>
</microsoft.web.services3>

<microsoft.web.services2>
<messaging>
<maxRequestLength>10000</maxRequestLength>
</messaging>
<security>
<securityTokenManager type="CustomUsernameTokenManager2"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri
ty-secext-1.0.xsd"
qname="wsse:UsernameToken" />
<defaultTtlInSeconds>86400</defaultTtlInSeconds>
<timeToleranceInSeconds>86400</timeToleranceInSeconds>
</security>
<policy>
<cache name="policyCache2.config" />
</policy>
AddThis Social Bookmark Button