'System.StackOverflowException'需要帮助 [英] Needed help on 'System.StackOverflowException'

查看:74
本文介绍了'System.StackOverflowException'需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的,


我是C#WebServices的新手。我编译它返回的WebService项目没有

错误构建:1成功,0失败,0跳过。


基本上我有2个WebMethod,当时我尝试调用它的第一种方法

正常工作。然后,当我尝试调用第二种方法时,它返回一个

错误,只是及时调试,错误消息

异常''System.StackOverflowException' '已发生在WebServices中'


有什么问题?如何解决?


提前谢谢。

Dear all,

I''m new to C# WebServices. I compile the WebService project it return no
errors "Build: 1 succeeded, 0 failed, 0 skipped".

Basically I have 2 WebMethod, when I try to invoke the first method it is
working fine. Then when I try to invoke the second method it return me an
error, Just In-Time Debugging, with error message
"An exception ''System.StackOverflowException'' has occurred in WebServices"

What is the problem ? How to resolve it ?

Thanks in advance.

推荐答案

这很难说,没有看代码,但大部分时间

当一个funtcion中有无限循环时抛出StackOverflowException,

a经典exmaple


公共字符串SayHello()

{

返回SayHello();

}


问候

Erymuzuan Mustapa


Mae Lim写道:
it''s hard to tell, without looking a the code, but most of the time
StackOverflowException thrown when there''s infinite loop in a funtcion ,
a classic exmaple

public string SayHello()
{
return SayHello();
}

Regards
Erymuzuan Mustapa

Mae Lim wrote:
亲爱的,

我'我是C#WebServices的新手。我编译WebService项目它没有返回
错误Build:1成功,0失败,0跳过。

基本上我有2个WebMethod,当我尝试调用第一个方法时工作正常。然后,当我尝试调用第二个方法时,它返回一个
错误,只是及时调试,错误消息
异常''System.StackOverflowException''发生在WebServices中

有什么问题?如何解决?

提前致谢。
Dear all,

I''m new to C# WebServices. I compile the WebService project it return no
errors "Build: 1 succeeded, 0 failed, 0 skipped".

Basically I have 2 WebMethod, when I try to invoke the first method it is
working fine. Then when I try to invoke the second method it return me an
error, Just In-Time Debugging, with error message
"An exception ''System.StackOverflowException'' has occurred in WebServices"

What is the problem ? How to resolve it ?

Thanks in advance.



嗨erymuzuan,


如何跟踪

WebServices中抛出StackOverflowException的位置?我可以使用任何工具吗?

" erymuzuan"写道:
Hi erymuzuan,

How do I trace where is the StackOverflowException is thrown in the
WebServices ? Is there any tools that I can use ?
"erymuzuan" wrote:
很难说,没有查看代码,但大部分时间
当一个funtcion中存在无限循环时抛出StackOverflowException,
一个经典的例子

公共字符串SayHello()
{
返回SayHello();
}

问候
Erymuzuan Mustapa

Mae Lim写道:
it''s hard to tell, without looking a the code, but most of the time
StackOverflowException thrown when there''s infinite loop in a funtcion ,
a classic exmaple

public string SayHello()
{
return SayHello();
}

Regards
Erymuzuan Mustapa

Mae Lim wrote:
亲爱的,

我是C#WebServices的新手。我编译WebService项目它没有返回
错误Build:1成功,0失败,0跳过。

基本上我有2个WebMethod,当我尝试调用第一个方法时工作正常。然后,当我尝试调用第二个方法时,它返回一个
错误,只是及时调试,错误消息
异常''System.StackOverflowException''发生在WebServices中

有什么问题?如何解决?

提前致谢。
Dear all,

I''m new to C# WebServices. I compile the WebService project it return no
errors "Build: 1 succeeded, 0 failed, 0 skipped".

Basically I have 2 WebMethod, when I try to invoke the first method it is
working fine. Then when I try to invoke the second method it return me an
error, Just In-Time Debugging, with error message
"An exception ''System.StackOverflowException'' has occurred in WebServices"

