Unable to connect to Amazon MQ using MassTransit - masstransit

I am attempting to publish messages to an Amazon MQ instance using the latest version of the MassTransit.ActiveMQ package.
I found an example in the MassTransit source that appears to show a successful connection to Amazon MQ. I tried to replicate that example in my own application using my Amazon MQ instance:
public static void Main(string[] args)
{
Console.WriteLine("Creating connection to Amazon MQ...");
var busControl = Bus.Factory.CreateUsingActiveMq(cfg =>
{
cfg.Host("b-abcxyz-1.mq.us-east-1.amazonaws.com", 61617, h =>
{
h.Username("user");
h.Password("pass");
h.UseSsl();
});
});
busControl.StartAsync().Wait();
Console.WriteLine("Connected.");
Console.ReadKey();
busControl.StopAsync().Wait();
}
I receive the following error when attempting to start the bus. It seems to use the activemq scheme instead of ssl like I expected.
ActiveMQ Connect Failed: ReceiveTranport Faulted, Restartingactivemq://b-abcxyz-1.mq.us-east-1.amazonaws.com:61617/
Unhandled Exception: System.AggregateException: One or more errors occurred. (ReceiveTranport Faulted, Restartingactivemq://b-abcxyz-1.mq.us-east-1.amazonaws.com:61617/) ---> MassTransit.ActiveMqTransport.ActiveMqConnectException: ReceiveTranport Faulted, Restartingactivemq://b-72f33f22-0856-47ef-a5fb-e0ab19ab7aff-1.mq.us-east-1.amazonaws.com:61617/ ---> System.NotSupportedException: The requested security protocol is not supported.
at System.Net.SecurityProtocol.ThrowOnNotAllowed(SslProtocols protocols, Boolean allowNone)
at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation)
at Apache.NMS.ActiveMQ.Transport.Tcp.SslTransport.CreateSocketStream()
at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransport.Start()
at Apache.NMS.ActiveMQ.Transport.TransportFilter.Start()
at Apache.NMS.ActiveMQ.Transport.TransportFilter.Start()
at Apache.NMS.ActiveMQ.Transport.WireFormatNegotiator.Start()
at Apache.NMS.ActiveMQ.Transport.TransportFilter.Start()
at Apache.NMS.ActiveMQ.Transport.TransportFilter.Start()
at Apache.NMS.ActiveMQ.Connection.CheckConnected()
at Apache.NMS.ActiveMQ.Connection.Start()
at MassTransit.ActiveMqTransport.Transport.ConnectionContextFactory.<CreateConnection>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MassTransit.ActiveMqTransport.Transport.ConnectionContextFactory.<CreateSharedConnection>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at GreenPipes.Agents.PipeContextSupervisor`1.<GreenPipes-IPipeContextSource<TContext>-Send>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at GreenPipes.Agents.PipeContextSupervisor`1.<GreenPipes-IPipeContextSource<TContext>-Send>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at GreenPipes.Agents.PipeContextSupervisor`1.<GreenPipes-IPipeContextSource<TContext>-Send>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MassTransit.ActiveMqTransport.Transport.ActiveMqReceiveTransport.<<Receiver>b__15_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at MassTransit.ActiveMqTransport.Transport.ActiveMqReceiveTransport.<<Receiver>b__15_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MassTransit.Policies.PipeRetryExtensions.<Retry>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at MassTransit.Policies.PipeRetryExtensions.<Retry>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MassTransit.ActiveMqTransport.Transport.ActiveMqReceiveTransport.<Receiver>d__15.MoveNext()
--- End of inner exception stack trace ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MassTransit.ActiveMqTransport.Transport.ActiveMqHost.Handle.<ReadyOrNot>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MassTransit.MassTransitBus.Handle.<ReadyOrNot>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at GreenPipes.Internals.Extensions.TaskExtensions.<UntilCompletedOrCanceled>d__0`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MassTransit.MassTransitBus.<StartAsync>d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at MassTransit.MassTransitBus.<StartAsync>d__27.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at MassTransitActiveMQ.Program.Main(String[] args) in /home/ec2-user/MassTransitActiveMQ/MassTransitActiveMQ/Program.cs:line

