Last post Mar 05, 2019 01:22 AM by Ackerly Xu
Feb 27, 2019 03:20 PM|Shadow_Kittencorn|LINK
I have been developing my asp.net core project in Visual Studio 2017 using both IIS Express and the local IIS server. I tried to run this in Rider with (what should be) the same configuration, but I am getting the error:
Unable to cast object of type 'System.Security.Claims.ClaimsIdentity' to type 'System.Security.Principal.WindowsIdentity'.
var wi = (WindowsIdentity)context.User.Identity;
I do not get this when launching it with VS2017. Does anyone know what could cause it? I don't want it to become and issue later on.
In the code I am using:
To create an AuthorizationHandler
Feb 28, 2019 02:53 AM|Ackerly Xu|LINK
Have you checked whether WindowsIdentity extends ClaimsIdentity in your JetBrains rider?
If it doesn't work, you could try to convert the Identity to GenericIdentity or FormsIdentity, if it could be converted to any of them , then your identity is actually a GenericIdentity or FormsIdentity not WindowsIdentity .
If so , I think you haven't opened Windows Authentication in JetBrains rider.
Mar 03, 2019 05:07 PM|Shadow_Kittencorn|LINK
I have been trying to enable Windows Auth in Rider as above (and as https://agilewarrior.wordpress.com/2018/02/22/how-to-enable-windows-authentication-rider/)
but Rider seems to have changed. I don't have a config folder under .idea and the 'Web' tab shown on the above guide (under project properties) it missing - I just have 'Application' and 'NuGet'.
Mar 04, 2019 01:21 AM|Ackerly Xu|LINK
Not sure about JetBrains ride, however below link was created on Aug 8 '17 at 6:31.
The ide shouldn't change so fast , are you sure your rider has full feature?
Maybe your rider has no this feature for it is in a tree trial or other reasons.
If you are not sure , I suggest you could post an issue here https://youtrack.jetbrains.com/issues/RIDER
Mar 04, 2019 08:06 AM|Shadow_Kittencorn|LINK
I am sure that Rider is fully-featured. It is a trial, but I am not renewing my license unless I know it will work for me. I have never had issue with their trials before (Webstorm etc) - as far as I know they do not limit features.
I have emailed them to check that their IDE supports it - Rider is fairly new compared with their others.
Mar 04, 2019 12:30 PM|Shadow_Kittencorn|LINK
This was the response:
Thanks for contacting us. Unfortunately, Rider 2018.3 cannot run
ASP.NET Core applications on IIS/IIS Express. However, Rider 2019.1 will have support for running such applications on IIS Express, see
RIDER-11638. We are planning to open
EAP for Rider 2019.1 this month. The stable release is planned for April-May.
Mar 05, 2019 01:22 AM|Ackerly Xu|LINK
I have understood. It couldn't run .net core application on iis/iis express.
Thank you for your reply.