Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We have a site running on MOSS 2007 which makes calls to custom web service asmx methods on the same domain from the client.

At first everything works fine, but after a bit of time has passed the service will start to fail with:

[domain]/_layouts/error.aspx?ErrorText=Request format is unrecognized for URL unexpectedly ending in %27%2FIsSuspectWaterLevel%27.

Interestingly enough [domain]/_vti_bin/Custom/CustomFunctionality.asmx?op=IsSuspectWaterLevel is still available, but a call to [domain]/_vti_bin/Custom/CustomFunctionality.asmx/IsSuspectWaterLevel will fail as described.

We've found that "touching" C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\ISAPI\ web.config will bring the webservice back to life.

The asmx file lives at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI\ECan\MyECan_ComplianceWaterUsage.asmx

Any ideas of what might be going on here and how to resolve them?

Some extra detail:

App pool settings in case they're useful: http://i51.tinypic.com/x51qw.png

The following web.config settings are present in the root and sub directory hosting the asmx:

  <system.web>
    <webServices>
      <protocols>
        <add name="HttpSoap" />
        <add name="HttpGet" />
        <add name="HttpPost" />
      </protocols>
    </webServices>
  ...
  </system.web>

We are calling the web service from javascript (jQuery). I've checked all the settings mentioned in this link and all match. I think calling from javascript may not be the culprit though as going directly to

[domain]/_vti_bin/Custom/CustomFunctionality.asmx/IsSuspectWaterLevel

with parameters supplied also fails with the same error - no javascript involved. Failing after a short period of time has passed, but works fine when web.config has just been "touched" again.

Thanks in advance for any help! Cheers, Gavin

share|improve this question
    
If you are going to cross post, at least have the decency to include all data in the question asked and not linking to your cross posts for details. Really... Closed the question until this is fixed. Ask a mod if you want it re-opened after this is fixed. –  Anders Rask Jul 20 '11 at 22:14
    
Hi Anders, sorry for that - made suggested changes. How do I get a mod to re-open the post? cheers. –  Gavin Jul 20 '11 at 22:28
    
Thanx! q reopened... –  Anders Rask Jul 20 '11 at 22:32
1  
according to your settings, when the web.config is "touched", it fires a recycle of the App Pool. So it's the recycling of the App Pool which makes your app works again. You should check the SharePoint logs to see if nothing fails –  GillouX Jul 21 '11 at 12:19
    
Thanks for the suggestion GillouX. Scanning through the logs and searching against various related function names etc. doesn't yield any obvious results. I'm wondering if it's something to do with a url parsing module(?) of some flavor somewhere failing though as I can get to CustomFunctionality.asmx but not CustomFunctionality.asmx/IsSuspectWaterLevel –  Gavin Jul 21 '11 at 22:09

1 Answer 1

up vote 0 down vote accepted

An inelegant workaround to this issue that works for us: We've swapped out the web service asmx end point for a web handler ashx endpoint. This doesn't suffer the same issue for some reason.

I'm guessing from this that there's some issue creeping in after a period of time which is causing urls to resolve incorrectly. I suspect that the / after the .asmx in the url is the curprit. The ashx endpoint implemented is working purely on url parameters and posted data.

Obviously this work around won't always be an option for others who might experience the same issue as we're loosing a lot of the rich web service functionality that's pre-baked in to an asmx endpoint.

Unfortunately I won't be able to test any other solutions that people might put forward from now on as we've moved away from the web service asmx approach. Sorry.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.