Browse Source

Tried to fix auth. Still not working.

tags/2.0.3
Teknikode 4 years ago
parent
commit
a363a4445d
2 changed files with 5 additions and 3 deletions
  1. 2
    2
      Teknik/Areas/Profile/Controllers/ProfileController.cs
  2. 3
    1
      Teknik/Web.config

+ 2
- 2
Teknik/Areas/Profile/Controllers/ProfileController.cs View File

@@ -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))
{

+ 3
- 1
Teknik/Web.config View File

@@ -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