Create token of stripe in xamarin android giving exception? - xamarin.android

I am integrating stripe payment with my xamarin android application.But when I am creating token in try block, its giving exception.Why its giving exception?Here is my code I am doing :
var card = new Card
{
Number = "4242424242424242",
ExpiryMonth = 12,
ExpiryYear = 16,
CVC = "123"
};
var token = await StripeClient.CreateToken(card, "pk_test_lkH9OCXVwDdJzTzc9kI8UILY");
await CreateBackendCharge(token);
async Task CreateBackendCharge(Token token)
{
var http = new HttpClient();
var content = new StringContent("StripeTokenId=" + token.Id);
var response = await http.PostAsync("https://stripe.com/token", content);
}
Exception is
Not Flagged [1] Line 83 {System.Net.WebException: Error: NameResolutionFailure
at System.Net.HttpWebRequest.EndGetRequestStream (IAsyncResult asyncResult) [0x00043] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/mcs/class/System/System.Net/HttpWebRequest.cs:882
at System.Threading.Tasks.TaskFactory`1[TResult].FromAsyncCoreLogic (IAsyncResult iar, System.Func`2 endFunction, System.Action`1 endAction, System.Threading.Tasks.Task`1 promise, Boolean requiresSynchronization) [0x00014] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/threading/Tasks/FutureFactory.cs:550
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:535
at System.Net.Http.HttpClientHandler+<SendAsync>c__async0.MoveNext () [0x002af] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs:363
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:535
at System.Net.Http.HttpClient+<SendAsyncWorker>c__async0.MoveNext () [0x000a9] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/mcs/class/System.Net.Http/System.Net.Http/HttpClient.cs:276
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357
at Stripe.StripeClient+<requestToken>c__async2.MoveNext () [0x00085] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357
at Stripe.StripeClient+<CreateToken>c__async0.MoveNext () [0x001c4] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357
at AndroidApp.MainActivity+<OnCardDataRecieved>d__8.MoveNext () [0x00095] in C:\Users\karanveer.READINKAD\Documents\Visual Studio 2015\Projects\AndroidApp\AndroidApp\MainActivity.cs:74 }

Error: NameResolutionFailure means that your code was unable to resolve a domain name -- likely the domain name you use in your StripeClient.CreateToken method.
By the way, the rest of the code has no chance of working. Even if you succeed in creating a token, POSTing a token to https://stripe.com/token will result in a 404 error since there is nothing at that URL.
I recommend you take some time to browse through Stripe's documentation, and in particular how to create charges using tokens.

Related

Reflection doesn't work only with webassembly

