katana

Use OWIN Ws-Federation package to authenticate against ADFS 3.0

醉酒当歌 提交于 2019-12-03 07:14:49
问题 I have an MVC intranet site that needs to use AD accounts for authentication. I setup ADFS 3.0 (Win Server 2012 R2) and followed this to setup the ADFS Relying Party Trust. This other post introduces the Ws-Federation OWIN components and I'd like to use it. It mentions how to connect to an Azure AD but nothing regarding ADFS. I tried setting the configuration properties "MetadataAddress" and "Wtrealm" to match what I configured in ADFS but at runtime I get an error: A default value for

OWIN and Katana, why decouple the application from the server?

孤街浪徒 提交于 2019-12-03 06:29:10
问题 I dont quite get this.. sure its cool to be able to self-host an application and it might be nice since if the IIS goes down for any reason... then all your sites goes down.. but if they are self-hosted then they live there own life in there own context.. which I guess is nice.. But i still dont get the pros of this.. do I skip alot of unnecessary things in the IIS pipe by using owin which speeds the application up, or.. whats the actual pros? (you dont need to list all of them if they are

How do I create a ClaimsIdentity object for Asp.NET MVC 5?

不羁的心 提交于 2019-12-03 04:50:15
问题 I am working in a .NET MVC 5 application. I do not want to use Entity Framework. I want to authenticate to a RavenDB database. It looks to me that I want to replace the UserManager that comes with the Account Controller. I think I can rewrite all the UserManager functions to work with my database, except I don't understand the ClaimsIdentity object. In the SignInAsync method, there is a call to UserManager.CreateIdentityAsync(...) . I know it returns a ClaimsIdentity object. What I don't know

How do I enable Application Insights server telemetry on WebApi project that uses OWIN?

你。 提交于 2019-12-03 01:50:18
We are having a bunch of problems (read long response times) with a couple of projects in production and wanted to see exactly what was happening on the server. I then proceeded to add Application Insights to all of our projects by following this article . The problem is that both of our WebAPI projects are not sending server data to the Azure portal, while all other projects (MVC 5) are. This is what is shown when I access the corresponding Application Insights blade on Azure: I tried to disable and re-enable data collection in the Application Insights Status Monitor in our Azure VMs,

Authentication with Microsoft.Owin.Testing.TestServer for In-Memory Integration Tests

邮差的信 提交于 2019-12-02 22:43:56
I've just moved to using OWIN\Katana for a web api project. It uses Windows Authentication. This seems to be working, but most of my integration tests have broken. They were previously just using an In-Memory HttpServer but I've changed to using Microsoft.Owin.Testing.TestServer . I've replaced something like this in my test setup: var config = new HttpConfiguration { IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always }; config.EnableQuerySupport(); Server = new HttpServer(config); MyConfigClass.Configure(config); WebApiConfig.Register(config); with a simpler: TestServer = TestServer

OWIN send static file for multiple routes

為{幸葍}努か 提交于 2019-12-02 22:14:18
I'm making a SPA which sits on top of ASP.Net WebAPI. I'm waiting to use HTML5 history rather than #/ for history routing but that poses a problem for deep linking, I need to make sure / and /foo/bar all return the same HTML file (and my JS will render the right part of the SPA). How do I get OWIN/Katana to return the same HTML file for multiple different urls? To make things simple, while still keeping all the caching goodness etc. from the StaticFiles middleware, I'd just rewrite the request path using an inline middleware, like this public class Startup { public void Configuration

Use OWIN Ws-Federation package to authenticate against ADFS 3.0

社会主义新天地 提交于 2019-12-02 22:00:33
I have an MVC intranet site that needs to use AD accounts for authentication. I setup ADFS 3.0 (Win Server 2012 R2) and followed this to setup the ADFS Relying Party Trust. This other post introduces the Ws-Federation OWIN components and I'd like to use it. It mentions how to connect to an Azure AD but nothing regarding ADFS. I tried setting the configuration properties "MetadataAddress" and "Wtrealm" to match what I configured in ADFS but at runtime I get an error: A default value for SignInAsAuthenticationType was not found in IAppBuilder Properties. This can happen if your authentication

Authentication / Authorization MVC 5 and Web API - Katana/Owin

。_饼干妹妹 提交于 2019-12-02 21:09:09
I'm having problems trying to decide on a route to take on a project I have. I've been reading up on OWIN specs and Katana implementation within .NET. The reason why I'd like to go with the Katana route is because of the owin components associated with ADFS and Token/Cookie generation. I have two projects, one for MVC 5 website, and one for Web API. They may rest of two separate servers in the future, but for now they are on the same. I know I will be using IIS, so the Owin pipeline isn't necessary for me to investigate. The requirements I have is that there will be users that will be logging

OWIN and Katana, why decouple the application from the server?

Deadly 提交于 2019-12-02 21:04:07
I dont quite get this.. sure its cool to be able to self-host an application and it might be nice since if the IIS goes down for any reason... then all your sites goes down.. but if they are self-hosted then they live there own life in there own context.. which I guess is nice.. But i still dont get the pros of this.. do I skip alot of unnecessary things in the IIS pipe by using owin which speeds the application up, or.. whats the actual pros? (you dont need to list all of them if they are many :), but just so I get why you would like to use OWIN and Katana over the IIS) Thanks in advance!

How do I create a ClaimsIdentity object for Asp.NET MVC 5?

怎甘沉沦 提交于 2019-12-02 19:09:39
I am working in a .NET MVC 5 application. I do not want to use Entity Framework. I want to authenticate to a RavenDB database. It looks to me that I want to replace the UserManager that comes with the Account Controller. I think I can rewrite all the UserManager functions to work with my database, except I don't understand the ClaimsIdentity object. In the SignInAsync method, there is a call to UserManager.CreateIdentityAsync(...) . I know it returns a ClaimsIdentity object. What I don't know is how to create a ClaimsIdentity object on my own. I see that it has 4 properties Actor ,