No cookie matching signin id found - owin

I have implemented identityserver3 and it work well but sometime , i get error while redirecting to IDS(for login). Log says No matching Cookie signin Id .
I can see initial login cookie is not being sent to identityserver from our application in some cases.
I did some googling and it seems like existing issue with Katana and suggestion was too use app.UseKentorOwinCookieSaver() but even after that it doesn't seems to be working.
Another strange this is that .. problem appear only one time per browser session (that too 1st time) and doesn't appear after that or if i get app-pool reset it doesn't happen for sometime.
Is there something else i can try? Looking forward for any direction.
Thanks in advance.
Identity Log
04/19/2017 07:52:53 -07:00 [Information] ()
Posting to https://applicationURl/
04/19/2017 07:52:53 -07:00 [Information] ()
Login page submitted
04/19/2017 07:52:53 -07:00 [Information] ()
No cookie matching signin id found
04/19/2017 07:52:53 -07:00 [Information] ()
Start discovery request
04/19/2017 07:52:53 -07:00 [Information] ()
Start key discovery request
04/19/2017 07:52:53 -07:00 [Information] ()
CSP Report endpoint requested

Same issue was reported on GitHub.
Maybe this blog post helps: Catching the System.Web/Owin Cookie Monster.
It suggests to workaround this issue by adding app.UseKentorOwinCookieSaver(); to the Owin pipeline using the Kentor.OwinCookieSaver NuGet package.

Related

Cloud functions - Host instance 'xxxxxxxxxxxxx' failed to acquire host lock lease: Azure.Storage.Blobs

I have a function app attached to a storage account with 3 functions with timer triggers that randomly stopped working since last month.
Any pointers to troubleshoot?
Log stream pasted below
2022-06-09T03:19:21Z [Information] Retrying to start listener for
function 'Functions.MonthlyTriggerTotal' (Attempt 18)
2022-06-09T03:19:21Z [Information] Retrying to start listener for
function 'Functions.TimerTrigger1' (Attempt 18) 2022-06-09T03:19:21Z
[Information] Retrying to start listener for function
'Functions.RecurringExpensesTrigger' (Attempt 18) 2022-06-09T03:19:21Z
[Verbose] Host instance 'xxxx-xxx-xxxxxxxxx' failed to acquire host
lock lease: Azure.Storage.Blobs: Server failed to authenticate the
request. Make sure the value of Authorization header is formed
correctly including the signature.
RequestId:d859920b-901e-0035-40af-7b9e9a000000
Time:2022-06-09T03:19:21.2193397Z Status: 403 (Server failed to
authenticate the request. Make sure the value of Authorization header
is formed correctly including the signature.) ErrorCode:
AuthenticationFailed
Additional Information: AuthenticationErrorDetail: The MAC signature
found in the HTTP request 'xxx-xxxx-xxx-xxxx' is not the same as any
computed signature. Server used following string to sign: 'PUT
Retrying to start listener for function 'Functions.TimerTrigger1
AFAIK this issue not a problem in function app or platform which you have deployed as it is not synchronized properly.
Make sure your triggers are synchronized properly, try to disable, and enable in app setting and click refresh next to your app name.
Please check your time zone which you have configured in timer trigger function. If you must modify the same in it, use WEBSITE_TIME_ZONE setting. Also, check your desktop time too.
Please check this related answer provided by MayankBargali-MSFT
Timer triggered function app uses TimerTriggerAttribute. This attribute consists of Singleton Lock feature which can run a single instance of function at given time. If you are using the same storage account with different timer trigger functions, try to disable them by using_ UseMonitor = false on your TimerTrigger attribute.
Try to check the connection of local.settings.json for every function running locally.
Make sure you should not enable runOnStartup to true
Check whether the other two function apps uses time trigger to the same identifying configuration, only one timer can run.
If you are using azure function in cosmos db triggered, refer this
So
thread by Doris Lv
Please check this issue via running on Azure Functions diagnostics, if the issue still persists please raise azure support ticket to guides you right information
For your Reference :
https://github.com/Azure/azure-webjobs-sdk-extensions/wiki/TimerTrigger#troubleshooting
https://github.com/Azure/azure-functions-host/wiki/Investigating-and-reporting-issues-with-timer-triggered-functions-not-firing

