适用于Xamarin的Sitecore Mobile SDK [英] Sitecore Mobile SDK for Xamarin

查看:48
本文介绍了适用于Xamarin的Sitecore Mobile SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 

我正在使用xamarin android中的SiteCore Mobile Sdk,我下载了样本

项目来自 https://components.xamarin。 com / view / sitecore.mobile.sdk

我修改了我的代码,根据我的要求更改了instanceUrl和凭证

并且执行的代码没有显示输出。我的应用程序输出显示


 [MonoDroid] UNHANDLED EXCEPTION:[MonoDroid] Sitecore.MobileSDK。 API.Exceptions.RsaHandshakeException:[Sitecore Mobile SDK]未正确接收公钥---> System.Xml.XmlException:此XML中禁止文档类型声明(DTD)。第4行,第10位。
[ Mono.Xml2.XmlTextReader.ReadDoctypeDecl()[0x00000]中的Mono.Xml2.XmlTextReader.ReadDoctypeDecl()[0x00000]:< filename unknown>中的Mono.Xml2.XmlTextReader.ReadDeclaration()[0x00000]中的0
[MonoDroid]: 0
[MonoDroid] Mono.Xml2.XmlTextReader.ReadContent()[0x00000] in< filename unknown> ;:00
[MonoDroid] at Mono.Xml2.XmlTextReader.Read()[0x00000] in < filename unknown>:0
[MonoDroid]在System.Xml.XmlTextReader.Read()[0x00000]的< filename unknown> ;:00
[MonoDroid] at Sitecore.MobileSDK.PublicKey.PublicKeyXmlParser 。< fi中的.Parse(System.IO.Stream xmlStream,CancellationToken cancelToken)[0x00000] lename unknown>:0
[MonoDroid] at Sitecore.MobileSDK.PublicKey.GetPublicKeyTasks +<> c__DisplayClass11。< ParseResponseDataAsync> b__d()[0x00000] in< filename unknown> ;:0
[ MonoDroid]在System.Threading.Tasks.TaskActionInvoker + FuncInvoke`1 [Sitecore.MobileSDK.PublicKeyX509Certificate] .Invoke(System.Threading.Tasks.Task owner,System.Object state,System.Threading.Tasks.Task context)[0x00000] in< filename unknown>:0
[MonoDroid]在System.Threading.Tasks.Task.InnerInvoke()[0x00000] in< filename unknown>:$
[MonoDroid]在System.Threading。 Tasks.Task.ThreadStart()[0x00000] in< filename unknown> ;:0
[MonoDroid] ---内部异常堆栈跟踪结束---
[MonoDroid] Sitecore.MobileSDK.ScApiSession +< GetPublicKeyAsync> d__0.MoveNext()[0x00000] in< filename unknown> ;:0
[MonoDroid] ---从抛出异常的上一个位置开始的堆栈跟踪结束---
[ MonoDroid]在System.Runtime .ExceptionServices.ExceptionDispatchInfo.Throw()[0x00000] in< filename unknown>:$
[MonoDroid] at System.Runtime.CompilerServices.TaskAwaiter`1 [Sitecore.MobileSDK.API.Items.ScItemsResponse] .GetResult( )[0x00000] in< filename unknown>:$
[MonoDroid] at AndroidMobileSdkDemo.MainActivity +< OnCreate> d__2.MoveNext()[0x000d0] in c:\ Users \Ashok v\Downloads \\ \\\\\\ 0像素;字体大小:13像素;宽度:汽车;最大高度:600像素; font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;自动换:正常;颜色:#222222; background-color:#eeeeee">






解决方案

这些论坛仅适用于Microsoft的产品和技术。


如果您对Xamarin的Mobile SDK有一些问题,那么这不是请问。请在Xamarin论坛或Xamarin直接询问任何此类问题:


https:// xamarin .com / support

http://forums.xamarin.com/


感谢您的理解。


请记住通过将有用的帖子标记为答案来关闭您的主题,然后在适当的论坛中开始新主题 如果您有一个新问题。


I am working on SiteCore Mobile Sdk in xamarin android,i downloaded sample

project fromhttps://components.xamarin.com/view/sitecore.mobile.sdk.

I modified my code as per my requirement changed instanceUrl and credentials

and executed code it is not showing output.My Application Output shows

[MonoDroid] UNHANDLED EXCEPTION:[MonoDroid] Sitecore.MobileSDK.API.Exceptions.RsaHandshakeException: [Sitecore Mobile SDK] Public key not received properly ---> System.Xml.XmlException: Document Type Declaration (DTD) is prohibited in this XML.  Line 4, position 10.
[MonoDroid]   at Mono.Xml2.XmlTextReader.ReadDoctypeDecl () [0x00000] in <filename unknown>:0 
[MonoDroid]   at Mono.Xml2.XmlTextReader.ReadDeclaration () [0x00000] in <filename unknown>:0 
[MonoDroid]   at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] in <filename unknown>:0 
[MonoDroid]   at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown>:0 
[MonoDroid]   at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown>:0 
[MonoDroid]   at Sitecore.MobileSDK.PublicKey.PublicKeyXmlParser.Parse (System.IO.Stream xmlStream, CancellationToken cancelToken) [0x00000] in <filename unknown>:0 
[MonoDroid]   at Sitecore.MobileSDK.PublicKey.GetPublicKeyTasks+<>c__DisplayClass11.<ParseResponseDataAsync>b__d () [0x00000] in <filename unknown>:0 
[MonoDroid]   at System.Threading.Tasks.TaskActionInvoker+FuncInvoke`1[Sitecore.MobileSDK.PublicKeyX509Certificate].Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in <filename unknown>:0 
[MonoDroid]   at System.Threading.Tasks.Task.InnerInvoke () [0x00000] in <filename unknown>:0 
[MonoDroid]   at System.Threading.Tasks.Task.ThreadStart () [0x00000] in <filename unknown>:0 
[MonoDroid]   --- End of inner exception stack trace ---
[MonoDroid]   at Sitecore.MobileSDK.ScApiSession+<GetPublicKeyAsync>d__0.MoveNext () [0x00000] in <filename unknown>:0 
[MonoDroid] --- End of stack trace from previous location where exception was thrown ---
[MonoDroid]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
[MonoDroid]   at System.Runtime.CompilerServices.TaskAwaiter`1[Sitecore.MobileSDK.API.Items.ScItemsResponse].GetResult () [0x00000] in <filename unknown>:0 
[MonoDroid]   at AndroidMobileSdkDemo.MainActivity+<OnCreate>d__2.MoveNext () [0x000d0] in c:\Users\Ashok v\Downloads\Sitecore.Mobile.SDK-1.0\samples\AndroidMobileSdkDemo\AndroidMobileSdkDemo\MainActivity.cs:44 





解决方案

These forums are intended for Microsoft's products and technologies only.

If you have some issues with the Mobile SDK for Xamarin this is not the place to ask. Please ask any such questions in the Xamarin forums or to Xamarin directly:
https://xamarin.com/support
http://forums.xamarin.com/

Thanks for your understanding.

Please remember to close your threads by marking helpful posts as answer and then start a new thread in an appropriate forum if you have a new question.


这篇关于适用于Xamarin的Sitecore Mobile SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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