473,569 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Copying a file to a network share

Hello, my app needs to copy a file from local TEMP folder to network
share. The network share is accessible via a domain ID.
I am trying to call LogonUser API, then ImpersonateLogg edOnUser, then
copy the file to this share. But I keep on getting errors. Even though
all the APIs return success, copying files still comes back with "Access
denied" type of errors.

Am I missing something here?

Thanks
Nov 21 '05 #1
2 2175
Hi,

Maybe this will help.
http://www.dotnet247.com/247referenc...28/144136.aspx

Ken
------------------
"Frank Rizzo" <no**@none.co m> wrote in message
news:eG******** ******@tk2msftn gp13.phx.gbl...
Hello, my app needs to copy a file from local TEMP folder to network
share. The network share is accessible via a domain ID.
I am trying to call LogonUser API, then ImpersonateLogg edOnUser, then
copy the file to this share. But I keep on getting errors. Even though
all the APIs return success, copying files still comes back with "Access
denied" type of errors.

Am I missing something here?

Thanks
Nov 21 '05 #2
Ken Tucker [MVP] wrote:
Hi,

Maybe this will help.
http://www.dotnet247.com/247referenc...28/144136.aspx
My code looks similar, but I'll give this a try tomorrow.
Thank you.

Ken
------------------
"Frank Rizzo" <no**@none.co m> wrote in message
news:eG******** ******@tk2msftn gp13.phx.gbl...
Hello, my app needs to copy a file from local TEMP folder to network
share. The network share is accessible via a domain ID.
I am trying to call LogonUser API, then ImpersonateLogg edOnUser, then
copy the file to this share. But I keep on getting errors. Even though
all the APIs return success, copying files still comes back with "Access
denied" type of errors.

Am I missing something here?

Thanks

Nov 21 '05 #3

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

Similar topics

3
3626
by: Robert Tarantino | last post by:
Hello, I am trying to find a way to create a scheduled task or service that will copy my local profile folders under "Documents and settings" to a network drive. This would allow me to restore my settings if my profile became tampered with or corrupt. Is there any sample code available out there? -Robert
0
1570
by: surya | last post by:
Hi, I need to enable shadow copying network share folder assemblies. Currently if the path is given as the network share folder path, shadow copying is not enabled. Should something special be done to enable shadow copying of files on network share folders? Thanks in advance, Regards Surya
8
17025
by: Ram Baruch | last post by:
Hi, I'm trying to use the File.Copy() function. It works well when the desenation file is local (Like: C:\dest\dest.exe). The problem is that when I'm trying to copy to a destenation that starts with '\\' it doesnt work and exception is thrown (for example: \\MyComputer\DestDirectory). Even if the first and the second directories are actually...
7
43087
by: Frank Rizzo | last post by:
Hello, I've asked this question in the languages.vb group, but got no response, so I'll try my luck here. My app needs to copy a file from a local folder to a network share. The network share is accessible via a domain ID, which has all possible folder rights assigned to it. The domain ID also has full rights to the local folder. I am...
8
11834
by: Lam | last post by:
HI anyone knows how can I open a mapped network file in C#? I try string file = @"T:\file.txt"; it shows me the error: "Could not find a part of the path" but if I copy the file to my C dirve, and use @"C:\file.txt"; it worked Thanks a lot
0
1330
by: Frank Rizzo | last post by:
Hello, my app needs to copy a file on a network share. The network share is accessible via a domain ID, which has all possible folder rights assigned to it. I am using the impersonation code from here ...
4
3124
by: Sue | last post by:
Hello We have an application where the user would upload files (max size of 200 mb) from their client machine. This application will run on a web server (its a web server which would be used by the general public), because of obvious reason, this server will not have access to any shared directory on the network. Currently we store the...
0
1730
by: =?Utf-8?B?UGhpbCBKb2huc29u?= | last post by:
Hi, We have a legacy asp application that uses a third party component to upload a file and saves it to a secure network share. The code sets the credentials for the secure network share on the third party component. I want to do something similar from C# code and save a file to the secure network share by setting the credentials to...
0
2024
by: cw808 | last post by:
Hi all. I'm new here but hoping I can get some help for my problem. My situation is that I need to upload files through a C# .NET web application to a file server. I done a search and followed some advice on how to set it up. My environment is Windows 2003 file server, Windows 2000 web service (IIS) and .NET v1.1.4. So far I've done this....
0
7618
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7926
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7679
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3657
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2117
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
946
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.