c#


ASP.NET OWIN - Adding WsFederation at runtime


I'd like to add support for administrators to add a trusted federation to my site. I'm trying to do this in my controller without having to restart the web app using:
app.Map("/Account", configuration =>
{
var provider = new WsFederationAuthenticationOptions
{
AuthenticationType = organizationModel.ADFS_Domain,
MetadataAddress = organizationModel.ADFS_MetadataAddress,
BackchannelCertificateValidator = null,
Wtrealm = organizationModel.ADFS_Realm,
Wreply = serveraddress + " /Account/" + Guid.NewGuid().ToString(),
};
configuration.UseWsFederationAuthentication(provider);
});
The code above executes without errors, but the provider is not added to the Owin context. Calling...
HttpContext.GetOwinContext().Authentication.GetAuthenticationTypes()
does not include the new option... :(
Just to clarify, I can do the same thing in my Startup.Auth.cs, but again, I don't want to restart the host...
Any ideas?

Related Links

Simple Membership Provider Relationships
Collection is not selected with NHibernate-Caching
index and count must refer to a location within the buffer. parameter name bytes
WCF pub-sub model, Invoking Subscribers all at once
Screen focus and who's on top
Data not showing when retrieved from database
Call Sharepoint Web Service over SSL with Silverlight
Consuming multiple APIs and WebServices using the onion architecture
Get Foreign keys in the table
What is “Structural Typing for Interfaces” in TypeScript
Excel sheet not closing [duplicate]
Deadlock using linq to sql select
Error:Cannot implicitly convert type 'System.Collections.Generic.LinkedListNode<Edge<T>>' to 'Edge<T>'
Client Socket in ISpy C# Plugin Connecting to Java Server Socket
… hides inherited member … Use the new keyword
Using JavaScript in visual studio c# windows form

Categories

HOME
oauth-2.0
domain-driven-design
mifare
data-modeling
lithium
thermal-printer
docker-compose
rethinkdb
ionic-native
obd-ii
facebook-sharer
tmux
repeater
responsive
nsoperation
ringcentral
loader
conditional-formatting
android-navigation-drawer
pumping-lemma
poisson
nsopenpanel
resx
boosting
spock
units-of-measurement
visual-studio-debugging
ports
repeat
console.readline
dotnetnuke-module
mapquest
latency
ng-lightning
jquery-ui-slider
compiler-warnings
text-extraction
cakephp-3.2
inner-join
taleo
logan-square
angular-fullstack
riemann
dynatable
msiexec
mac-app-store
class-design
csc
camellia
apache2-module
kramdown
commercetools
persian
musicbrainz
first-order-logic
eula
android-networking
numerical-recipes
jsonmodel
information-hiding
telerik-appbuilder
django-tests
reactjs-native
yandex-api
enquire.js
pidgin
pthreads-win32
grunt-wiredep
surfaceview
fade
ie-developer-tools
cab
ironworker
windows-scheduler
reference-manual
urlfetch
gpl
correctness
django-1.4
datasheet
pinchzoom
umfpack
vectorwise
overlays
nbehave
noise-reduction
cinder
subdirectories
nstoolbar
linq-to-mysql
datadude
manuals
cons

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App