This is my class MyHub
public class MyHub : Hub
{
public bool AuthenRequest(string customerId, string sessionAccount, byte[] cusId)
{
bool Authen = ATDChatServer.Instance.OnAuthenRequest(customerId, sessionAccount, cusId);
if (Authen)
{
var user = Context.User;
return user.Identity.IsAuthenticated;
}
return false;
}
}
It throws an exception user is null.
I've searched some solution, one of those is: here
ConfigureAuth(app);
app.MapSignalR();
But when I insert this code to my StartUp class:
ConfigureAuth(app);
It shows error : The name 'ConfigureAuth(app)' doesn't exist in current text?
How to insert it?