I've resolved the issue, related to the SSL (requires TLS) protocol and will be committing the fix shortly. It will be available in version 5.0.2 soon.

Related

Amazon.KinesisFirehose.AmazonKinesisFirehoseException: Signature expired

I've setup a Kinesis agent on EC2 instance having windows operating system. Its getting me the following error for multiple sinks I've specified in my appsetting file.
what could be wrong here and what can be done to avoid it?
Amazon.KinesisTap.Hosting.LogManager ERROR KinesisFirehoseSink client
dev_dw_fh_s3_dl_inventtransorigin_snk exception:
Amazon.KinesisFirehose.AmazonKinesisFirehoseException: Signature
expired: 20190610T083014Z is now earlier than 20190610T092115Z
(20190610T092615Z - 5 min.) --->
Amazon.Runtime.Internal.HttpErrorResponseException: The remote server
returned an error: (400) Bad Request. ---> System.Net.WebException:
The remote server returned an error: (400) Bad Request.
This error occurs randomly. There doesn't seem to be any connection lost issue since its running on EC2 instance also, the clock is not slow.
2019-06-10 04:26:16.2103 Amazon.KinesisTap.Hosting.LogManager ERROR KinesisFirehoseSink client dev_dw_fh_s3_dl_inventtransorigin_snk exception: Amazon.KinesisFirehose.AmazonKinesisFirehoseException: Signature expired: 20190610T083014Z is now earlier than 20190610T092115Z (20190610T092615Z - 5 min.) ---> Amazon.Runtime.Internal.HttpErrorResponseException: The remote server returned an error: (400) Bad Request. ---> System.Net.WebException: The remote server returned an error: (400) Bad Request. at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Amazon.Runtime.Internal.HttpRequest.<GetResponseAsync>d__16.MoveNext()
--- End of inner exception stack trace --- at Amazon.Runtime.Internal.HttpRequest.<GetResponseAsync>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Amazon.Runtime.Internal.HttpHandler`1.<InvokeAsync>d__9`1.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Amazon.Runtime.Internal.Unmarshaller.<InvokeAsync>d__3`1.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Amazon.Runtime.Internal.ErrorHandler.<InvokeAsync>d__5`1.MoveNext()
--- End of inner exception stack trace --- at Amazon.Runtime.Internal.HttpErrorResponseExceptionHandler.HandleException(IExecutionContext executionContext, HttpErrorResponseException exception) at Amazon.Runtime.Internal.ErrorHandler.ProcessException(IExecutionContext executionContext, Exception exception) at Amazon.Runtime.Internal.ErrorHandler.<InvokeAsync>d__5`1.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Amazon.Runtime.Internal.CallbackHandler.<InvokeAsync>d__9`1.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Amazon.Runtime.Internal.CredentialsRetriever.<InvokeAsync>d__7`1.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Amazon.Runtime.Internal.RetryHandler.<InvokeAsync>d__10`1.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Amazon.Runtime.Internal.RetryHandler.<InvokeAsync>d__10`1.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Amazon.Runtime.Internal.CallbackHandler.<InvokeAsync>d__9`1.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Amazon.Runtime.Internal.CallbackHandler.<InvokeAsync>d__9`1.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Amazon.Runtime.Internal.ErrorCallbackHandler.<InvokeAsync>d__5`1.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Amazon.Runtime.Internal.MetricsHandler.<InvokeAsync>d__1`1.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Amazon.KinesisTap.AWS.KinesisFirehoseSink.<OnNextAsync>d__7.MoveNext()

Issue installing version 10 on a new DNN 9.2.2

I'm trying to install the blog app and keep getting an error message.
05/26/2019 20:49:27
Admin Alert
host
2sxc-Api Auto-Log Exception 2sInst[3e Path http://enjoythisworld.com/deskt
2sxc-Api:Auto-Log Exception
2sInst[3e]:Path: http://enjoythisworld.com/desktopmodules/2sxc/api/app-sys/installer/installpackage?packageUrl=https://2sxc.org/Portals/0/adam/AppCatalog/5EMutByRNEWtODu1sMkpDg/Download/2sxcApp_Blog_03.00.02.zip
2sInst[3e]DNN.Enviro[1b]Dnn.Publsh[70]:()
2sInst[3e]:install package:https://2sxc.org/Portals/0/adam/AppCatalog/5EMutByRNEWtODu1sMkpDg/Download/2sxcApp_Blog_03.00.02.zip
2sInst[3e]Dnn.MapA2I[53]:get appid from instance for Z:2 Mod:451 not found = null
2sInst[3e]Zip.Imp[6f]:import zip from url:https://2sxc.org/Portals/0/adam/AppCatalog/5EMutByRNEWtODu1sMkpDg/Download/2sxcApp_Blog_03.00.02.zip, isApp:True
2sInst[3e]Zip.Imp[6f]:try to download:https://2sxc.org/Portals/0/adam/AppCatalog/5EMutByRNEWtODu1sMkpDg/Download/2sxcApp_Blog_03.00.02.zip to:C:\Inetpub\vhosts\enjoythisworld.com\httpdocs\desktopmodules\tosic_sexycontent_\4po5clpp.vke.zip
Server Name: GenericAU04
Check
05/26/2019 20:49:27
General Exception
host
Enjoy This World
AbsoluteURL /desktopmodules/2sxc/api/app-sys/installer/installpackage Defa
AbsoluteURL:/desktopmodules/2sxc/api/app-sys/installer/installpackage
DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke
ExceptionGUID:f9b14e08-800d-4577-b7f3-4751cf4e96ec
AssemblyVersion:
PortalId:-1
UserId:-1
TabId:-1
RawUrl:
Referrer:
UserAgent:
ExceptionHash:EUTd+51qrnU8qi8gRlrnBDlmOGY=
Message:An error occurred while installing the app: Could not download app package from 'https://2sxc.org/Portals/0/adam/AppCatalog/5EMutByRNEWtODu1sMkpDg/Download/2sxcApp_Blog_03.00.02.zip'.
StackTrace:
at ToSic.SexyContent.WebApi.InstallerController.InstallPackage(String packageUrl) in C:\Projects\2sxc-dnn742\Website\DesktopModules\ToSIC_SexyContent\Sxc WebApi\InstallerController.cs:line 51 at lambda_method(Closure , Object , Object[] ) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.b__9(Object instance, Object[] methodParameters) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken) --- 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.Tracing.ITraceWriterExtensions.d__18`1.MoveNext() --- 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.d__0.MoveNext() --- 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.Tracing.ITraceWriterExtensions.d__18`1.MoveNext() --- 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.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext() --- 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.d__0.MoveNext() --- 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.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext() --- 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.d__0.MoveNext() --- 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.d__2.MoveNext() --- 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.d__2.MoveNext() --- 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.d__2.MoveNext() --- 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.d__2.MoveNext() --- 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.d__2.MoveNext() --- 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.d__0.MoveNext()
InnerMessage:Could not download app package from 'https://2sxc.org/Portals/0/adam/AppCatalog/5EMutByRNEWtODu1sMkpDg/Download/2sxcApp_Blog_03.00.02.zip'.
InnerStackTrace:
at ToSic.Eav.Apps.ImportExport.ZipImport.ImportZipFromUrl(String packageUrl, Boolean isAppImport) at ToSic.SexyContent.WebApi.InstallerController.InstallPackage(String packageUrl) in C:\Projects\2sxc-dnn742\Website\DesktopModules\ToSIC_SexyContent\Sxc WebApi\InstallerController.cs:line 32
Source:ToSic.SexyContent.WebApi
FileName:
FileLineNumber:0
FileColumnNumber:0
Method:
Server Name: GenericAU04
I'm guessing that your server doesn't have an internet connection - maybe communication between the server and the internet is prohibited. To work around this, download the app directly from the app catalog and upload/install it from the zip.
Best, iJungleboy

Operation is not valid due to the current state of the object

An error has occurred.
Operation is not valid due to the current state of the object.
System.InvalidOperationException
at
Microsoft.Bot.Builder.Dialogs.Conversation.<>c__31.<ResumeAsync>b__3_0()
at
Microsoft.Bot.Builder.Dialogs.Internals.ReactiveDialogTask.<Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync>d__31.MoveNext()
--- 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
Microsoft.Bot.Builder.Dialogs.Internals.ScoringDialogTask1.<Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync>d__31.MoveNext()
--- 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
Microsoft.Bot.Builder.Dialogs.Internals.PersistentDialogTask.d__31.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
Microsoft.Bot.Builder.Dialogs.Internals.PersistentDialogTask.<Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync>d__31.MoveNext()
--- 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
Microsoft.Bot.Builder.Dialogs.Internals.SerializingDialogTask.d__41.MoveNext()
--- 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
Microsoft.Bot.Builder.Dialogs.Internals.ExceptionTranslationDialogTask.<Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync>d__21.MoveNext()
--- 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
Microsoft.Bot.Builder.Dialogs.Internals.LocalizedDialogTask.d__21.MoveNext()
--- 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
Microsoft.Bot.Builder.Dialogs.Internals.PostUnhandledExceptionToUserTask.<Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync>d__51.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
Microsoft.Bot.Builder.Dialogs.Internals.PostUnhandledExceptionToUserTask.d__51.MoveNext()
--- 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
Microsoft.Bot.Builder.Dialogs.Internals.LogPostToBot.<Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync>d__31.MoveNext()
--- 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
Microsoft.Bot.Builder.Dialogs.Conversation.d__51.MoveNext()
--- 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
Microsoft.Bot.Builder.Dialogs.Conversation.<ResumeAsync>d__31.MoveNext()
--- 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.Runtime.CompilerServices.TaskAwaiter.GetResult() at
BotApplication.Controllers.OAuthCallbackController.d__0.MoveNext()
in
C:\BotApplication\BotApplication\Controllers\OAuthCallbackController.cs:line
55 --- 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.Threading.Tasks.TaskHelpersExtensions.d__3`1.MoveNext()
--- 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.d__0.MoveNext()
--- 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.d__2.MoveNext()
--- 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.Dispatcher.HttpControllerDispatcher.d__1.MoveNext()
This is happening when i'm trying to resume a conversation after user authentication.
I call authentication this way :
In my first dialog :
var message = context.MakeMessage();
await context.Forward(new SecondDialog(), HandleOptions, message, CancellationToken.None);
Then in my SecondDialog have this :
var message = await argument;
MyStaticModel.toId = message.From.Id;
MyStaticModel.toName = message.From.Name;
MyStaticModel.fromId = message.Recipient.Id;
MyStaticModel.fromName = message.Recipient.Name;
MyStaticModel.serviceUrl = message.ServiceUrl;
MyStaticModel.channelId = message.ChannelId;
MyStaticModel.conversationId = message.Conversation.Id;
await context.Forward(new SimpleFacebookAuthDialog(message), ResumeAfterLogIn, message, CancellationToken.None);
In my Facebook Dialog i make resumption cookie this way :
public SimpleFacebookAuthDialog(IMessageActivity msg)
{
ResumptionCookie = new ResumptionCookie(msg);
}
And when user authenticate i handle authentication :
public async Task<HttpResponseMessage> OAuthCallback([FromUri] string userId, [FromUri] string botId, [FromUri] string conversationId, [FromUri] string channelId, [FromUri] string serviceUrl, [FromUri] string locale, [FromUri] string code, [FromUri] string state, CancellationToken token)
{
//Get the resumption cookie
Address address = new Address
(
// purposefully using named arguments because these all have the same type
botId: FacebookHelpers.TokenDecoder(botId),
channelId: channelId,
userId: FacebookHelpers.TokenDecoder(userId),
conversationId: FacebookHelpers.TokenDecoder(conversationId),
serviceUrl: FacebookHelpers.TokenDecoder(serviceUrl)
);
//var resumptionCookie = new ResumptionCookie(FacebookHelpers.TokenDecoder(userId), FacebookHelpers.TokenDecoder(botId), FacebookHelpers.TokenDecoder(conversationId), channelId, FacebookHelpers.TokenDecoder(serviceUrl), locale: locale);
var resumptionCookie = new ResumptionCookie(address, userName: null, isGroup: false, locale: locale);
// Exchange the Facebook Auth code with Access token
var accessToken = await FacebookHelpers.ExchangeCodeForAccessToken(resumptionCookie, code, SimpleFacebookAuthDialog.FacebookOauthCallback.ToString());
// Create the message that is send to conversation to resume the login flow
var msg = resumptionCookie.GetMessage();
msg.Text = $"token:{accessToken.AccessToken}";
// Resume the conversation to SimpleFacebookAuthDialog
await Conversation.ResumeAsync(resumptionCookie, msg, CancellationToken.None);
It falls on the last line of code. When Resuming conversation.
Any help ?
I got the same error when I run tests in vs 2019.
I could solve this by cleaning the solution ,closing vs and deleting temp files anf re launching vs-2019.
I followed the link https://developercommunity.visualstudio.com/content/problem/875545/xunit-test-net-core-project-with-vs-2019-is-throwi.html
I fix this guys.
I don't know what the real reason is, but when i used to await for argument and store it as a message, later, parameters were wrong in resumption cookie.
Now, i cast argument as activity :
var message = (Activity)context.Activity;
And it works properly.
Problem solved :)
I got this error message when attempting to display adaptive cards. It turned out I had added the json files to the solution as content and not as embedded resources. After switching them to be embedded resources they displayed fine.

