0

具有 web 服务 (C#) 访问权限的应用程序在 MAC(iphone 模拟器)上运行良好,但在 iphone (发布和调试模式)上不起作用。当我尝试创建一个新的 web 服务实例时会发生这种情况。

        "YNSMS.ynSMSws.Service1 wsSMS = new YNSMS.ynSMSws.Service1();" 

会不会是 Monotouch iphone 运行时错误?有什么办法可以解决吗?

加载程序集:/private/var/mobile/Applications/47D2DA1C-28BA-43C8-BCF0-919D307C60EB/YNSMS.app/monotouch.dll 加载程序集:/private/var/mobile/Applications/47D2DA1C-28BA-43C8-BCF0-919D307C60EB /YNSMS.app/Mono.Security.dll 加载程序集:/private/var/mobile/Applications/47D2DA1C-28BA-43C8-BCF0-919D307C60EB/YNSMS.app/System.dll 加载程序集:/private/var/mobile/Applications /47D2DA1C-28BA-43C8-BCF0-919D307C60EB/YNSMS.app/System.Xml.dll 加载的程序集:/private/var/mobile/Applications/47D2DA1C-28BA-43C8-BCF0-919D307C60EB/YNSMS.app/System.Web。 Services.dll 加载的程序集:/private/var/mobile/Applications/47D2DA1C-28BA-43C8-BCF0-919D307C60EB/YNSMS.app/AddressBookExample.exe 线程已启动:将“MainView.xib.cs:70”处的挂起断点解析为 Void AddressBookExample.MainView:ExecutaBotao ():0。* 断言在 ../../../..

在(包装器托管到本机) System.MonoCustomAttrs.GetCustomAttributesInternal (System.Reflection.ICustomAttributeProvider,System.Type,bool) <0xffffffff> 在 System.MonoCustomAttrs.GetCustomAttributesBase (System.Reflection.ICustomAttributeProvider,System.Type) <0x0006c>在 System.MonoCustomAttrs.GetCustomAttributes (System.Reflection.ICustomAttributeProvider,bool) <0x00037> 在 System.Reflection.MonoField.GetCustomAttributes (bool) <0x00023> 在 System.Xml.Serialization.XmlAttributes..ctor (System.Reflection.ICustomAttributeProvider) <0x0009f> 在 System.Xml.Serialization.XmlReflectionImporter.GetReflectionMembers (System.Type) <0x004ef> 在 System.Xml.Serialization.XmlReflectionImporter.ImportClassMapping (System.Xml.Serialization.TypeData,System.Xml.Serialization.XmlRootAttribute,string) <0x001df> 在 System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping (System.Xml.Serialization.TypeData,System.Xml.Serialization.XmlRootAttribute,string) <0x000e3> 在 System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping (System.Type,System .Xml.Serialization.XmlRootAttribute,string) <0x0005b> 在 System.Xml.Serialization.XmlReflectionImporter.ImportListMapping (System.Xml.Serialization.TypeData,System.Xml.Serialization.XmlRootAttribute,string,System.Xml.Serialization.XmlAttributes,int ) <0x00743> 在 System.Xml.Serialization.XmlReflectionImporter.ImportListMapping (System.Type,System.Xml.Serialization.XmlRootAttribute,string,System.Xml.Serialization.XmlAttributes,int) <0x0005b> 在 System.Xml.Serialization.XmlReflectionImporter .CreateMapMember (System.Type,System.Xml.Serialization.XmlReflectionMember,string) <0x0093b> 在 System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping (string,string,System.Xml.Serialization.XmlReflectionMember[],bool,bool,bool,System.Xml.Serialization.XmlMappingAccess) <0x00097> 在System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping (string,string,System.Xml.Serialization.XmlReflectionMember[],bool,bool,bool) <0x0006b> 在 System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping (string,string,System. Xml.Serialization.XmlReflectionMember[],bool,bool) <0x0005b> 在 System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping (string,string,System.Xml.Serialization.XmlReflectionMember[],bool) <0x0004b> 在 System.Web。 Services.Protocols.SoapMethodStubInfo..ctor (System.Web.Services.Protocols.TypeStubInfo,System.Web.Services.Protocols.LogicalMethodInfo,object,System.Xml.Serialization.XmlReflectionImporter,System.Xml.Serialization.SoapReflectionImporter) <0x006bb> 在 System.Web.Services.Protocols.SoapTypeStubInfo.CreateMethodStubInfo (System.Web.Services.Protocols.TypeStubInfo, System.Web.Services.Protocols.LogicalMethodInfo,bool) <0x0016b> 在 System.Web.Services.Protocols.TypeStubInfo.BuildTypeMethods () <0x00127> 在 System.Web.Services.Protocols.TypeStubInfo.Initialize () <0x00023> 在System.Web.Services.Protocols.LogicalTypeInfo.GetTypeStub (string) <0x00167> 在 System.Web.Services.Protocols.TypeStubManager.GetTypeStub (System.Type,string) <0x0002f> 在 System.Web.Services.Protocols.SoapHttpClientProtocol。 .ctor () <0x0003b> 在 AddressBookExample.MainView 的 YNSMS.ynSMSws.Service1..ctor ()。ExecutaBotao (object,System.EventArgs) [0x00000] in /Volumes/STORAGE/cafexpto/Marcelo/sistemas_mac/MonoTouch/AddresBook/AddressBookExample/MainView.xib.cs:70 在 MonoTouch.UIKit.UIBarButtonItem/Callback.Call (MonoTouch.Foundation .NSObject) <0x0005b> at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0x000c3> at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[] ,intptr,intptr) <0xffffffff> 在 MonoTouch.UIKit.UIApplication.Main (string[],string,string) <0x000e0> 在 MonoTouch.UIKit.UIApplication.Main (string[]) <0x00023> 在 AddressBookExample.Application.Main (string[]) [0x00000] 在 /Volumes/STORAGE/cafexpto/Marcelo/sistemas_mac/MonoTouch/AddresBook/AddressBookExample/Main.cs:14 在(包装运行时调用)对象。runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0x000c3>

