Quantcast
Channel: Web Deployment Tool (MS Deploy)
Viewing all articles
Browse latest Browse all 663

Windows Authentication in Migrated Website

$
0
0

We have existing websites running IIS6 on Windows 2003 Servers. These websites are for our local intranet, and use Windows Authentication.

The website applications were built with Visual Studio, and require Windows Authentication so that each user is shown the items that relate to them.

Each application begins with this snippet of code in the Page_Load event:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
  If Not IsPostBack Then
    Dim usr_nm As String = "Guest"
    If HttpContext.Current.User.Identity.IsAuthenticated Then
      usr_nm = HttpContext.Current.User.Identity.Name.Split(New Char() {"\"c})(1)
    End If
    CommonTools.SqlReadConnection = WebConfigurationManager.ConnectionStrings("SQL_CONN_STR").ConnectionString
    Dim ut_data As String = String.Format(WebConfigurationManager.AppSettings("ut9513_au_list_prod"), usr_nm)
    label1.Text = String.Format("[Debug] Username :: {0}", usr_nm)
    Dim company_list As String
    Using client As New WebClient()
      Dim objUTF8 As New UTF8Encoding()
      company_list = objUTF8.GetString(client.DownloadData(ut_data)).Trim()
    End Using
  End If
End Sub

The Username always returns the default "Guest" keyword, so no records are ever displayed.

I can't figure out how to get Windows Authentication to work on these new sites.

The new machine we got is running Windows 2008 with IIS 7.5.

The website is configured with these Authentication Settings:

IIS Authentication

What could be causing this website to NOT authenticate?

I have given both the Active Directory ASPNET account and thelocal machine's IIS User account full control over the applications.

In the Application Pool, the Process Model'sIdentity is NetworkService.

Under Basic Settings, the Physical Path is set andConnect as uses Application User (pass-through authentication).

The Advanced Settings for the applications has Physical Path Credentials Logon Type set toNetwork.

I have been trying different combinations of settings over the last couple of weeks, but nothing seems to work on this new server.

Does anyone know what I could be doing wrong?

I am a Software Developer. The Network Administrator here works on the Apache servers, so he leaves the IIS website to me.


Viewing all articles
Browse latest Browse all 663


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>