|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
RE: Impersonate FileOpenDialog/ FolderBrowserDialogShow quoteHide quote "jdke***@gmail.com" wrote: > Hi > > When attempting to impersonate code, it appears that any dialogs that > open run as the logged in user, not the user that I'm trying to > impersonate. Other code, such as file.exists runs as the impersonated > user. > > for example: > > Using imp As New Impersonator(tb_UserName.Text, "domain", > tb_Password.Text) > Dim f As New FolderBrowserDialog() > Dim d As DialogResult = f.ShowDialog() > End Using > > The folder browser allows me to navigate to folders my impersonated > user should not have access to, but my logged in user does have access > to. > > Any help would be appreciated. > Actually, I misspoke. Mine works correctly for OpenFileDialog (once I passed
in the correct parameter to LogonUser). But it doesnt work for FolderBrowserDialog. For the OpenFileDialog, make sure that your LogonUser call looks something like this: If LogonUser(userName, userDomain, userPassword, 2, 0, token) Then The code I originally had used 3 instead of 2, and in that case it worked on local drives but not on network drives. Show quoteHide quote "crimdog02" wrote: > I am experiencing the exact same problem. > > "jdke***@gmail.com" wrote: > > > Hi > > > > When attempting to impersonate code, it appears that any dialogs that > > open run as the logged in user, not the user that I'm trying to > > impersonate. Other code, such as file.exists runs as the impersonated > > user. > > > > for example: > > > > Using imp As New Impersonator(tb_UserName.Text, "domain", > > tb_Password.Text) > > Dim f As New FolderBrowserDialog() > > Dim d As DialogResult = f.ShowDialog() > > End Using > > > > The folder browser allows me to navigate to folders my impersonated > > user should not have access to, but my logged in user does have access > > to. > > > > Any help would be appreciated. > > I too am enocuntering this problem only FolderBrowseDialog, but not with
OpenFileDialog. Has anyone been able to browse the network with impersonation using FolderbrowseDialog? Lavie Show quoteHide quote "crimdog02" <crimdo***@discussions.microsoft.com> wrote in message news:F9BD47CD-EE0C-49D0-A709-09DBDE09E42E@microsoft.com... > Actually, I misspoke. Mine works correctly for OpenFileDialog (once I > passed > in the correct parameter to LogonUser). But it doesnt work for > FolderBrowserDialog. > > For the OpenFileDialog, make sure that your LogonUser call looks something > like this: > If LogonUser(userName, userDomain, userPassword, 2, 0, token) Then > > The code I originally had used 3 instead of 2, and in that case it worked > on > local drives but not on network drives. > > "crimdog02" wrote: > >> I am experiencing the exact same problem. >> >> "jdke***@gmail.com" wrote: >> >> > Hi >> > >> > When attempting to impersonate code, it appears that any dialogs that >> > open run as the logged in user, not the user that I'm trying to >> > impersonate. Other code, such as file.exists runs as the impersonated >> > user. >> > >> > for example: >> > >> > Using imp As New Impersonator(tb_UserName.Text, "domain", >> > tb_Password.Text) >> > Dim f As New FolderBrowserDialog() >> > Dim d As DialogResult = f.ShowDialog() >> > End Using >> > >> > The folder browser allows me to navigate to folders my impersonated >> > user should not have access to, but my logged in user does have access >> > to. >> > >> > Any help would be appreciated. >> > BTW - I've checked this - and it works fine on W2K3 Server - it only seems
to be a problem in Vista. Show quoteHide quote "Meron LAVIE" <la***@net2vision.net.il> wrote in message news:%23Qy0YTm8JHA.1492@TK2MSFTNGP03.phx.gbl... >I too am enocuntering this problem only FolderBrowseDialog, but not with >OpenFileDialog. > > Has anyone been able to browse the network with impersonation using > FolderbrowseDialog? > > Lavie > > "crimdog02" <crimdo***@discussions.microsoft.com> wrote in message > news:F9BD47CD-EE0C-49D0-A709-09DBDE09E42E@microsoft.com... >> Actually, I misspoke. Mine works correctly for OpenFileDialog (once I >> passed >> in the correct parameter to LogonUser). But it doesnt work for >> FolderBrowserDialog. >> >> For the OpenFileDialog, make sure that your LogonUser call looks >> something >> like this: >> If LogonUser(userName, userDomain, userPassword, 2, 0, token) Then >> >> The code I originally had used 3 instead of 2, and in that case it worked >> on >> local drives but not on network drives. >> >> "crimdog02" wrote: >> >>> I am experiencing the exact same problem. >>> >>> "jdke***@gmail.com" wrote: >>> >>> > Hi >>> > >>> > When attempting to impersonate code, it appears that any dialogs that >>> > open run as the logged in user, not the user that I'm trying to >>> > impersonate. Other code, such as file.exists runs as the impersonated >>> > user. >>> > >>> > for example: >>> > >>> > Using imp As New Impersonator(tb_UserName.Text, "domain", >>> > tb_Password.Text) >>> > Dim f As New FolderBrowserDialog() >>> > Dim d As DialogResult = f.ShowDialog() >>> > End Using >>> > >>> > The folder browser allows me to navigate to folders my impersonated >>> > user should not have access to, but my logged in user does have access >>> > to. >>> > >>> > Any help would be appreciated. >>> > >
Using function with PChar data type
Visual Studio 2008 and Classes Inheriting From System.Web.UI.WebControls.Style Problem with embedded carriage returns trouble reading word documents Good tutorial for working with XML problem reading array data from structure how to know if to close sqlreader still problems reading word documents... Structure with List(Of) Exception !? Multiple File Select Not Working In Published ClickOnce Application |
|||||||||||||||||||||||