Re: Access Network Share from inside an application.
From: Johnny Fugazzi (removethis-abillmeier_at_ldmkusa.com)
Date: 01/19/05
- Next message: Just Me: "Context menu needs to be popped from many controls"
- Previous message: Jay B. Harlow [MVP - Outlook]: "Re: Using Dispose for auditing?"
- In reply to: Ken Tucker [MVP]: "Re: Access Network Share from inside an application."
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 19 Jan 2005 12:31:09 -0600
Thanks for the reply.
I am currently using that code to Impersonate a user that has FULL
permissions on the share, and full permissions on the Files and Folders held
within that share.
After Impersonation (and before undoing the impersonation) I am able to
connect to the subdirectory on the share and verify that folder is visible.
I am also able to write out the contents of the subfolder as a test. The
next step is to open an excel file and read out some values. At this point
it fails saying that the File Cannot be found. I know the file path is
valid. Are there other issues here that I am not aware of?
The code module that creates an Excel.Application object and opens the file
is not instantiated and called until after the Impersonation is successful.
But it still appears like it is trying to open the file using the actual
user's security context, and not the impersonated one.
Any help would be appreaciated.
"Ken Tucker [MVP]" <vb2ae@bellsouth.net> wrote in message
news:%23McAVAL$EHA.3908@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> http://www.dotnet247.com/247reference/msgs/28/144136.aspx
>
> Ken
> ---------------------
> "Johnny Fugazzi" <removethis-abillmeier@ldmkusa.com> wrote in message
> news:uhcu$NK$EHA.3596@TK2MSFTNGP12.phx.gbl...
> I would like to access a network share from my vb.net application. I do
> not
> want to map a drive to the share, however. I would also like to specifiy
> a
> user credential to use when connecting to the share, as the user running
> the
> application will not have security rights to hit the share themselves.
>
> Any pointers on this?
>
>
>
>
- Next message: Just Me: "Context menu needs to be popped from many controls"
- Previous message: Jay B. Harlow [MVP - Outlook]: "Re: Using Dispose for auditing?"
- In reply to: Ken Tucker [MVP]: "Re: Access Network Share from inside an application."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|