解决WebService无法调试的问题(SchemaSerializationMode)

在我开发的WinForm+WebService程序中,偶尔会出现WebService无法调试的状况,莫名其妙地就会跟踪到这样的代码段:
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.BrowsableAttribute(true)]
[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)]
public override System.Data.SchemaSerializationMode SchemaSerializationMode {
 get {
  return this._schemaSerializationMode;
 }
 set {
  this._schemaSerializationMode = value;
 }
}

解决方法是对IDE进行设置:【工具】-【选项】-【调试】-【常规】,去掉[启用“仅我的代码”(仅限托管)]设置项前面的复选框。

也有人说删除对WebService的引用,然后重新添加就好了。

参考:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=244866&SiteID=1
https://blogs.msdn.com/jmstall/archive/2004/12/31/344832.aspx

posted @ 2007-09-17 15:43  队长  阅读(1302)  评论(0编辑  收藏  举报