I am using IIS 7.5, and .net 4.5 trying to use Windows login for an intranet site. Works fine on my dev machine, but when I push to the web server, the windows login is using a different username (websitename) instead of the logged in user (domain\me). Anyone have any ideas on where I should look?
Edit added code
The Web.config
<compilation debug="true" strict="false" explicit="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<authentication mode="Windows">
</authentication>
The page Imports
Imports Microsoft.Exchange.WebServices.Data
Imports System.Web.Security
Imports System.Web
Imports System.Web.UI
Imports System.Linq
Imports Microsoft.AspNet.Identity
Imports Microsoft.AspNet.Identity.EntityFramework
Imports Microsoft.AspNet.Identity.Owin
Imports Owin
Imports System.Data.SqlClient
The vb code
Dim DomainUser As String = HttpContext.Current.User.Identity.Name.Replace("\", "/")
Dim loginName As New LoginName
Dim sideName As New LoginName
loginName = HeadLoginView
hfEmail.Value = System.Security.Principal.WindowsIdentity.GetCurrent.Name.Split("\")(1) + My.Settings.EmailDomain