Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / June 2004

Tip: Looking for answers? Try searching our database.

how to make a web service exempt from WSE2 settings in a v.dir

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim Mackey - 24 Jun 2004 12:51 GMT
hi,
i have a web application configured and working with WSE2.
however, i have a web service (not WSE) in the same virtual directory that gives errors about messages not conforming to the policy they are mapped to. i am guessing this is because WSE is intercepting all soap requests for the whole application, including web services that don't use WSE2.
does anyone know how i can make this web service exempt from the WSE2 soap filters?
my config file is below..

i can modify the non-WSE web service, but the existing clients with references to it must still be able to work with it...

thanks for any help!
tim

<configSections>
 <section name="microsoft.web.services2" type="Microsoft.Web.Services2.Configuration.WebServicesConfiguration, Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken1bf3856ad364e35" />
</configSections>
...
<microsoft.web.services2>
 <messaging>
  <maxRequestLength>256000</maxRequestLength>
 </messaging>
 <diagnostics>
  <detailedErrors enabled="false" />
 </diagnostics>
 <security>
  <x509 allowTestRoot="true" allowRevocationUrlRetrieval="false" verifyTrust="true" />
  <securityTokenManager type="Ibenza.WebManager.Web.Forms.CustomUsernameTokenManager, WebForms" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
   qname="wsse:UsernameToken" />
  <defaultTtlInSeconds>60</defaultTtlInSeconds>
  <timeToleranceInSeconds>120</timeToleranceInSeconds>
 </security>
 <policy>
  <cache name="policyCache.config" />
 </policy>

