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

Run program with arguments
Change combobox drop down list border color in C#
Calling Page Click event via User Control
CrossPagePostback : Previous Page's title not being shown in the second page
autoexpand window based on datagridview
How can I create Custom Action through Installshield which calls a WiX Custom Action taking a string parameter?
Compare two lists and get the different items only in Linq
Asp.net access DataList
Beginner: Autocomplete not working?
Read data from column and row after clicking gridview button
Validation rules stack overflow exception when return true
Unable to cast object of type 'SingleResult'
How to play 16-bit pcm array programmatically [closed]
Simplify test configuration by reading App.config from tests
For Sending Html Template in mail, iterate Only Second table in html
How to detect when an MDIClient window has been scrolled

Categories

HOME
javafx
redux
domain-driven-design
fortran
azure-eventhub
aix
intellisense
assign
download
css-selectors
angularjs-directive
atlassian-fisheye
autocad
meson-build
genexus
rtc
obd-ii
gcloud
drush
hdf5
opendaylight
responsive
css-float
ringcentral
hapijs
restructuredtext
vala
ithit-webdav-server
android-cursorloader
gulp-jshint
selenium3
schedule
foxpro
ibm-bpm
odp.net
respect-validation
stencyl
redhat-brms
jquery-inputmask
linkurious
office-interop
niagara-ax
e4
dynamic-linking
google-scholar
virtualenvwrapper
class-design
jira-agile
vitamio
3d-rendering
stdlist
video-embedding
oryx
matlab-engine
log-analysis
uiblureffect
fxmlloader
sync
api-eveonline
powerpoint-2010
behance-api
xps
slimscroll
kernel-density
windows-phone-store
db2-connect
facebook-likebox
code-complete
angularjs-select2
codeigniter-form-helper
bho
msbuild-task
libx264
yii-components
volatility
gssapi
wpml
certificate-revocation
nude.js
copyfile
discussion-board
mass-emails
jquery-attributes
opengl-to-opengles
software-update

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