Servergrid UserLink

... connection ... education ... discovery ... information ...
Welcome to Servergrid UserLink Sign in | Join | Help
in
Home Blogs Forums Photos Downloads Servergrid Join Now Private Messages

Writing asynchronous background tasks for ASP.NET 3.5 sites on Servergrid

Last post 02-02-2010, 7:19 AM by Budsy. 0 replies.
Sort Posts: Previous
  • Writing asynchronous background tasks for ASP.NET 3.5 sites on Servergrid

     02-02-2010, 7:19 AM

    • Joined on 10-18-2009
    • Moscow, Idaho
    • Posts 9
    • Points 46
    • Top 25 Contributor
      Male

    I had a problem getting some background processing done on one of my sites on ServerGrid. Turns out it was crashing (actually, it locked up the whole system) on ServerGrid, but working on our test servers. The problem was related to differences in the IIS 6 on Servergrid and other IIS versions. I had written a web service that triggers a long-running background task (spidering the site, building sitemap.xml and local search engine database updates).

    A detailed thread on this appears on the Microsoft ASP.NET site, URL http://forums.asp.net/p/1497440/3538570.aspx#3538570

    It appears that IIS 6 works a little differently than IIS 5. For my application, all I needed to do was REMOVE the web service method attribute

    [SoapDocumentMethod(OneWay = true)]

    I then call the web service routine from the code page in the main web application using the form:

    webserviceobject.BeginMyServiceMethod(new AsyncCallback(AsyncMyServiceMethodCallBack), null);

    I then provided a do-nothing AsyncCallback delegate, and now this approach is working in both the IIS 5 and IIS 6 contexts.

    Maybe this will help someone else save a little time.


     


    *****************
    * Budsy **********
    *****************
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems