Wrox Programmer Forums
|
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 23rd, 2008, 09:07 AM
Registered User
 
Join Date: Jul 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with impersonation..

 Hi All,


 I have some question which is related to my scenario, web application is running on windows 2003 server (Server 1) which is a domain controller.

 i have created domain users with the administrator level permission.

 in the IIS only integrated windows authentication is enabled. and in web.config

 <identity impersonate="false" />


 and i am impersonating the user in the below code:

 Public Sub Impersonation()

 Dim identity As String = System.Security.Principal.WindowsIdentity.GetCurre nt().Name
        Dim slash As Integer = identity.IndexOf("\")
        If slash > 0 Then
            Dim domain As String = identity.Substring(0, slash)
            Dim user As String = identity.Substring(slash + 1)
            identity = user + "@" + domain
        End If

        Dim wi As New WindowsIdentity(identity)
        Dim wic As WindowsImpersonationContext = Nothing

        Try
            wic = wi.Impersonate()

        // for Access the files code goes here

        Catch
            ' Prevent exceptions from propagating
        Finally
            ' Revert impersonation
            If wic IsNot Nothing Then
                wic.Undo()
            End If
        End Try

  End Sub


 now i have another server running windows 2003 (Server 2) where i have added the domain user as a part of administrator group.
 now i am running the application by using domain user.

 My question is :

 1) what other configuration i have to do to access the files from server 2 thorugh application.

 2) in this scenario do i need to use 'Kerberos authentication and delegation'.


 Thanks in advance

 -joseph






Similar Threads
Thread Thread Starter Forum Replies Last Post
impersonation through web.config and runtime xile ASP.NET 1.0 and 1.1 Professional 0 November 20th, 2008 12:09 PM
impersonation for asp app xile Classic ASP Basics 1 November 11th, 2008 08:56 AM
Impersonation mike_remember ASP.NET 1.0 and 1.1 Professional 1 March 5th, 2007 09:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.