473,396 Members | 1,935 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Access Network Share from inside an application.

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?

Nov 21 '05 #1
2 2051
Hi,

http://www.dotnet247.com/247referenc...28/144136.aspx

Ken
---------------------
"Johnny Fugazzi" <re*******************@ldmkusa.com> wrote in message
news:uh**************@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?


Nov 21 '05 #2
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]" <vb***@bellsouth.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi,

http://www.dotnet247.com/247referenc...28/144136.aspx

Ken
---------------------
"Johnny Fugazzi" <re*******************@ldmkusa.com> wrote in message
news:uh**************@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?

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Namratha Shah \(Nasha\) | last post by:
Hey Guys, Before we start with our sample app we need to view the security configuration files on the machine. You will find them under <drive>\WInNT\Microsoft.NET\FrameWork\<version>\Config ...
24
by: Bob Alston | last post by:
Most of my Access database implementations have been fairly small in terms of data volume and number of concurrent users. So far I haven't had performance issues to worry about. <knock on wood> ...
9
by: Andrew Shitov | last post by:
I have to copy files from one network share folder to another (both are on different remote machines). Server running this asp.net appllication is not configurable (except web.config), while...
4
by: Scott Nicholson | last post by:
I've got a site set up that uses a network share as it's home directory. Simple stuff is working fine. When I try to put a database in there, though, I run into problems. I'm using: dim...
5
by: Josh Rolfe | last post by:
I have a page in classic asp that accces a network drive, The code is as follows: <% dim fso dim objFolder set fso=server.createObject("Scripting.FileSystemObject") set...
4
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
2
by: egoldthwait | last post by:
I need to convert a 17mb access 2000 db to Oracle and house it in a Citrix farm. The issue: we have never converted an Access Db to Oracle but can probably use Oracle's Workbench to assist with...
6
by: onnodb | last post by:
Hi all, While working on an Access UI to a MySQL database (which should be a reasonable, low-cost, flexible interface to the DB, better than web-based, much less costly than a full-fledged .NET...
1
by: cpajoe2001 | last post by:
I am having an issue and after searching around online for a day and half now and finding others with the same problem but yet no solution to my issue I am looking for help. What i have is ServerA...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.