let a= 4
let f arg=
printfn "%s" (nameof arg)
f a
On https://fable.io/ it's working but it's not working with https://tryfsharp.fsbolero.io/
The first run the code on a server. The second run the code with webassembly on the computer calling this it.
https://fable.io/ :
arg
https://tryfsharp.fsbolero.io/
let a= 4
Compiler output:
Compilation succeeded.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: may not call directly, should always be optimized away
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) <0x34197b0 + 0x000ce> in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) <0x34197b0 + 0x000f6> in <filename unknown>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) <0x3419060 + 0x00014> in <filename unknown>:0
at <StartupCode$WebFsc-Client>.$Executor+Run#42-1.Invoke (Microsoft.FSharp.Core.Unit unitVar) <0x4a37948 + 0x00028> in <filename unknown>:0
at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult] (Microsoft.FSharp.Control.AsyncActivation`1[T] ctxt, TResult result1, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] part2) <0x4a2e408 + 0x0001a> in <filename unknown>:0
at <StartupCode$FSharp-Core>.$Async+Delay#1064[T].Invoke (Microsoft.FSharp.Control.AsyncActivation`1[T] ctxt) <0x4a2e298 + 0x00036> in <filename unknown>:0
at Microsoft.FSharp.Control.AsyncPrimitives.Invoke[T] (Microsoft.FSharp.Control.FSharpAsync`1[T] computation, Microsoft.FSharp.Control.AsyncActivation`1[T] ctxt) <0x4a2ee98 + 0x000a0> in <filename unknown>:0
at Microsoft.FSharp.Control.AsyncPrimitives.Bind[T,TResult] (Microsoft.FSharp.Control.AsyncActivation`1[T] ctxt, Microsoft.FSharp.Control.FSharpAsync`1[T] part1, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] part2) <0x4a374d8 + 0x00068> in <filename unknown>:0
at WebFsc.Client.ScreenOut+Wrap#109-3[a].Invoke (Microsoft.FSharp.Control.AsyncActivation`1[T] ctxt) <0x4a373c8 + 0x00014> in <filename unknown>:0
at Microsoft.FSharp.Control.AsyncPrimitives.Invoke[T] (Microsoft.FSharp.Control.FSharpAsync`1[T] computation, Microsoft.FSharp.Control.AsyncActivation`1[T] ctxt) <0x4a2ee98 + 0x000a0> in <filename unknown>:0
at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult] (Microsoft.FSharp.Control.AsyncActivation`1[T] ctxt, TResult result1, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] part2) <0x4a2e408 + 0x00064> in <filename unknown>:0
at <StartupCode$FSharp-Core>.$Async+Delay#1064[T].Invoke (Microsoft.FSharp.Control.AsyncActivation`1[T] ctxt) <0x4a2e298 + 0x00036> in <filename unknown>:0
at <StartupCode$FSharp-Core>.$Async+Catch#1142[T].Invoke (Microsoft.FSharp.Control.AsyncActivation`1[T] ctxt) <0x4a2de80 + 0x00074> in <filename unknown>:0
at Microsoft.FSharp.Control.AsyncPrimitives.Invoke[T] (Microsoft.FSharp.Control.FSharpAsync`1[T] computation, Microsoft.FSharp.Control.AsyncActivation`1[T] ctxt) <0x4a2dae0 + 0x000a0> in <filename unknown>:0
at Microsoft.FSharp.Control.AsyncPrimitives.Bind[T,TResult] (Microsoft.FSharp.Control.AsyncActivation`1[T] ctxt, Microsoft.FSharp.Control.FSharpAsync`1[T] part1, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] part2) <0x4a2d860 + 0x00068> in <filename unknown>:0
at Elmish.Cmd+bind#52-3[a].Invoke (Microsoft.FSharp.Control.AsyncActivation`1[T] ctxt) <0x4a2d5d8 + 0x00014> in <filename unknown>:0
at Microsoft.FSharp.Control.AsyncPrimitives.Invoke[T] (Microsoft.FSharp.Control.FSharpAsync`1[T] computation, Microsoft.FSharp.Control.AsyncActivation`1[T] ctxt) <0x3a95c38 + 0x000a0> in <filename unknown>:0
at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult] (Microsoft.FSharp.Control.AsyncActivation`1[T] ctxt, TResult result1, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] part2) <0x3a90ed8 + 0x00064> in <filename unknown>:0
at <StartupCode$FSharp-Core>.$Async+Delay#1064[T].Invoke (Microsoft.FSharp.Control.AsyncActivation`1[T] ctxt) <0x3a90ce8 + 0x00036> in <filename unknown>:0
at Microsoft.FSharp.Control.AsyncPrimitives+StartWithContinuations#915[T].Invoke (Microsoft.FSharp.Core.Unit unitVar0) <0x3abbdd0 + 0x000b6> in <filename unknown>:0
at Microsoft.FSharp.Control.Trampoline.Execute (Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] firstAction) <0x3a90560 + 0x0004a> in <filename unknown>:0
does the problem come from webassembly and why?
As #JL0PD correctly guessed in their comment, this is because Bolero's tryfsharp runs an older compiler that doesn't support nameof.
Updating it has been on my to-do list for ever, but there have been non-trivial changes both in Blazor and in the F# compiler service since the latest release of tryfsharp.bolero.

System.Security.Authentication.AuthenticationException:

