Reputation: 11
I have a Windows Service that is exposing some WCF services where access is restricted using Windows Authentication and AD roles.
One of the services is a service for an admin client currently implemented as an MMC (Microsoft Management Console) Snapin.
I would like to change this for a browser based dashboard implemented with ServiceStack and the Razorplugin.
Out of the box ServiceStack does not support Windows Authentication for self hosted services.
Has someone done this before? Is it possible? For example implemented something like this in a ServiceStack plugin?
UPDATE: I can enable the Windows Authentication on my AppHostHttpListenerBase derived AppHost like this.
public override void Start(string urlBase)
{
if (Listener == null)
{
Listener = new HttpListener();
}
Listener.AuthenticationSchemes = AuthenticationSchemes.IntegratedWindowsAuthentication | AuthenticationSchemes.Anonymous;
Listener.AuthenticationSchemeSelectorDelegate = request =>
{
return request.Url.LocalPath.StartsWith("/public") ? AuthenticationSchemes.Anonymous : AuthenticationSchemes.IntegratedWindowsAuthentication;
};
base.Start(urlBase);
}
What I really need is access to the HttpListenerContext from with Filters.
Regards, Anders
Upvotes: 1
Views: 460