Azure app service some requests returns 400 Bad Request. The request could not be understood by the server due to malformed syntax

So we have a simple .net core 5.0 service that only serves some simple pages with mvc. We are starting to get 400 Errors (details below) on some of the requests. Our frontend is embedded in an iframe which forces us to use our own domain for our api-calls. The 400 errors disappears when we use the azure internal-urls. (*.azurewebsites.net instead of *.ourdomain.net). When I get to the "diagnose and solve problems" -> "availability and performance" -> HTTP 4XX ERRORS i can se below errors. Any ideas on what can cause this error?
Bad Request. The request could not be understood by the server due to malformed syntax. The client should not repeat the request without modifications.
So, the biggest problem above is that we do not get the correct errormessage. After a lot of experimentation we activated the ConnectionLogging for Kestrel.
WebHost.CreateDefaultBuilder(args)
.UseKestrel(options =>
{
options.ConfigureEndpointDefaults(listenOptions =>
{
listenOptions.UseConnectionLogging();
});
})
And after that we found some more intressting logs. One that said:
Connection id "0HMFSA73IA4LS" bad request data: "Malformed request: invalid headers."
Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Malformed request: invalid headers.
After some more investigation we could diff a succesful request from a failing request. And the problem was related to the certificate of *.ourdomain.se. In a part of the certificate we hade a string thats named "Stockholms län" in the cases where it failed the string decoded to l�n and when it succeeded the string decoded to l%C3%A4n. We are now investigating if this is a load balancer problem. But this app is running hostingmodel outofprocess. By changing this to inprocess and wrap our Kestrel in IIS the errors disapears.

Dialog flow Web hook time out

I am creating agent using dialogflow with webhook. Facing problem in webhook timeout:
webhook_status { code: 4 message: "Webhook call failed. Error: Request
timeout." }
kindly help me to increase webhook timeout time.
There is no way you can increase Time Out for webhook. Your webhook should respond back within 5 seconds (see Limits here)

Azure Service Bus Request Time Out Issue

I am getting the time out error, when I called Azure Service Bus with the below code.
So I have applied retry logic, however still I am getting the time out error.
var msgFactory = MessagingFactory.CreateFromConnectionString(connection);
var namespaceManager = NamespaceManager.CreateFromConnectionString(connection);
if (!await namespaceManager.QueueExistsAsync(queueName)) //Time out Error
{///Code}
The request has timed out after 60000 milliseconds. The successful completion of the request cannot be determined. Additional queries should be made to determine whether or not the operation has succeeded. TrackingId:143b4d25-e97c-4270-8714-93a4c6818fea,TimeStamp:1/19/2016 8:30:36 PM
Maybe just because a pair of parentheses missing in:
if (!await namespaceManager.QueueExistsAsync(queueName))
which should be:
if (!(await namespaceManager.QueueExistsAsync(QueueName)))
We need to run the pregame outside of the company firewall, then it will work.

Http Inbound Gateway takes 2x timeout to send timeout response to client

We're using an http inbound gateway to process http requests. Lately , we wanted to set specific http response code that will be sent to user after a timeout.
We upgraded to spring 4.2.1 and set
the reply-timeout-status-code-expression attribute
and it's working now.
But there is a problem : if we set the timeout to 10 seconds , a ReplyTimeoutException is raised in the web application after exactly 10 seconds but the response arrives to the client after 20 seconds ( exactly the double ).
We changed the timeout several times but it always take 2x timeout for the response to be received by client.
This is the xml config for the http inbound gateway :
<int-http:inbound-gateway id="inboundRequest" request-channel="inbound-channel"
supported-methods="POST" path="/Request" error-channel="errorChannel" reply-channel="gateway_response"
reply-timeout="5000" request-payload-type="java.lang.String" reply-timeout-status-code-expression="'504'" >
A Help would be really appreciated
I see you have an error-channel - if the error flow returns no response, the reply timer starts again when the error flow ends (we're waiting for a reply from the error flow).
Instead of returning nothing from the error flow, you need to throw a MessageTimeoutException.
Turning on DEBUG logging and following the message flow is the best way to diagnose issues like this.
If that's not the problem, you need to show the rest of your configuration (edit the question, don't try to post it in a comment).

Resources