asp.net forms authentication across applications - asp.net

I have a solution with an existing web forms website project (NOT web application project). I want to add a new mvc web application to the solution and have web forms site and mvc web app share forms authentication. I followed the article from microsoft but on localhost this does not work. In the solution, if I start both the webforms and mvc sites they have different port numbers for localhost so I authenticate in the webforms web site but the authentication cookie does not get picked up. Is there something obvious I am missing?
Forms Authentication Across Applications

Related

Is there Sustainsys.Saml2 example for ASP.NET Web Forms

I try to SAML with Sustainsys.Saml2. I downloaded and run examples from their Github page. But all examples for ASP.NET MVC.
I develop my site with ASP.Net Web Forms. My site is service provider for SAML. I changed my web config as in the example but I can't redirect my login page to identity provider's login page.
The HttpModule sample is set up in the same way as a Web Forms app should be set up.

Web Forms and Core Authentication

I have a .NET Web Forms website running in IIS (using forms authentication).
I've added a .NET Core 2.2 website as a sub application of the Web Forms site.
Is it possible to share authentication from the Web Forms site to the Core site?
I came across this: https://github.com/dazinator/AspNetCore.LegacyAuthCookieCompat
and was able to check for the forms auth cookie from the parent site when a requests hits the core sub application.
Then I could decrypt the forms auth cookie, to get the user info, and authenticate the user on the core site.
Not sure if this is ideal, because you know have to manage 2 cookies, but it seems to work.

IIS URL Rerouting MVC 404 Error - Hangfire

I'm trying to add an MVC site under a domain where there is an existing site. The new site is just a simple mvc site to show a hangfire dashboard. I'm using IIS 8.5.
The current site is an old ASP.NET Web Forms site and will not allow the routing to the new MVC application and I get a 404.
The old site needs to be accessible at https://example.com and I need to be able to access the Hangfire site at https://example.com/Reporting/hangfire.
I have the MVC application configured and it works when the physical path of the Web Forms site is not pointing to the root folder (example.com).
I am new to the routing configuration in IIS so I am not sure if there is a URL Rewrite rule that would be useful for this or if need to do something else.
Edit
This is the root site, its a web forms site deployed by someone else. I added the MVC site as an web application and it uses a different app pool. I get a 404 in this case because the web forms app is handling the routing and its never getting to the MVC app.
I was able to get this working by deploying the site under a sub-domain; I had to convince our admin to allow this. The MVC site worked on its own but never when nested under the Web Forms site.

Is it possible share authentication between Asp.NET web applications and silverlight business application

Is it possible share authentication between Asp.NET web applications and silverlight business application?
Scenario:
When uses logged in on either SL application or Asp.NET application using same browser, I want them to used active authentication. I have seen OpenId authentication can do such, But wondering can asp.net authentication is also able to do such.
Yes the authentication infrastructure can be shared between ASP.Net and SilverLight. If both the sites are under one domain, we can implement the standard authentication using ASP.Net Membership and role provider.
You can then use the WCF Authentication Service to and authorize user. This authentication is is good only for any server side functionality. If you want to authorize on client side (SilverLight) application you need to build your own infrastructure. Role and Membership provider data available can help you in that.
You can host your SL application in ASP.NET page and when somebody comes on this page do authentication. For instance, you can use FormAuthentication on the site, so when you are navigating from some page to page with Silverlight - access will be hovered by very FormAuthentication. OpenId you can use if ASP.NET app and Silverlight on different sites (domains), but if the Silverlight app is hosted on asp.net page you can also authenticate using asp.net infrastructure on server side.

asp.net mvc and webforms shared authentication

I have few websites based on the WebForms and one based on MVC. All websites have the same settings for forms authentication in web config.
The problem is that once logged in to WebForms website, I have to re-login for MVC websites, but when I log out from MVC website, I am automatically logged out from WebForms websites.
How can I pass information to the MVC website that user was successfully logged in when using WebForms.
Try this article. Essentially, you want single sign on. That is the term to google for.
http://www.codeproject.com/KB/aspnet/SingleSignon.aspx

Resources