I'm configuring an Azure Logic App to deliver daily digests from Application Insights.
The query I'm running works fine in the Application Insights Metrics Explorer.
I'm asking the app to deliver the query results as an Html table.
It's failing with the following response:
Headers:
{
"Pragma": "no-cache",
"Timing-Allow-Origin": "*",
"Cache-Control": "no-cache",
"Date": "Thu, 13 Jul 2017 07:33:15 GMT",
"Server": "Microsoft-IIS/8.0,Microsoft-HTTPAPI/2.0",
"X-AspNet-Version": "4.0.30319",
"X-Powered-By": "ASP.NET",
"Content-Length": "2197",
"Content-Type": "application/json",
"Expires": "-1"
}
Body:
{
"error": {
"code": 500,
"message": "\"Microsoft.ApplicationInsights.DraftClient.Exceptions.FailedToParseDraftQueryResponseException: Failed to convert table (JToken) to Table object ---> System.ArgumentException: Can not convert Null to Int32.\\r\\n at Newtonsoft.Json.Linq.JToken.op_Explicit(JToken value)\\r\\n at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType)\\r\\n at Microsoft.ApplicationInsights.DraftClient.Helpers.DraftResponseParser.ConvertToTable(JToken token)\\r\\n --- End of inner exception stack trace ---\\r\\n at Microsoft.ApplicationInsights.DraftClient.Helpers.DraftResponseParser.ConvertToTable(JToken token)\\r\\n at Microsoft.ApplicationInsights.DraftClient.Helpers.DraftResponseParser.ParseDraftQueryResponse(String draftQueryResponseInJson)\\r\\n at Microsoft.ApplicationInsights.DraftClient.DraftApiClient.<ExecuteQueryAsync>d__10.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\\r\\n at Microsoft.ApplicationInsights.DraftClient.DraftApiClient.<ExecuteQueryAsync>d__9.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\\r\\n at DraftFlowConnector.VisualizeDraftResults.<RunAsync>d__6.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\\r\\n at DraftFlowConnector.VisualizeDraftResults.<RunAsync>d__5.MoveNext()\""
}
}
Is this thing something I can fix on my end?
Seems like the failure is associated with an attempt to convert a numeric column (which has empty values) to an 'Int' type.
We'll work on a fix for this, and in the meantime, you can work around this by adding a 'where' statement to your query, that filters out rows containing an empty value in the relevant numeric column(s), something like:
| where tostring(columnName) != ""
Thanks!
Related
I have WebAPI writteni in ASP.NET 4.6.2.
One endpoint has a duration of more than 1 hour. I need to set up IIS and application pool for 4 hours.
Execution of endpoint always ends in 1 hour.
<!-- timeout to 4 hours -->
<httpRuntime targetFramework="4.6.2" executionTimeout="14400" />
Stack:
System.ObjectDisposedException: Cannot access a disposed object. A common cause of this error is disposing a context that was resolved from dependency injection and then later trying to use the same context instance elsewhere in your application. This may occur if you are calling Dispose() on the context, or wrapping the context in a using statement. If you are using dependency injection, you should let the dependency injection container take care of disposing context instances.
Object name: 'MyDbContext'.
at Microsoft.EntityFrameworkCore.DbContext.CheckDisposed()
at Microsoft.EntityFrameworkCore.DbContext.get_Database()
at Fullsys.MyIS.Core.BL.Common.AppUnitOfWork.RollbackTransaction()
at Fullsys.MyIS.Modules.Planovani.Business.MrpPlanBusiness.Rollback() in S:\Projects\net\MyIS\MyApp\Verze-1\Modules\Planovani\Business\MrpPlanBusiness.cs:line 269
at Fullsys.MyIS.Modules.Planovani.PlanovaniFacade.FinishAkceSChybou(AkceEnum akce) in S:\Projects\net\MyIS\MyApp\Verze-1\Modules\Planovani\PlanovaniFacade.cs:line 877
at Fullsys.MyIS.Modules.Planovani.PlanovaniFacade.ExecProtokolAkce(Action validate, Action action, AkceEnum akce, Int64 id) in S:\Projects\net\MyIS\MyApp\Verze-1\Modules\Planovani\PlanovaniFacade.cs:line 865
at Fullsys.MyIS.Modules.Planovani.PlanovaniFacade.CreateVyrobniZakazky(Int64 id, ProtocolInfo& protocolInfo) in S:\Projects\net\MyIS\MyApp\Verze-1\Modules\Planovani\PlanovaniFacade.cs:line 587
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_2.<GetExecutor>b__2(Object instance, Object[] methodParameters)
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.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>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 System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.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 System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.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 System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.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 System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext()
So I've created a simple ASP .NET site, where you can send a message to the Watson service and receive the response.
It works locally when I run the application from VS2017, but now I've deployed it to my 2012 R2 Server and it doesn't work.
The application runs, but I'm not able to receive any answer from the Watson service.
What am I missing in the IIS?
This is the SDK, I've been using.
https://github.com/watson-developer-cloud/dotnet-standard-sdk
Here is the only error I can find in the eventvwr.
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 25-04-2019 15:51:35
Event time (UTC): 25-04-2019 13:51:35
Event ID: 8eb66320f2fa412ea0a2cf3f61d5f3b2
Event sequence: 19
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/6/ROOT-6-132006738849963250
Trust level: Full
Application Virtual Path: /
Application Path: xxx
Machine name: OSI4908
Process information:
Process ID: 6844
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: HttpException
Exception message: The remote host closed the connection. The error code is 0x80070057.
at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()
at System.Web.HttpResponse.Flush(Boolean finalFlush, Boolean async)
at System.Web.HttpWriter.WriteFromStream(Byte[] data, Int32 offset, Int32 size)
at Microsoft.Owin.Host.SystemWeb.CallStreams.OutputStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at Microsoft.AspNet.SignalR.Owin.ServerResponse.Write(ArraySegment`1 data)
at Microsoft.AspNet.SignalR.Hosting.ResponseExtensions.End(IResponse response, String data)
at Microsoft.Owin.Mapping.MapMiddleware.<Invoke>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.StageAsyncResult.End(IAsyncResult ar)
at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I am trying to insert records in dynamodb using AWS .NET core SDK, but I am getting following exception:
The security token included in the request is invalid.
Please find below the steps I have done to connect it:
Created a new access key in IAM.
downloaded access key and secret key locally.
created a file name credentials in C:/users//.aws/
Added following code to the file (removed credentials for security purpose)
[default]
aws_access_key_id = xxxxxxxxxxxxxxxxxxxx
aws_secret_access_key = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Added following code to appsettings.json file:
"AWS":{
"Region": "ap-south-1",
"Profile": "default"}
in startup.cs, ConfigureServices method I have added following code:
services.AddDefaultAWSOptions(Configuration.GetAWSOptions());
services.AddAWSService<IAmazonDynamoDB>();
When I execute my code using following piece for code, I receive exception "The security token included in the request is invalid"
I have also tried the getting accesskey and secret key from appsettings.json
"AWS": {
"Region": "ap-south-1",
"AccessKey": "xxxxxxxxxxxxxxxxxxxx",
"SecretKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
And Setting these credentials in environment variables in startup.cs file
services.AddDefaultAWSOptions(Configuration.GetAWSOptions());
services.AddMvc();
Environment.SetEnvironmentVariable("AWS_ACCESS_KEY_ID", Configuration["AWS:AccessKey"]);
Environment.SetEnvironmentVariable("AWS_SECRET_ACCESS_KEY", Configuration["AWS:SecretKey"]);
Environment.SetEnvironmentVariable("AWS_REGION", Configuration["AWS:Region"]);
services.AddAWSService<IAmazonDynamoDB>();
I still get the same exception, please find the stack trace below:
at Amazon.Runtime.Internal.HttpErrorResponseExceptionHandler.HandleException(IExecutionContext executionContext, HttpErrorResponseException exception) in E:\JenkinsWorkspaces\v3-stage-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\ErrorHandler\HttpErrorResponseExceptionHandler.cs:line 60
at Amazon.Runtime.Internal.ErrorHandler.ProcessException(IExecutionContext executionContext, Exception exception) in E:\JenkinsWorkspaces\v3-stage-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\ErrorHandler\ErrorHandler.cs:line 212
at Amazon.Runtime.Internal.ErrorHandler.d__51.MoveNext() in E:\JenkinsWorkspaces\v3-stage-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\ErrorHandler\ErrorHandler.cs:line 104
--- 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__91.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.d__71.MoveNext() in E:\JenkinsWorkspaces\v3-stage-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\Handlers\CredentialsRetriever.cs:line 98
--- 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__101.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Amazon.Runtime.Internal.RetryHandler.d__101.MoveNext() in E:\JenkinsWorkspaces\v3-stage-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\RetryHandler\RetryHandler.cs:line 153
--- 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__91.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.d__91.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__51.MoveNext() in E:\JenkinsWorkspaces\v3-stage-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\Handlers\ErrorCallbackHandler.cs:line 58
--- 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.d__11.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 System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at DataAccess.Implementation.TrainerAccess.d__6.MoveNext() in D:.Net Projects\TraninerExchange\proj\TXApi\DataAccess\Implementation\TrainerAccess.cs:line 47
Can someone help me with this problem?
Please let me know if I am missing anything here.
Here, verify your access key ID & secret access key for selected profile in AWS Explorer. Because of false credential in profile this issue is created. or if you don't need profile any more than remove it.
im facing a problem trying to implement simple token authentication on .net core 1.0.1, ive followed a simple tutorial that i fond here:
http://kevinchalet.com/2017/01/30/implementing-simple-token-authentication-in-aspnet-core-with-openiddict/
When i try to send a request to http://localhost:51863/connect/token?grant_type=password&username=alice%40wonderland.com&password=P%40ssw0rd i got the response : invalid_request","error_description":"The specified HTTP method is not valid.
my startup.cs:
services.AddDbContext<AssistDbContext>(options =>
{
options.UseSqlServer(Configuration.GetConnectionString("AssistContext"));
});
services.AddScoped<AssistDbContext, AssistDbContext>();
services.AddDbContext<DbContext>(options =>
{
// Configure the context to use an in-memory store.
options.UseInMemoryDatabase();
// Register the entity sets needed by OpenIddict.
// Note: use the generic overload if you need
// to replace the default OpenIddict entities.
options.UseOpenIddict();
});
services.AddOpenIddict(options =>
{
// Register the Entity Framework stores.
options.AddEntityFrameworkCoreStores<DbContext>();
// Register the ASP.NET Core MVC binder used by OpenIddict.
// Note: if you don't call this method, you won't be able to
// bind OpenIdConnectRequest or OpenIdConnectResponse parameters.
options.AddMvcBinders();
// Enable the token endpoint.
options.EnableTokenEndpoint("/api/authorization/token");
// Enable the password flow.
options.AllowPasswordFlow();
// During development, you can disable the HTTPS requirement.
options.DisableHttpsRequirement();
});
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
app.UseApplicationInsightsRequestTelemetry();
app.UseApplicationInsightsExceptionTelemetry();
// Register the validation middleware, that is used to decrypt
// the access tokens and populate the HttpContext.User property.
app.UseOAuthValidation();
// Register the OpenIddict middleware.
app.UseOpenIddict();
app.UseMvcWithDefaultRoute();
}
UPDATE
Testing with Postman returns 404:
Logs:
Microsoft.AspNetCore.Hosting.Internal.WebHost:Information: Request starting HTTP/1.1 POST http://localhost:51863/api/Authorization application/x-www-form-urlencoded 49
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Users\consultoria.nuget\packages\AspNet.Security.OpenIdConnect.Extensions\1.0.2\lib\netstandard1.4\AspNet.Security.OpenIdConnect.Extensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Users\consultoria.nuget\packages\Microsoft.AspNetCore.WebUtilities\1.1.0-preview1-final\lib\netstandard1.3\Microsoft.AspNetCore.WebUtilities.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
AspNet.Security.OpenIdConnect.Server.OpenIdConnectServerMiddleware:Information: The token request was successfully extracted from the HTTP request: {
"grant_type": "password",
"username": "teste",
"password": "[removed for security reasons]"
}.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Users\consultoria.nuget\packages\Microsoft.EntityFrameworkCore.InMemory\1.0.1\lib\netstandard1.3\Microsoft.EntityFrameworkCore.InMemory.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Users\consultoria.nuget\packages\Remotion.Linq\2.1.1\lib\netstandard1.0\Remotion.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Users\consultoria.nuget\packages\System.Interactive.Async\3.0.0\lib\netstandard1.0\System.Interactive.Async.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.0.1\System.Diagnostics.StackTrace.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.0.1\System.Reflection.Metadata.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.0.1\System.IO.MemoryMappedFiles.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.0.1\System.IO.UnmanagedMemoryStream.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware:Error: An unhandled exception has occurred: Method 'get_CurrentTransaction' in type 'Microsoft.EntityFrameworkCore.Storage.Internal.InMemoryTransactionManager' from assembly 'Microsoft.EntityFrameworkCore.InMemory, Version=1.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation.
System.TypeLoadException: Method 'get_CurrentTransaction' in type 'Microsoft.EntityFrameworkCore.Storage.Internal.InMemoryTransactionManager' from assembly 'Microsoft.EntityFrameworkCore.InMemory, Version=1.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation.
at Microsoft.Extensions.DependencyInjection.InMemoryServiceCollectionExtensions.AddEntityFrameworkInMemoryDatabase(IServiceCollection services)
at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.<>c__DisplayClass4_1.b__2(Int64 k)
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)
at Microsoft.EntityFrameworkCore.DbContext..ctor(DbContextOptions options)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.<>c__DisplayClass16_0.b__0(ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at OpenIddict.OpenIddictProvider4.<ValidateTokenRequest>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 AspNet.Security.OpenIdConnect.Server.OpenIdConnectServerHandler.<InvokeTokenEndpointAsync>d__17.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 AspNet.Security.OpenIdConnect.Server.OpenIdConnectServerHandler.<HandleRequestAsync>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 Microsoft.AspNetCore.Authentication.AuthenticationMiddleware1.d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware1.<Invoke>d__18.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.AspNetCore.Authentication.AuthenticationMiddleware1.d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.d__18.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.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.d__6.MoveNext()
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Request","time":"2017-10-27T14:41:33.6130254Z","tags":{"ai.operation.id":"VBvjL4hwyqs=","ai.user.userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36","ai.internal.sdkVersion":"aspnet5c:1.0.0","ai.operation.name":"POST /api/Authorization","ai.device.roleInstance":"CPD200"},"data":{"baseType":"RequestData","baseData":{"ver":2,"id":"VBvjL4hwyqs=","name":"POST /api/Authorization","startTime":"2017-10-27T14:41:33.6130254+00:00","duration":"00:00:00.4732983","success":false,"responseCode":"404","url":"http://localhost:51863/api/Authorization","httpMethod":"POST","properties":{"DeveloperMode":"true"}}}}
Microsoft.AspNetCore.Hosting.Internal.WebHost:Information: Request finished in 490.1896ms 404
The error message is extremely clear: you're using a wrong HTTP method (probably GET as I can see the query string parameters attached to the URI).
Use POST as required by the OAuth2 specification and it should work.
Looks like following Authentication statement is missing from the code snippet
services.AddAuthentication(options =>
{
options.DefaultScheme = OAuthValidationDefaults.AuthenticationScheme;
});
I've been getting the following error in a production environment. Please refer the error in the bottom. So far I was able to recreate the problem by letting the orchestration suspend by forcing a db timeout in the application db call, and resuming the instance. After repeating the action for 2 rounds on the same instance, third time the instance will get suspended with the error below.
What could be the reason for this behavior?
BizTalk Error
Uncaught exception (see the 'inner exception' below) has suspended an
instance of service '{ORCHESTRATION
NAME}(57adc083-7423-2bff-bd2d-ca813b8c0f4e)'. The service instance
will remain suspended until administratively resumed or terminated.
If resumed the instance will continue from its last persisted state
and may re-throw the same unexpected exception. InstanceId:
1bca1f03-7780-4f45-af2e-020724c8a92d Shape name: ShapeId: Exception
thrown from: segment -1, progress -1 Inner exception: Unable to
process exec message.
Exception type: Exception Source: Microsoft.XLANGs.BizTalk.Engine Target Site: System.Object[]
get_Args() The following is a stack trace that identifies the location
where the exception occured
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXService.get_Args() at
{ORCHESTRATION NAME}.segment1(StopConditions stopOn) at
Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s,
StopConditions stopCond, Exception& exp)
Stack trace
xlang/s engine event log entry: Failed while delivering a message to a
service instance. Message details follow. Message ID:
61eaa7fc-ac85-42d9-bf3e-1bed258b82be Service Instance ID:
1bca1f03-7780-4f45-af2e-020724c8a92d Service Type ID:
57adc083-7423-2bff-bd2d-ca813b8c0f4e Subscription ID:
00000000-0000-0000-0000-000000000000 Body part name: Service type:
{ORCHESTRATION NAME}, {Assembly Details}
Exception type: BTXMessageDeliveryException The following is a stack
trace that identifies the location where the exception occured
at
Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._receiveOneMessage(Guid&
instanceId, Guid& serviceId, IBTMessage currentMsg) at
Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession.ReceiveMessages(IBTMessage[]
messages, Int32 firstIdx, Int32 count) at
Microsoft.BizTalk.XLANGs.BTXEngine.AppDomains.AppDomainRoot.Microsoft.XLANGs.BizTalk.ProcessInterface.IAppDomainStub.ReceiveMessages(Object
objMsg)
Additional error information:
Failed while delivering a message to a service instance. Message details follow. Message ID:
61eaa7fc-ac85-42d9-bf3e-1bed258b82be Service Instance ID:
1bca1f03-7780-4f45-af2e-020724c8a92d Service Type ID:
57adc083-7423-2bff-bd2d-ca813b8c0f4e Subscription ID:
00000000-0000-0000-0000-000000000000 Body part name: Service type:
{ORCHESTRATION NAME}, {Assembly Details}
Exception type: BTXMessageDeliveryException Source:
Microsoft.XLANGs.BizTalk.Engine Target Site: Void
DeliverMessage(System.Guid,
Microsoft.BizTalk.Agent.Interop.IBTMessage, Boolean ByRef) The
following is a stack trace that identifies the location where the
exception occured
at
Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._tryReceiveOneMessage(Boolean&
loggedError, Guid& instanceId, IBTMessage currMsg) at
Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._receiveOneMessage(Guid&
instanceId, Guid& serviceId, IBTMessage currentMsg) at
Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession.ReceiveMessages(IBTMessage[]
messages, Int32 firstIdx, Int32 count) at
Microsoft.BizTalk.XLANGs.BTXEngine.AppDomains.AppDomainRoot.Microsoft.XLANGs.BizTalk.ProcessInterface.IAppDomainStub.ReceiveMessages(Object
objMsg)
Additional error information:
The XLANG/s message has no part at index '0'. The total number of parts found in the message is '0'. If you expect a multipart
message, check that the pipeline supports multipart messages such as
MIME.
Exception type: MissingPartException Source:
Microsoft.XLANGs.BizTalk.Engine Target Site: Void
ReadMessageState(Microsoft.XLANGs.Core.Envelope,
Microsoft.XLANGs.BaseTypes.XLANGMessage) The following is a stack
trace that identifies the location where the exception occured
at
Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.ReadMessageState(Envelope
env, XLANGMessage msg) at
Microsoft.BizTalk.XLANGs.BTXEngine.BTXService.ArgsFromExecEnvelope(IBTMessage
msg) at
Microsoft.BizTalk.XLANGs.BTXEngine.BTXService.DeliverMessageImpl2(Guid
subscriptionId, IBTMessage msg, Boolean& receiveCompleted) at
Microsoft.BizTalk.XLANGs.BTXEngine.BTXService.DeliverMessage(Guid
subscriptionId, IBTMessage msg, Boolean& receiveCompleted)
Received this myself. Not sure what you were doing when you started receiving it. For me, I had a working orchestration and then added a correlation set. I use BTDF so simply updated the GAC only with new orchestration when I really should've done a full re-deploy (I know, lazy.).
Anyway, once I did redeploy fully, cycle hosts, and retest it worked fine.
Probably not answer you are looking for but it helped me. Here was my stack trace:
Exception type: BTXMessageDeliveryException
Source: Microsoft.XLANGs.BizTalk.Engine
Target Site: Void DeliverMessage(System.Guid, Microsoft.BizTalk.Agent.Interop.IBTMessage, Boolean ByRef)
The following is a stack trace that identifies the location where the exception occured
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._tryReceiveOneMessage(Boolean& loggedError, Guid& instanceId, IBTMessage currMsg)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._receiveOneMessage(Guid& instanceId, Guid& serviceId, IBTMessage currentMsg)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession.ReceiveMessages(IBTMessage[] messages, Int32 firstIdx, Int32 count)
at Microsoft.BizTalk.XLANGs.BTXEngine.AppDomains.AppDomainRoot.Microsoft.XLANGs.BizTalk.ProcessInterface.IAppDomainStub.ReceiveMessages(Object objMsg)
at Microsoft.XLANGs.BizTalk.CrossProcess.AppDomainStubProxy.Microsoft.XLANGs.BizTalk.ProcessInterface.IAppDomainStub.ReceiveMessages(Object msgs)
Additional error information:
Index was outside the bounds of the array.