Sys.Net.WebServiceFailedException: The server method '' failed with

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • eusebiu

    Sys.Net.WebServiceFailedException: The server method '' failed with

    Hello...

    Let's say we have a time consuming function, aaa inside a aspx page.

    [WebMethod]
    public static string aaa(int i)
    {
    Thread.Sleep(10 00);
    return i.ToString();
    }

    Inside the aspx file:
    <div>
    <asp:ScriptMana ger ID="ScriptManag er1" runat="server"
    EnablePageMetho ds="true">
    </asp:ScriptManag er>
    <span id="displayspan "></span>
    <br />
    <input type="button" value="click me" onclick="Stress ()"/>
    <script language="javas cript" type="text/javascript">
    function Stress()
    {
    for(var i = 0 ; i < 100 ; i++)
    {
    PageMethods.aaa (i, function(res, ctrl){
    document.getEle mentById('displ ayspan').innerH TML
    +=res.toString( ) + ' ';
    });
    }
    }
    </script>
    </div>
    The problem is that when I click on the button, I get an error:
    "Sys.Net.WebSer viceFailedExcep tion: The server method '' failed with
    the following error:" .... and no error description

    Can someone tell me how to workaround this issue?

    Thanks

    P.S. In Firefox 2.0.0.16, Opera and Safari(Windows version) this code
    works....
  • eusebiu

    #2
    Re: Sys.Net.WebServ iceFailedExcept ion: The server method '' failed

    In VS TS 2008 this exception isn't raised.... only in VS 2008
    Professional

    Comment

    Working...