authentication - Auto logging in to another ASP.NET Application from main Web Application -
I'm running the latest version of molecule foam in a folder below my main WebApic subfolder in an application in IIS As is configured and navigated into the folder and logging in the work is fantastic YAF is setup with a subscription provider and uses the form authentication.
What I'm trying to do now is that the user is automatically logging in to a forum from the main user, using custom authentication through the main website sessions and cookies, any ASP Net authentication or subscription components are not manufactured.
So what I want to do basically is that when a user clicks the link to access the forum, they are sent to the processing page which certifies him in the YAF application. Before it sends the subfolder.
Although the main app does not use the built-in authentication piece, I can still make the authentication mode for the form and make sure that it is on the WiFi web web. After that, I'm calling FormsAuthentication.SetAuthCookie (username, true) on the processing page, then redirected. But YAf kicks me back on the login page.
The main site is: example.com /
web.config:
& lt; Authentication mode = "form" & gt; & Lt; Form name = ".YAFNET_Authentication" protection = "all" timeout = "43200" cookies = "used cookies" /> & Lt; / Authentication & gt;
YAF: example.com/yaf (separate web application in IIS)
web.config
& lt; Authentication mode = "form" & gt; & Lt; Form name = ".YAFNET_Authentication" protection = "all" timeout = "43200" cookies = "used cookies" /> & Lt; / Authentication & gt;
is the processing page: (in proxy) example.com/autoLogin.aspx.cs
Public Zero AutLogin () {string userName = doStuffToGetUsername () ; YAFStuff.CreateUserIfNeeeded (user name); FormAuthentication.SetAuthCookie (username, true); Response.Redirect ("/ YAF /"); }
I was searching Google for 2 days to solve it, but end up I stumbled on the solution I need a machine which matches both the web.config files for the encryption process.
Sweet!
Comments
Post a Comment