I am facing crash issue in following line of code :
int bytesRead = await this.stream.ReadAsync(buffer, 0, buffer.Length, token);
Error Log :
{System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---> Mono.Security.Interface.TlsException: Unknown Secure Transport error `DecryptionFail'.
at Mono.AppleTls.AppleTlsContext.CheckStatusAndThrow (Mono.AppleTls.SslStatus status, Mono.AppleTls.SslStatus[] acceptable) [0x00096] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/mcs/class/System/Mono.AppleTls/AppleTlsContext.cs:127
at Mono.AppleTls.AppleTlsContext.Read (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x0009f] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/mcs/class/System/Mono.AppleTls/AppleTlsContext.cs:810
at Mono.Net.Security.MobileAuthenticatedStream.ProcessRead (Mono.Net.Security.BufferOffsetSize userBuffer) [0x00011] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:632
at Mono.Net.Security.AsyncReadRequest.Run (Mono.Net.Security.AsyncOperationStatus status) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:320
at Mono.Net.Security.AsyncProtocolRequest+d__24.MoveNext () [0x000ff] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:221
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:447
at Mono.Net.Security.AsyncProtocolRequest+d__23.MoveNext () [0x00046] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:187
--- End of inner exception stack trace ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152
at Mono.Net.Security.MobileAuthenticatedStream+d__58.MoveNext () [0x001b9] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:380
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/mcs/class/
Thanks for the help

Error: ConnectFailure (Connection refused)

I have the xamarin.forms application for which i am trying to connect localhost from PC to Iphone simulator in mac,Iam using the Ip address for connecting,
private string Uri = "http://192.168.0.16:62271/";//Windows Ip address:localhost port number
private string GetDishesUrl = "api/DishDetails/GetDishDetails?id=5";
try{
var httpClient = new HttpClient();
httpClient.BaseAddress = new Uri(Uri);
var response = await httpClient.GetAsync(new Uri(Uri + GetDishesUrl));
var stringAsync = await response.Content.ReadAsStringAsync();
if (response.IsSuccessStatusCode)
{
var responseJson = stringAsync;
return JsonConvert.DeserializeObject<List<DishDetails>>(responseJson);
}
}
catch(Exception ex)
{
}
Here iam getting following Exception:
{System.Net.Http.HttpRequestException: An error occurred while sending the request ---> System.Net.WebException: Error: ConnectFailure (Connection refused) ---> System.Net.Sockets.SocketException: Connection refused
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x000b0] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.1.0/src/mono/mcs/class/System/System.Net.Sockets/Socket.cs:879
at System.Net.WebConnection.Connect (System.Net.HttpWebRequest request) [0x00191] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.1.0/src/mono/mcs/class/System/System.Net/WebConnection.cs:194
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) [0x00052] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.1.0/src/mono/mcs/class/System/System.Net/HttpWebRequest.cs:1029
at System.Threading.Tasks.TaskFactory`1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func`2[T,TResult] endFunction, System.Action`1[T] endAction, System.Threading.Tasks.Task`1[TResult] promise, System.Boolean requiresSynchronization) [0x0000f] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.1.0/src/mono/mcs/class/referencesource/mscorlib/system/threading/Tasks/FutureFactory.cs:550
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.1.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.1.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.1.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.1.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.1.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:535
at System.Net.Http.HttpClientHandler+<SendAsync>d__63.MoveNext () [0x00406] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.1.0/src/mono/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs:388
--- End of inner exception stack trace ---
at System.Net.Http.HttpClientHandler+<SendAsync>d__63.MoveNext () [0x0049f] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.1.0/src/mono/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs:392
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.1.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.1.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.1.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.1.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.1.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:535
at System.Net.Http.HttpClient+<SendAsyncWorker>d__48.MoveNext () [0x00080] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.1.0/src/mono/mcs/class/System.Net.Http/System.Net.Http/HttpClient.cs:276
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.1.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.1.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.1.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.1.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.1.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357
at MyApp.Services.DishDetailsService+<GetAsync>d__5.MoveNext () [0x00084] in G:\SourceTree\Projects\SourceCode\MyApp\MyApp\MyApp\Services\DishDetailsService.cs:45 }`
while running web in windows it is working as expected.When trying to connect to mac giving an error.I followed different approaches from internet but non of them got worked.
EDIT:I disabled firewall and connected mac and pc under same Wifi then the response is null and exception is also null.

can any one help me with using IdentityServer3 to use MVCViewService with Aspidentity

I am using IdentityServer3 samples to make a MVCView Service to work with asp.net identity. The samples work individually (i.e. plain idserver using asp.net identity Or MVC View Service showing custom login/logout pages).
However, when I try to combine both I get below error
Unhandled exception accessing: /core/connect/authorize
Autofac.Core.DependencyResolutionException: A delegate registered to create instances of 'System.Object' returned null.
at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.InstanceLookup.Execute() in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.InstanceLookup.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Registration.ExternalRegistrySource.<>c__DisplayClass8.<RegistrationsFor>b__3(IComponentContext c, IEnumerable`1 p) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Configuration\Hosting\NoCacheAttribute.cs:line 0
at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.InstanceLookup.Execute() in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.ResolutionExtensions.Resolve[TService](IComponentContext context, IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.ResolutionExtensions.Resolve[TService](IComponentContext context) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at IdentityServer3.Core.Services.Default.AutofacDependencyResolver.Resolve[T](String name) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Services\Default\AutofacDependencyResolver.cs:line 36
at MvcViewServiceSample.Startup.<>c.<Configuration>b__0_2(IDependencyResolver resolver) in D:\users\gbrapur\documents\visual studio 2015\Projects\IdentityServer3.Samples-old\source\MVC ViewService\MvcViewServiceSample\Startup.cs:line 59
at IdentityServer3.Core.Configuration.Hosting.AutofacConfig.<>c__DisplayClass1a.<Register>b__17(IComponentContext ctx) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Configuration\Hosting\AutoFacConfig.cs:line 317
at Autofac.RegistrationExtensions.<>c__DisplayClass10`1.<Register>b__f(IComponentContext c, IEnumerable`1 p) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Configuration\Hosting\NoCacheAttribute.cs:line 0
at Autofac.Builder.RegistrationBuilder.<>c__DisplayClass1`1.<ForDelegate>b__0(IComponentContext c, IEnumerable`1 p) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Configuration\Hosting\NoCacheAttribute.cs:line 0
at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.InstanceLookup.Execute() in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.InstanceLookup.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Registration.ExternalRegistrySource.<>c__DisplayClass8.<RegistrationsFor>b__3(IComponentContext c, IEnumerable`1 p) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Configuration\Hosting\NoCacheAttribute.cs:line 0
at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.InstanceLookup.Execute() in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.InstanceLookup.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Activators.Reflection.AutowiringParameter.<>c__DisplayClass2.<CanSupplyValue>b__0() in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Configuration\Hosting\NoCacheAttribute.cs:line 0
at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.InstanceLookup.Execute() in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.InstanceLookup.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Registration.ExternalRegistrySource.<>c__DisplayClass8.<RegistrationsFor>b__3(IComponentContext c, IEnumerable`1 p) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Configuration\Hosting\NoCacheAttribute.cs:line 0
at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.InstanceLookup.Execute() in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at Autofac.ResolutionExtensions.ResolveOptionalService(IComponentContext context, Service service, IEnumerable`1 parameters) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Internal\AntiXssLibrary\UnicodeCharacterEncoder.cs:line 0
at IdentityServer3.Core.Extensions.InternalOwinExtensions.ResolveDependency(IOwinContext context, Type type) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Extensions\InternalOwinExtensions.cs:line 78
at IdentityServer3.Core.Extensions.InternalOwinExtensions.ResolveDependency[T](IOwinContext context) in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Extensions\InternalOwinExtensions.cs:line 70
at IdentityServer3.Core.Results.AuthorizeFormPostResult.<ExecuteAsync>d__6.MoveNext() in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Results\AuthorizeFormPostResult.cs:line 61
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext() in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Configuration\Hosting\NoCacheAttribute.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext() in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Configuration\Hosting\NoCacheAttribute.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext() in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Configuration\Hosting\NoCacheAttribute.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext() in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Configuration\Hosting\NoCacheAttribute.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext() in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Configuration\Hosting\NoCacheAttribute.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext() in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Configuration\Hosting\NoCacheAttribute.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext() in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Configuration\Hosting\NoCacheAttribute.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext() in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Configuration\Hosting\NoCacheAttribute.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext() in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Configuration\Hosting\NoCacheAttribute.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.AuthenticationFilterResult.<ExecuteAsync>d__0.MoveNext() in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Configuration\Hosting\NoCacheAttribute.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext() in c:\ballen\github\identity\IdSrv3\IdentityServer3\source\Core\Configuration\Hosting\NoCacheAttribute.cs:line 0
iisexpress.exe Error: 0 : 09/21/2017 09:49:09 +01:00 [Error] ()
my configuration for Idserver is as listed below -
appBuilder.Map("/core", core =>
{
var idSvrFactory = Factory.Configure();
// These registrations are also needed since these are dealt with using non-standard construction
idSvrFactory.Register(new Registration<HttpContext>(resolver => HttpContext.Current));
idSvrFactory.Register(new Registration<HttpContextBase>(resolver => new HttpContextWrapper(resolver.Resolve<HttpContext>())));
idSvrFactory.Register(new Registration<HttpRequestBase>(resolver => resolver.Resolve<HttpContextBase>().Request));
idSvrFactory.Register(new Registration<HttpResponseBase>(resolver => resolver.Resolve<HttpContextBase>().Response));
idSvrFactory.Register(new Registration<HttpServerUtilityBase>(resolver => resolver.Resolve<HttpContextBase>().Server));
idSvrFactory.Register(new Registration<HttpSessionStateBase>(resolver => resolver.Resolve<HttpContextBase>().Session));
idSvrFactory.ConfigureEPMUserService("AspId_CustomPK");
idSvrFactory.ViewService = new Registration<IViewService, MvcViewService<LogonWorkflowController>>();
var options = new IdentityServerOptions
{
SiteName = "IdentityServer3 - UserService-AspNetIdentity",
SigningCertificate = Certificate.Get(),
Factory = idSvrFactory,
AuthenticationOptions = new AuthenticationOptions
{
IdentityProviders = ConfigureAdditionalIdentityProviders
}
};
core.UseIdentityServer(options);
});
Error is thrown at this line
idSvrFactory.Register(new Registration<HttpContextBase>(resolver => new HttpContextWrapper(resolver.Resolve<HttpContext>())));
Note that i'm not using autofac or any other DI

Open Ears with Xamarin

I'm trying to make a Xamarin.Forms Project with speech recognition. For Android done and easy but i'm in the hell with iOS.
I found and i readed about Open Ears.
When tried to use this, i found some problems:
First i try to use this git: https://github.com/oganix/MonoTouch-OpenEars
but monotouch is not valid for Xamarin.iOS:
https://www.dropbox.com/s/41rc7iyskbwby9n/error_phoenix.png?dl=0
Next, i found this question Xamarin OpenEars Native Binding Not working on Device but works on Simulator.
After read, i tried to make a binding proyect and now i have this issue when use sharpie for autogenerate the Open Ears API:
/Users/cristian.fernandez/Workspace/Speech-iOS/OpenEarsDistribution/Framework/OpenEars.framework/Versions/A/Headers/acmod.h:50:10: fatal error: 'sphinxbase/cmd_ln.h' file not found
#include <sphinxbase/cmd_ln.h>
^
Binding...
System.ArgumentNullException: Value cannot be null.
Parameter name: annotation
at ICSharpCode.NRefactory.AbstractAnnotatable.AddAnnotation (System.Object annotation) in <filename unknown>:line 0
at ICSharpCode.NRefactory.CSharp.AstNode.AddAnnotation (System.Object annotation) in <filename unknown>:line 0
at Sharpie.Bind.Massagers.AnonymousStructMassager.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) in <filename unknown>:line 0
at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor (IAstVisitor visitor) in <filename unknown>:line 0
at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) in <filename unknown>:line 0
at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) in <filename unknown>:line 0
at Sharpie.Bind.Massagers.AnonymousStructMassager.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) in <filename unknown>:line 0
at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor (IAstVisitor visitor) in <filename unknown>:line 0
at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) in <filename unknown>:line 0
at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitSyntaxTree (ICSharpCode.NRefactory.CSharp.SyntaxTree syntaxTree) in <filename unknown>:line 0
at Sharpie.Bind.DocumentSyntaxTree.AcceptVisitor (IAstVisitor visitor) in <filename unknown>:line 0
at Sharpie.Bind.BindingMassager.Massage (ICSharpCode.NRefactory.CSharp.AstNode astNode, BindingTarget bindingTarget) in <filename unknown>:line 0
at Sharpie.Bind.BindingFrontend.Bind (Clang.Ast.Decl decl) in <filename unknown>:line 0
at Sharpie.BindTool.HandleTranslationUnit (Clang.Ast.TranslationUnitDecl decl) in <filename unknown>:line 0
at Clang.Driver.HandleTranslationUnit (Clang.Ast.TranslationUnitDecl translationUnit) in <filename unknown>:line 0
at Clang.Driver.HandleTranslationUnit (IntPtr translationUnit) in <filename unknown>:line 0
at (wrapper managed-to-native) Clang.Driver:RunInternal (Clang.Driver,string[],string,Clang.Frontend.DiagnosticConsumer)
at Clang.Driver.Run (System.String[] inputFiles, System.String[] clangArgs, Clang.Frontend.DiagnosticConsumer diagnosticConsumer) in <filename unknown>:line 0
at Sharpie.ParseTool.Run () in <filename unknown>:line 0
at Sharpie.BindTool.CoreRun () in <filename unknown>:line 0
at Sharpie.BindTool.Run () in <filename unknown>:line 0
I use this for launch sharpie:
sharpie bind --output=libOpenEars --namespace=libOpenEars --sdk=iphoneos9.2 /Users/cristian.fernandez/Workspace/Speech-iOS/OpenEarsDistribution/Framework/OpenEars.framework/Versions/A/Headers/*.h
What can i do now besides cry?
Thanks for all and sorry for my English.

Resources