Visual Studio 2013 gives error message when try to save

I am using Visual Studio 2013. A couple of days ago, my computer shutted down accidentally after that I always get error when I try to save my visual studio files.It saves but it gives error message.
The log file is
27.5.2016 09:47:43
Recoverable
System.AggregateException: One or more errors occurred. ---> Microsoft.Assumes+InternalErrorException: An internal error occurred. Please contact Microsoft Product Support Services.
at Microsoft.Assumes.Fail(String message, Boolean showAssert)
at Microsoft.Assumes.NotNull[T](T value)
at Microsoft.VisualStudio.ProjectSystem.Designers.ProjectDirectoryTreeProvider.<ProcessFileEventsAddFileAsync>d__5c.MoveNext()
--- 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 Microsoft.VisualStudio.ProjectSystem.Designers.ProjectDirectoryTreeProvider.<ProcessFileEventsAsync>d__4c.MoveNext()
--- 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.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.VisualStudio.ProjectSystem.Utilities.Designers.ProjectTreeProviderBase.<>c__DisplayClass9.<<Initialize>b__5>d__b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.ProjectSystem.Utilities.CommonProjectSystemTools.Rethrow(Exception ex)
at Microsoft.VisualStudio.ProjectSystem.ProjectErrorReporting.<>c__DisplayClass5.<SubmitErrorReport>b__3()
at Microsoft.VisualStudio.ProjectSystem.ExceptionFilter.<>c__DisplayClass2.<Guard>b__0()
at GuardMethodClass.GuardMethod(Func`1 , Func`2 , Func`2 )
--- End of inner exception stack trace ---
---> (Inner Exception #0) Microsoft.Assumes+InternalErrorException: An internal error occurred. Please contact Microsoft Product Support Services.
at Microsoft.Assumes.Fail(String message, Boolean showAssert)
at Microsoft.Assumes.NotNull[T](T value)
at Microsoft.VisualStudio.ProjectSystem.Designers.ProjectDirectoryTreeProvider.<ProcessFileEventsAddFileAsync>d__5c.MoveNext()
--- 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 Microsoft.VisualStudio.ProjectSystem.Designers.ProjectDirectoryTreeProvider.<ProcessFileEventsAsync>d__4c.MoveNext()
--- 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.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.VisualStudio.ProjectSystem.Utilities.Designers.ProjectTreeProviderBase.<>c__DisplayClass9.<<Initialize>b__5>d__b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.ProjectSystem.Utilities.CommonProjectSystemTools.Rethrow(Exception ex)
at Microsoft.VisualStudio.ProjectSystem.ProjectErrorReporting.<>c__DisplayClass5.<SubmitErrorReport>b__3()
at Microsoft.VisualStudio.ProjectSystem.ExceptionFilter.<>c__DisplayClass2.<Guard>b__0()
at GuardMethodClass.GuardMethod(Func`1 , Func`2 , Func`2 )<---
===================
27.5.2016 10:00:24
Recoverable
System.AggregateException: One or more errors occurred. ---> Microsoft.Assumes+InternalErrorException: An internal error occurred. Please contact Microsoft Product Support Services.
at Microsoft.Assumes.Fail(String message, Boolean showAssert)
at Microsoft.Assumes.NotNull[T](T value)
at Microsoft.VisualStudio.ProjectSystem.Designers.ProjectDirectoryTreeProvider.<ProcessFileEventsAddFileAsync>d__5c.MoveNext()
--- 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 Microsoft.VisualStudio.ProjectSystem.Designers.ProjectDirectoryTreeProvider.<ProcessFileEventsAsync>d__4c.MoveNext()
--- 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.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.VisualStudio.ProjectSystem.Utilities.Designers.ProjectTreeProviderBase.<>c__DisplayClass9.<<Initialize>b__5>d__b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.ProjectSystem.Utilities.CommonProjectSystemTools.Rethrow(Exception ex)
at Microsoft.VisualStudio.ProjectSystem.ProjectErrorReporting.<>c__DisplayClass5.<SubmitErrorReport>b__3()
at Microsoft.VisualStudio.ProjectSystem.ExceptionFilter.<>c__DisplayClass2.<Guard>b__0()
at GuardMethodClass.GuardMethod(Func`1 , Func`2 , Func`2 )
--- End of inner exception stack trace ---
---> (Inner Exception #0) Microsoft.Assumes+InternalErrorException: An internal error occurred. Please contact Microsoft Product Support Services.
at Microsoft.Assumes.Fail(String message, Boolean showAssert)
at Microsoft.Assumes.NotNull[T](T value)
at Microsoft.VisualStudio.ProjectSystem.Designers.ProjectDirectoryTreeProvider.<ProcessFileEventsAddFileAsync>d__5c.MoveNext()
--- 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 Microsoft.VisualStudio.ProjectSystem.Designers.ProjectDirectoryTreeProvider.<ProcessFileEventsAsync>d__4c.MoveNext()
--- 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.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.VisualStudio.ProjectSystem.Utilities.Designers.ProjectTreeProviderBase.<>c__DisplayClass9.<<Initialize>b__5>d__b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.ProjectSystem.Utilities.CommonProjectSystemTools.Rethrow(Exception ex)
at Microsoft.VisualStudio.ProjectSystem.ProjectErrorReporting.<>c__DisplayClass5.<SubmitErrorReport>b__3()
at Microsoft.VisualStudio.ProjectSystem.ExceptionFilter.<>c__DisplayClass2.<Guard>b__0()
at GuardMethodClass.GuardMethod(Func`1 , Func`2 , Func`2 )
<---
===================
I wonder if there is any solution.
Thank you

