July 2006 - Posts

This must be well known by all you AJAXians, but I didn't know...

I build a webpage that polled a webservice on a regular basis via a XmlHttPrequest.
Locally, it worked perfect. But when I deployed it to the testsite, it failed miserably.

After some Googling, I found out httpget and httppost should explicitely be added to the web.config because remote posts and gets are disabled BY DEFAULT.

So:

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

        </protocols>
    </webServices>
    </system.web>
</configuration>

Because we ran into time-out problems on my current project, I'm been looking into more details about time-outs.

First of all:

  • IIS: time-out value doesn't really matter for ASP.NET apps, because this is set by the web/machine.config. Used for ASP apps and such...
  • <httpruntime executionTimeout=... />: this can be set in web- or machine.config.

So, I made a winform test app and a webservice which should throw a time-out exception back to the winform. And it didn't...!
Why not?

Simple, really, if you know....
In the config file there's a setting <compilation debug="true">. As long as this debug attribute is set to true, your webservice will not time-out...

Seems that Microsoft decided, for debug purposes, that time-outs like that shouldn't occur in a debug situation. Nice to know!