What is the problem ? How to resolve it ?

Thanks in advance.



如果您是Web服务的开发人员,即如果你有权访问

代码那么你总是可以在你的WebMethod中添加一个try / catch块。




[WebMethod]

public void MyMethod()

{

试试

{

}

catch(exception ex)

{

System.Diagnostics.Debug.WriteLine(ex.ToString());

}

}


并从 www.sysinternals.com 阅读错误消息。


如果它是一个简单的ASP.NET Web服务参数类型,你可以

说服所有者让你看到完整的异常消息

设置

< customErrors

mode ="关闭>
服务'
web.config文件,然后您可能想要尝试从浏览器调用

Web服务,方法是导航到服务的URL和

输入参数值测试页。


HTH,

Christoph Schittko

MVP XML
http://weblogs.asp.net/cschittko

If you are the developer of the Web service, i.e. if you have access to
the code then you can always add a try/catch block around the lines in
your WebMethod:

[WebMethod]
public void MyMethod()
{
try
{
}
catch( Exception ex )
{
System.Diagnostics.Debug.WriteLine( ex.ToString() );
}
}

and run DebugView from www.sysinternals.com to read the error message.

If it''s an ASP.NET web service with simple parameter types and you can
convince the owner to allow you to see the full exception messages by
setting
<customErrors
mode="Off">
in the service''s web.config file, then you may want to try invoking the
web service from the browser by navigating to the service''s URL and
entering the parameter values on the test page.

HTH,
Christoph Schittko
MVP XML
http://weblogs.asp.net/cschittko

-----原始消息-----
来自:Mae Lim [mailto:Ma **** @ discussion.microsoft.com]
发表日期:2005年1月2日,星期日6:下午45点
发布到:microsoft.public.dotnet.framework.webservices
对话:''System.StackOverflowException'需要帮助'
主题:Re:需要''System.StackOverflowException的帮助''

嗨erymuzuan,

如何追踪在Web服务中抛出StackOverflowException的位置?我可以使用任何工具吗?

" erymuzuan"写道:
-----Original Message-----
From: Mae Lim [mailto:Ma****@discussions.microsoft.com]
Posted At: Sunday, January 02, 2005 6:45 PM
Posted To: microsoft.public.dotnet.framework.webservices
Conversation: Needed help on ''System.StackOverflowException''
Subject: Re: Needed help on ''System.StackOverflowException''

Hi erymuzuan,

How do I trace where is the StackOverflowException is thrown in the
WebServices ? Is there any tools that I can use ?
"erymuzuan" wrote:
很难说,没有查看代码,但大部分时间
当$ b中存在无限循环时抛出StackOverflowException $ b funtcion,
it''s hard to tell, without looking a the code, but most of the time
StackOverflowException thrown when there''s infinite loop in a funtcion ,
一个经典的例子

公共字符串SayHello()
{
返回SayHello();
}

Erymuzuan Mustapa

Mae Lim写道:
a classic exmaple

public string SayHello()
{
return SayHello();
}

Regards
Erymuzuan Mustapa

Mae Lim wrote:
亲爱的,
我是C#WebServices的新手。我编译WebService项目
Dear all,

I''m new to C# WebServices. I compile the WebService project it


返回没有错误Build:1成功,0失败,0跳过。

基本上我有2个WebMethod,当我尝试调用第一个

return no errors "Build: 1 succeeded, 0 failed, 0 skipped".

Basically I have 2 WebMethod, when I try to invoke the first


方法,它

工作正常。然后,当我尝试调用第二种方法时,
is working fine. Then when I try to invoke the second method it


返回

错误,即时调试,错误消息
异常 System.StackOverflowException''已在WebServices中发生'
有什么问题?如何解决?

提前致谢。
an error, Just In-Time Debugging, with error message
"An exception ''System.StackOverflowException'' has occurred in WebServices"
What is the problem ? How to resolve it ?

Thanks in advance.






这篇关于'System.StackOverflowException'需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