Web API CORS OPTION returns 500 randomly only on azure

Im developing a .NET Web Api (using OWIN) and a ember app consuming the web api. The web api is hosted on azure (api app). The problem is that sometimes the option call is failing (500 error) and the gui hangs. If I triggers the option call again it works again. If Im running the api on my local IIS, this problem never happens. The problem occurs most often when I have not done anything/triggered any ajax calls in the web app for awhile (5 min). Any clue why this is happening?
This is my startup config:
public partial class
Startup
{
public void Configuration(IAppBuilder app)
{
//enable cors
app.UseCors(CorsOptions.AllowAll);
//enable hangfire
Hangfire.GlobalConfiguration.Configuration
.UseSqlServerStorage("DbConnection")
.UseActivator(new StructureMapJobActivator(IoC.Initialize()));
app.UseHangfireDashboard();
app.UseHangfireServer();
//automapper
AutoMapperBootstrapper.Bootstrap();
//oauth 2
var userManager = new UserManager();
var authConfig = new SentinelAuthorizationServerOptions()
{
UserManager = userManager,
ClientManager = new ClientManager(),
};
var shaProvider = new SHA2CryptoProvider();
var onBoardTokenRepository = new OnBoardTokenRepository(new ConnectionFactory(new Configuration()), "DbConnection");
authConfig.TokenManager = new TokenManager(LogManager.GetLogger<Startup>(), userManager, new PrincipalProvider(shaProvider), shaProvider, new TokenFactory(), onBoardTokenRepository);
app.UseSentinelAuthorizationServer(authConfig);
GlobalConfiguration.Configure(WebApiConfig.Register);
}
I found this error in the azure event log:
https://microsoft-apiapp08044e6364624e2e88cfda954ace012a.azurewebsites.net:443/job/getemployerjobs/job/getemployerjobs104.45.82.120FalseIIS APPPOOL\Microsoft-ApiApp08044e6364624e2e88cfda954ace012a108IIS APPPOOL\Microsoft-ApiApp08044e6364624e2e88cfda954ace012aFalse at System.Web.HttpHeaderCollection.SetHeader(String name, String value, Boolean replace)
at System.Web.HttpHeaderCollection.Set(String name, String value)
at Microsoft.Owin.Host.SystemWeb.CallHeaders.AspNetResponseHeaders.Set(String key, String[] values)
at Microsoft.Owin.Host.SystemWeb.CallHeaders.AspNetResponseHeaders.set_Item(String key, String[] value)
at Microsoft.Owin.Infrastructure.OwinHelpers.SetHeaderUnmodified(IDictionary`2 headers, String key, String[] values)
at Microsoft.Owin.Infrastructure.OwinHelpers.AppendHeaderUnmodified(IDictionary`2 headers, String key, String[] values)
at Microsoft.Owin.HeaderDictionary.AppendValues(String key, String[] values)
at Microsoft.Owin.Security.OAuth.OAuthBearerAuthenticationProvider.<.ctor>b__2(OAuthChallengeContext context)
at Microsoft.Owin.Security.OAuth.OAuthBearerAuthenticationProvider.ApplyChallenge(OAuthChallengeContext context)
at Microsoft.Owin.Security.OAuth.OAuthBearerAuthenticationHandler.ApplyResponseChallengeAsync()
at Microsoft.Owin.Security.Infrastructure.AuthenticationHandler.<ApplyResponseCoreAsync>d__b.MoveNext()
--- 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 Microsoft.Owin.Security.Infrastructure.AuthenticationHandler.<ApplyResponseAsync>d__8.MoveNext()
--- 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 Microsoft.Owin.Security.Infrastructure.AuthenticationHandler.<TeardownAsync>d__5.MoveNext()
--- 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 Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware`1.<Invoke>d__0.MoveNext()
--- 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 Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware`1.<Invoke>d__0.MoveNext()
--- 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 Microsoft.Owin.Mapping.MapMiddleware.<Invoke>d__0.MoveNext()
--- 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 Microsoft.Owin.Cors.CorsMiddleware.<Invoke>d__0.MoveNext()
--- 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 Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContextStage.<RunApp>d__5.MoveNext()
--- 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 Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.<DoFinalWork>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.StageAsyncResult.End(IAsyncResult ar)
at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.EndFinalWork(IAsyncResult ar)
at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
It seems this is related to Microsofts OWIN implementation: http://katanaproject.codeplex.com/discussions/540202 .
The relevant pull request is here: https://katanaproject.codeplex.com/workitem/263
The underlying OWIN OAuth middleware sometimes "seals off" the response when it creates a response.

Resources