本机堆栈跟踪:

0   AddressBookExample                  0x0003ca58 mono_handle_native_sigsegv + 396
1   AddressBookExample                  0x0006c13c sigabrt_signal_handler + 124
2   libSystem.B.dylib                   0x31a2584b _sigtramp + 42
3   libSystem.B.dylib                   0x31a279a3 kill + 10
4   libSystem.B.dylib                   0x31a27995 raise + 16
5   libSystem.B.dylib                   0x31a3c641 abort + 40
6   AddressBookExample                  0x001b0a0c g_logv + 248
7   AddressBookExample                  0x001b0a64 g_log + 52
8   AddressBookExample                  0x000e5a5c mono_marshal_get_runtime_invoke + 108
9   AddressBookExample                  0x0000b41c mono_jit_runtime_invoke + 624
10  AddressBookExample                  0x0011f054 mono_property_set_value + 68
11  AddressBookExample                  0x001453e4 create_custom_attr + 1212
12  AddressBookExample                  0x0014610c mono_custom_attrs_construct + 408
13  AddressBookExample                  0x001479a0 mono_reflection_get_custom_attrs_by_type + 92
14  AddressBookExample                  0x000c82bc custom_attrs_get_by_type + 80
15  AddressBookExample                  0x004e8fd4 wrapper_managed_to_native_System_MonoCustomAttrs_GetCustomAttributesInternal_System_Reflection_ICustomAttributeProvider_System_Type_bool + 80

* 断言:不应在 ../../../../mono/mini/mini-darwin.c:258 到达

4

1 回答 1

0

我的猜测是,这与 MonoTouch 链接器删除一些 XML 字段有关 - 尝试将 Preserve(AllMembers=true) 属性添加到生成的 Web 服务代码中。

于 2010-06-22T14:55:22.243 回答