ID4291: The security token ‘Microsoft.IdentityModel.Tokens.SessionSecurityToken’ is not scoped to the current endpoint

Issue:

ID4291: The security token ‘Microsoft.IdentityModel.Tokens.SessionSecurityToken’ is not scoped to the current endpoint

My Web.Config:
<cookieHandler requireSsl=”false” path=”/” />

Environment:

Windows, ASPNet, IdentityModel, STS

Resolution:

The issue is due to root path error. Please check all apps’ web.config and make sure all web.configs have same path value under identity model section.

Step-by-step instructions:-

  1. Open web.config of an application in edit mode
  2. Search for “cookiehandler”
  3. Remove  path=”/” from cookie handler attribute:
    <cookieHandler requireSsl=”false” />
  4. Save web.config and try again.

 

Windows DOS Command Prompt (CMD) And CURL Multi-lines Entry

Issue:

How do you enter multiple lines of CURL commands to DOS prompt?

Environment:

Windows DOS, CMD, CURL

Resolution:

Using ^ (carat) at the end of each line to have more command enter. This way you can see all the commands entered nicely on the screen.

Step-by-step instructions:-

Sample CURL command:

curl https://www.problemsolvedtoo.com ^
--request POST ^
--header "Content-Type: application/json" ^
--data '{"data":"Hello World!"}'