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

How can i find the Light component by tag?
Outlook Add-in Unable to get inbox items
unable to write data to the transport connection an existing connection was forcibly closed
Macron in c# console application
ASP.NET api route not matching root url
Dynamically create a button in ASP C# [duplicate]
Test Fails when trying to clear field
Localization fails in Visual Studio
C# XMLSerializer is deserializing the wrong type into a List
No notification triggered on Bot FB Messenger mobile device
How to get delegate MethodInfo and Target via reflection?
C# How to use class to execute Window's Form order sequence
Why I can not refer an object in Unity?
Webcam turns off after setting capture resolution
UWP TextBox puts \r only - how to set LineBreak
Efficient search based on if a datetime value falls in a range

Categories

HOME
oauth-2.0
grpc
window.open
azure-resource-manager
sms
pyodbc
email-attachments
watson-dialog
cakephp-2.0
opengrok
google-closure-compiler
ofbiz
geography
hapijs
aws-devicefarm
xforms
single-page-application
webgl-earth
formulas
coccinelle
typedef
aws-iot
folder
edsdk
tikz
fastadapter
wunderground
strategy-pattern
realloc
file-descriptor
definition
vpython
pexpect
result
reqif
qtwebkit
togglebutton
extjs3
visio-2010
riemann
intermediate-language
scanf
directinput
easy-thumbnails
foreground
jira-agile
sprockets
custom-build-step
firefox-os
videoview
kramdown
producer-consumer
android-togglebutton
system.diagnostics
radgrid
wingdb
service-broker
dockerpy
mathics
iphone-6
unityvs
dateadd
image-preloader
mahara
static-class
latex-suite
simplemembership
ftpwebrequest
zepto
nsregularexpression
android-memory
ios6-maps
github-archive
django-admin-tools
wxperl
wdm
nbehave
rollover
chars
iphone-maps
versions
carbon-emacs
lts
content-delivery-network

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