\\ email: tim at mackey dot ie //
\\ blog: http://tim.mackey.ie //
67d0ebfec70e8db3
Lucien - 25 Jun 2004 22:41 GMT
You can also create a policy for that endpoint and specify no policy (empty string for policy id's). Another solution is to use 2 vdir but that might not be an option.

 hi,
 i have a web application configured and working with WSE2.
 however, i have a web service (not WSE) in the same virtual directory that gives errors about messages not conforming to the policy they are mapped to. i am guessing this is because WSE is intercepting all soap requests for the whole application, including web services that don't use WSE2.
 does anyone know how i can make this web service exempt from the WSE2 soap filters?
 my config file is below..

 i can modify the non-WSE web service, but the existing clients with references to it must still be able to work with it...

 thanks for any help!
 tim

  <configSections>
   <section name="microsoft.web.services2" type="Microsoft.Web.Services2.Configuration.WebServicesConfiguration, Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken1bf3856ad364e35" />
  </configSections>
 ...
  <microsoft.web.services2>
   <messaging>
    <maxRequestLength>256000</maxRequestLength>
   </messaging>
   <diagnostics>
    <detailedErrors enabled="false" />
   </diagnostics>
   <security>
    <x509 allowTestRoot="true" allowRevocationUrlRetrieval="false" verifyTrust="true" />
    <securityTokenManager type="Ibenza.WebManager.Web.Forms.CustomUsernameTokenManager, WebForms" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
     qname="wsse:UsernameToken" />
    <defaultTtlInSeconds>60</defaultTtlInSeconds>
    <timeToleranceInSeconds>120</timeToleranceInSeconds>
   </security>
   <policy>
    <cache name="policyCache.config" />
   </policy>

 \\ email: tim at mackey dot ie //
 \\ blog: http://tim.mackey.ie //
 67d0ebfec70e8db3
Tim Mackey - 28 Jun 2004 09:20 GMT
Hi Lucien,
i got it working, but it took a while to figure out.  i realised the endpoint uri is case-sensitive.  this seems crazy to me.  the whole history of IIS is that is isn't case sensitive for urls, web services, etc. is this behaviour intended?  to reproduce this behaviour, i tested a working winforms client off the web service. then changed the policy file on the web server by changing the case of one of the characters, and then re-ran the winforms client and got an exception saying that no policy could be found for the message.

another caveat i found was that the WSE2 setting in the app.config file in the winforms client was forcing all web service requests from the app to use WSE2 soap protocols, which was causing an exception when that app called code from a library containing a web service that didn't use WSE2.  it's not a problem though because the existing clients won't have that setting in their app.config files.

many thanks for your help lucien, and i would be interested to see if someone can explain the case-sensitive endpoint.

tim

\\ email: tim at mackey dot ie //
\\ blog: http://tim.mackey.ie //
67d0ebfec70e8db3
 You can also create a policy for that endpoint and specify no policy (empty string for policy id's). Another solution is to use 2 vdir but that might not be an option.

   "Tim Mackey" <tim@scootasp.net> wrote in message news:2jvti8F145sk2U1@uni-berlin.de...
   hi,
   i have a web application configured and working with WSE2.
   however, i have a web service (not WSE) in the same virtual directory that gives errors about messages not conforming to the policy they are mapped to. i am guessing this is because WSE is intercepting all soap requests for the whole application, including web services that don't use WSE2.
   does anyone know how i can make this web service exempt from the WSE2 soap filters?
   my config file is below..

   i can modify the non-WSE web service, but the existing clients with references to it must still be able to work with it...

   thanks for any help!
   tim

    <configSections>
     <section name="microsoft.web.services2" type="Microsoft.Web.Services2.Configuration.WebServicesConfiguration, Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken1bf3856ad364e35" />
    </configSections>
   ...
    <microsoft.web.services2>
     <messaging>
      <maxRequestLength>256000</maxRequestLength>
     </messaging>
     <diagnostics>
      <detailedErrors enabled="false" />
     </diagnostics>
     <security>
      <x509 allowTestRoot="true" allowRevocationUrlRetrieval="false" verifyTrust="true" />
      <securityTokenManager type="Ibenza.WebManager.Web.Forms.CustomUsernameTokenManager, WebForms" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
       qname="wsse:UsernameToken" />
      <defaultTtlInSeconds>60</defaultTtlInSeconds>
      <timeToleranceInSeconds>120</timeToleranceInSeconds>
     </security>
     <policy>
      <cache name="policyCache.config" />
     </policy>

   \\ email: tim at mackey dot ie //
   \\ blog: http://tim.mackey.ie //
   67d0ebfec70e8db3
Tim Mackey - 28 Jun 2004 09:23 GMT
hi- i just noticed this is the same question as kapil has just posted.  i will watch his thread for an answer.
thanks
tim

\\ email: tim at mackey dot ie //
\\ blog: http://tim.mackey.ie //
67d0ebfec70e8db3
 Hi Lucien,
 i got it working, but it took a while to figure out.  i realised the endpoint uri is case-sensitive.  this seems crazy to me.  the whole history of IIS is that is isn't case sensitive for urls, web services, etc. is this behaviour intended?  to reproduce this behaviour, i tested a working winforms client off the web service. then changed the policy file on the web server by changing the case of one of the characters, and then re-ran the winforms client and got an exception saying that no policy could be found for the message.

 another caveat i found was that the WSE2 setting in the app.config file in the winforms client was forcing all web service requests from the app to use WSE2 soap protocols, which was causing an exception when that app called code from a library containing a web service that didn't use WSE2.  it's not a problem though because the existing clients won't have that setting in their app.config files.

 many thanks for your help lucien, and i would be interested to see if someone can explain the case-sensitive endpoint.

 tim

 \\ email: tim at mackey dot ie //
 \\ blog: http://tim.mackey.ie //
 67d0ebfec70e8db3
   "Lucien" <*lucien*@MicrosoftAccount.com> wrote in message news:uluq40vWEHA.1356@TK2MSFTNGP09.phx.gbl...
   You can also create a policy for that endpoint and specify no policy (empty string for policy id's). Another solution is to use 2 vdir but that might not be an option.

     "Tim Mackey" <tim@scootasp.net> wrote in message news:2jvti8F145sk2U1@uni-berlin.de...
     hi,
     i have a web application configured and working with WSE2.
     however, i have a web service (not WSE) in the same virtual directory that gives errors about messages not conforming to the policy they are mapped to. i am guessing this is because WSE is intercepting all soap requests for the whole application, including web services that don't use WSE2.
     does anyone know how i can make this web service exempt from the WSE2 soap filters?
     my config file is below..

     i can modify the non-WSE web service, but the existing clients with references to it must still be able to work with it...

     thanks for any help!
     tim

      <configSections>
       <section name="microsoft.web.services2" type="Microsoft.Web.Services2.Configuration.WebServicesConfiguration, Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken1bf3856ad364e35" />
      </configSections>
     ...
      <microsoft.web.services2>
       <messaging>
        <maxRequestLength>256000</maxRequestLength>
       </messaging>
       <diagnostics>
        <detailedErrors enabled="false" />
       </diagnostics>
       <security>
        <x509 allowTestRoot="true" allowRevocationUrlRetrieval="false" verifyTrust="true" />
        <securityTokenManager type="Ibenza.WebManager.Web.Forms.CustomUsernameTokenManager, WebForms" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
         qname="wsse:UsernameToken" />
        <defaultTtlInSeconds>60</defaultTtlInSeconds>
        <timeToleranceInSeconds>120</timeToleranceInSeconds>
       </security>
       <policy>
        <cache name="policyCache.config" />
       </policy>

     \\ email: tim at mackey dot ie //
     \\ blog: http://tim.mackey.ie //
     67d0ebfec70e8db3
Lucien - 28 Jun 2004 22:49 GMT
URI's are treated case sensitive as defined in specifications/RFC (except for the host name part). Arguably this is a bug in IIS and this is 'fixed' in WSE. You could use default endpoint with action string URI's instead (if that would fit into your scenario).

WSE2 builds on top of ASMX. It's supports the 'same' soap protocol but it adds extensions. The only change should be a timestamp header but mustUnderstand should be false. What is the error you're seeing? It should not break an ASMX app.

Lucien

 hi- i just noticed this is the same question as kapil has just posted.  i will watch his thread for an answer.
 thanks
 tim

 \\ email: tim at mackey dot ie //
 \\ blog: http://tim.mackey.ie //
 67d0ebfec70e8db3
   "Tim Mackey" <tim@scootasp.net> wrote in message news:2ka2n9F19tl4gU1@uni-berlin.de...
   Hi Lucien,
   i got it working, but it took a while to figure out.  i realised the endpoint uri is case-sensitive.  this seems crazy to me.  the whole history of IIS is that is isn't case sensitive for urls, web services, etc. is this behaviour intended?  to reproduce this behaviour, i tested a working winforms client off the web service. then changed the policy file on the web server by changing the case of one of the characters, and then re-ran the winforms client and got an exception saying that no policy could be found for the message.

   another caveat i found was that the WSE2 setting in the app.config file in the winforms client was forcing all web service requests from the app to use WSE2 soap protocols, which was causing an exception when that app called code from a library containing a web service that didn't use WSE2.  it's not a problem though because the existing clients won't have that setting in their app.config files.

   many thanks for your help lucien, and i would be interested to see if someone can explain the case-sensitive endpoint.

   tim

   \\ email: tim at mackey dot ie //
   \\ blog: http://tim.mackey.ie //
   67d0ebfec70e8db3
     "Lucien" <*lucien*@MicrosoftAccount.com> wrote in message news:uluq40vWEHA.1356@TK2MSFTNGP09.phx.gbl...
     You can also create a policy for that endpoint and specify no policy (empty string for policy id's). Another solution is to use 2 vdir but that might not be an option.

       "Tim Mackey" <tim@scootasp.net> wrote in message news:2jvti8F145sk2U1@uni-berlin.de...
       hi,
       i have a web application configured and working with WSE2.
       however, i have a web service (not WSE) in the same virtual directory that gives errors about messages not conforming to the policy they are mapped to. i am guessing this is because WSE is intercepting all soap requests for the whole application, including web services that don't use WSE2.
       does anyone know how i can make this web service exempt from the WSE2 soap filters?
       my config file is below..

       i can modify the non-WSE web service, but the existing clients with references to it must still be able to work with it...

       thanks for any help!
       tim

        <configSections>
         <section name="microsoft.web.services2" type="Microsoft.Web.Services2.Configuration.WebServicesConfiguration, Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken1bf3856ad364e35" />
        </configSections>
       ...
        <microsoft.web.services2>
         <messaging>
          <maxRequestLength>256000</maxRequestLength>
         </messaging>
         <diagnostics>
          <detailedErrors enabled="false" />
         </diagnostics>
         <security>
          <x509 allowTestRoot="true" allowRevocationUrlRetrieval="false" verifyTrust="true" />
          <securityTokenManager type="Ibenza.WebManager.Web.Forms.CustomUsernameTokenManager, WebForms" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
           qname="wsse:UsernameToken" />
          <defaultTtlInSeconds>60</defaultTtlInSeconds>
          <timeToleranceInSeconds>120</timeToleranceInSeconds>
         </security>
         <policy>
          <cache name="policyCache.config" />
         </policy>

       \\ email: tim at mackey dot ie //
       \\ blog: http://tim.mackey.ie //
       67d0ebfec70e8db3
Lucien - 28 Jun 2004 23:06 GMT
Tim,

I checked #2 and when I use a client proxy derived from ASXM client protocol the message doesn't go through WSE. Which WSE2 setting in app.config are you referring to? Check that you're not using the proxy derived from Microsoft.Web.Services2.WebServicesClientProtocol (if you don't want it go through WSE2 filters).

 hi- i just noticed this is the same question as kapil has just posted.  i will watch his thread for an answer.
 thanks
 tim

 \\ email: tim at mackey dot ie //
 \\ blog: http://tim.mackey.ie //
 67d0ebfec70e8db3
   "Tim Mackey" <tim@scootasp.net> wrote in message news:2ka2n9F19tl4gU1@uni-berlin.de...
   Hi Lucien,
   i got it working, but it took a while to figure out.  i realised the endpoint uri is case-sensitive.  this seems crazy to me.  the whole history of IIS is that is isn't case sensitive for urls, web services, etc. is this behaviour intended?  to reproduce this behaviour, i tested a working winforms client off the web service. then changed the policy file on the web server by changing the case of one of the characters, and then re-ran the winforms client and got an exception saying that no policy could be found for the message.

   another caveat i found was that the WSE2 setting in the app.config file in the winforms client was forcing all web service requests from the app to use WSE2 soap protocols, which was causing an exception when that app called code from a library containing a web service that didn't use WSE2.  it's not a problem though because the existing clients won't have that setting in their app.config files.

   many thanks for your help lucien, and i would be interested to see if someone can explain the case-sensitive endpoint.

   tim

   \\ email: tim at mackey dot ie //
   \\ blog: http://tim.mackey.ie //
   67d0ebfec70e8db3
     "Lucien" <*lucien*@MicrosoftAccount.com> wrote in message news:uluq40vWEHA.1356@TK2MSFTNGP09.phx.gbl...
     You can also create a policy for that endpoint and specify no policy (empty string for policy id's). Another solution is to use 2 vdir but that might not be an option.

       "Tim Mackey" <tim@scootasp.net> wrote in message news:2jvti8F145sk2U1@uni-berlin.de...
       hi,
       i have a web application configured and working with WSE2.
       however, i have a web service (not WSE) in the same virtual directory that gives errors about messages not conforming to the policy they are mapped to. i am guessing this is because WSE is intercepting all soap requests for the whole application, including web services that don't use WSE2.
       does anyone know how i can make this web service exempt from the WSE2 soap filters?
       my config file is below..

       i can modify the non-WSE web service, but the existing clients with references to it must still be able to work with it...

       thanks for any help!
       tim

        <configSections>
         <section name="microsoft.web.services2" type="Microsoft.Web.Services2.Configuration.WebServicesConfiguration, Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken1bf3856ad364e35" />
        </configSections>
       ...
        <microsoft.web.services2>
         <messaging>
          <maxRequestLength>256000</maxRequestLength>
         </messaging>
         <diagnostics>
          <detailedErrors enabled="false" />
         </diagnostics>
         <security>
          <x509 allowTestRoot="true" allowRevocationUrlRetrieval="false" verifyTrust="true" />
          <securityTokenManager type="Ibenza.WebManager.Web.Forms.CustomUsernameTokenManager, WebForms" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
           qname="wsse:UsernameToken" />
          <defaultTtlInSeconds>60</defaultTtlInSeconds>
          <timeToleranceInSeconds>120</timeToleranceInSeconds>
         </security>
         <policy>
          <cache name="policyCache.config" />
         </policy>

       \\ email: tim at mackey dot ie //
       \\ blog: http://tim.mackey.ie //
       67d0ebfec70e8db3
Tim Mackey - 29 Jun 2004 00:47 GMT
hi lucien,
thanks for following up my query.  my situation may be a little unique.  i will explain some more:
i have a web application which runs a content managed web site, it contains WSE2 a web service. with methods to service winforms clients.  there is also a non-WSE web service there which is an app updater for the winforms clients, which has its code behind in a different dll (not part of the main web app code, although still part the same v.dir). because i have web.config settings in the main web app, i am guessing they also apply to the non-WSE service.  

on the winforms side then, the clients start up by calling an app updater component, which is configured to reference the non-WSE web service.  however, the app.config for the winforms app contains the following setting:
<configSections>
<section name="microsoft.web.services2" type="Microsoft.Web.Services2.Configuration.WebServicesConfiguration, Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken1bf3856ad364e35" />
</configSections>

the policy not found message occurs when the app udpater code tries to call the non-WSE web service.  even though there is an endpoint with an empty string defaultOperation for the appUpdater web service. the winforms appupdater component doesn't know about WSE at all, but i suspect the app.config setting may be getting in the way of non-WSE communication. this is the policycache snippet:
<endpoint uri="http://shuttle/appUpdater.asmx">
<defaultOperation>
<request policy="" />
<response policy="" />
<fault policy="" />
</defaultOperation>
</endpoint>

i have worked around it on the winforms side by separating the appUpdater into a separate executable with its own app.config file (with no WSE2 settings), which actually turns out to be a cleaner setup for restarting / updating the application in my opinion.  so i'm not too hung up about reaching a hurdle with my unusual setup of old non-WSE2 components running in an app that is set up to use WSE2.

thanks for all your help
tim

\\ email: tim at mackey dot ie //
\\ blog: http://tim.mackey.ie //
67d0ebfec70e8db3
 Tim,

 I checked #2 and when I use a client proxy derived from ASXM client protocol the message doesn't go through WSE. Which WSE2 setting in app.config are you referring to? Check that you're not using the proxy derived from Microsoft.Web.Services2.WebServicesClientProtocol (if you don't want it go through WSE2 filters).

   "Tim Mackey" <tim@scootasp.net> wrote in message news:2ka2saF19t7lbU1@uni-berlin.de...
   hi- i just noticed this is the same question as kapil has just posted.  i will watch his thread for an answer.
   thanks
   tim

   \\ email: tim at mackey dot ie //
   \\ blog: http://tim.mackey.ie //
   67d0ebfec70e8db3
     "Tim Mackey" <tim@scootasp.net> wrote in message news:2ka2n9F19tl4gU1@uni-berlin.de...
     Hi Lucien,
     i got it working, but it took a while to figure out.  i realised the endpoint uri is case-sensitive.  this seems crazy to me.  the whole history of IIS is that is isn't case sensitive for urls, web services, etc. is this behaviour intended?  to reproduce this behaviour, i tested a working winforms client off the web service. then changed the policy file on the web server by changing the case of one of the characters, and then re-ran the winforms client and got an exception saying that no policy could be found for the message.

     another caveat i found was that the WSE2 setting in the app.config file in the winforms client was forcing all web service requests from the app to use WSE2 soap protocols, which was causing an exception when that app called code from a library containing a web service that didn't use WSE2.  it's not a problem though because the existing clients won't have that setting in their app.config files.

     many thanks for your help lucien, and i would be interested to see if someone can explain the case-sensitive endpoint.

     tim

     \\ email: tim at mackey dot ie //
     \\ blog: http://tim.mackey.ie //
     67d0ebfec70e8db3
       "Lucien" <*lucien*@MicrosoftAccount.com> wrote in message news:uluq40vWEHA.1356@TK2MSFTNGP09.phx.gbl...
       You can also create a policy for that endpoint and specify no policy (empty string for policy id's). Another solution is to use 2 vdir but that might not be an option.

         "Tim Mackey" <tim@scootasp.net> wrote in message news:2jvti8F145sk2U1@uni-berlin.de...
         hi,
         i have a web application configured and working with WSE2.
         however, i have a web service (not WSE) in the same virtual directory that gives errors about messages not conforming to the policy they are mapped to. i am guessing this is because WSE is intercepting all soap requests for the whole application, including web services that don't use WSE2.
         does anyone know how i can make this web service exempt from the WSE2 soap filters?
         my config file is below..

         i can modify the non-WSE web service, but the existing clients with references to it must still be able to work with it...

         thanks for any help!
         tim

          <configSections>
           <section name="microsoft.web.services2" type="Microsoft.Web.Services2.Configuration.WebServicesConfiguration, Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken1bf3856ad364e35" />
          </configSections>
         ...
          <microsoft.web.services2>
           <messaging>
            <maxRequestLength>256000</maxRequestLength>
           </messaging>
           <diagnostics>
            <detailedErrors enabled="false" />
           </diagnostics>
           <security>
            <x509 allowTestRoot="true" allowRevocationUrlRetrieval="false" verifyTrust="true" />
            <securityTokenManager type="Ibenza.WebManager.Web.Forms.CustomUsernameTokenManager, WebForms" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
             qname="wsse:UsernameToken" />
            <defaultTtlInSeconds>60</defaultTtlInSeconds>
            <timeToleranceInSeconds>120</timeToleranceInSeconds>
           </security>
           <policy>
            <cache name="policyCache.config" />
           </policy>

         \\ email: tim at mackey dot ie //
         \\ blog: http://tim.mackey.ie //
         67d0ebfec70e8db3

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.