Browse Source

Tried to fix auth. Still not working.

master
Teknikode 6 years ago
parent
commit
a363a4445d
  1. 4
      Teknik/Areas/Profile/Controllers/ProfileController.cs
  2. 4
      Teknik/Web.config

4
Teknik/Areas/Profile/Controllers/ProfileController.cs

@ -139,8 +139,8 @@ namespace Teknik.Areas.Profile.Controllers @@ -139,8 +139,8 @@ namespace Teknik.Areas.Profile.Controllers
}
HttpCookie authcookie = FormsAuthentication.GetAuthCookie(model.Username, model.RememberMe);
authcookie.Name = ".TeknikAuth";
authcookie.Domain = "." + Config.Host;
Response.Cookies.Add(authcookie);
authcookie.Domain = Config.Host;
Response.AppendCookie(authcookie);
if (string.IsNullOrEmpty(model.ReturnUrl))
{

4
Teknik/Web.config

@ -18,7 +18,9 @@ @@ -18,7 +18,9 @@
</appSettings>
<system.web>
<customErrors mode="Off" />
<authentication mode="Forms" />
<authentication mode="Forms">
<forms domain=".teknik.io" loginUrl="~/Areas/Profile/Views/Profile/ViewLogin" path="*/*" timeout="2880" name=".TeknikAuth" />
</authentication>
<compilation debug="true" targetFramework="4.5.2" />
<httpRuntime targetFramework="4.5.2" maxRequestLength="1048576" />
<pages buffer="true" enableViewState="false" />

Loading…
Cancel
Save