473,394 Members | 1,878 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,394 software developers and data experts.

shortest path to write to a network drive?

In .NET 2.0 hosted on Server 2003, I'm attempting to use File.Copy(src,dst)
to write to a shared folder on a network drive. The folder is used by every
user who has a log on id and has 'Full Control' permissions granted to
'Everyone'. Still, I am not able to write to the folder from my code-behind
code. I get "unknown user name or bad password".

I've found and tried a number of Impersonation and Delegation articles, but
I only get a headache from them. For a wide open public directory like this,
there's got to be a shorter/simpler path (I'm hoping).

I know we have the IIS Application Pool Identity set to IWAM_machine instead
of "Network Service", but I don't recall the rationale for changing it over a
year ago (except that it fixed something, and that we've created more
dependencies on IWAM_machine since then).

Have tried both UNC's "\\machine2\publicdir\des.txt" and mapped drives
"Y:\temp\dest.txt". The latter returns "Could not find part of the path",
which makes sense, I did not expect mapped drives to show up for the IIS
process.

Any help greatly appreciated.

Mike
Jun 6 '07 #1
1 1481
make the app pool identity a domain account with access to the share. be
sure impersonation is off.

-- bruce (sqlwork.com)

Mike wrote:
In .NET 2.0 hosted on Server 2003, I'm attempting to use File.Copy(src,dst)
to write to a shared folder on a network drive. The folder is used by every
user who has a log on id and has 'Full Control' permissions granted to
'Everyone'. Still, I am not able to write to the folder from my code-behind
code. I get "unknown user name or bad password".

I've found and tried a number of Impersonation and Delegation articles, but
I only get a headache from them. For a wide open public directory like this,
there's got to be a shorter/simpler path (I'm hoping).

I know we have the IIS Application Pool Identity set to IWAM_machine instead
of "Network Service", but I don't recall the rationale for changing it over a
year ago (except that it fixed something, and that we've created more
dependencies on IWAM_machine since then).

Have tried both UNC's "\\machine2\publicdir\des.txt" and mapped drives
"Y:\temp\dest.txt". The latter returns "Could not find part of the path",
which makes sense, I did not expect mapped drives to show up for the IIS
process.

Any help greatly appreciated.

Mike
Jun 6 '07 #2

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

Similar topics

7
by: Eric.Jones | last post by:
I've encountered a strange error with loading delimited files from a Samba (SMB) network drive, has anyone else seen this before? (Platform: WinXP Pro, UDB PE 8015, level 02060106, SAMPLE db) ...
2
by: Tom Wells | last post by:
I have a little file upload page that I have been able to use to successfully upload files to the C: drive of LocalHost (my machine). I need to be able to upload to a network drive from the intranet...
14
by: Gianfranco | last post by:
Hi everybody, First of all, sorry for my english if it isn't perfect ;-p I have an error in an asp.net application. I have win2003 server, with iis 6. I'm developping with visual studio...
10
by: mukeshhtrivedi | last post by:
Hi, I have some MDB (MS Access 2000) files on our server. It is small application created by one of our employee long time ago. I see this application is on Network Drive G: and H: (both drive has...
1
by: Arthur | last post by:
Hi All, I know there have been previous posts with this topic but the issue for most seems to be the security permissions on the shared drive. My scenario is as follows : I have IIS on local...
4
by: rony_16 | last post by:
Hi , I am writing a program that part of than program if to add a new network drive to the user. The adding part i know how to do (by win api "WNetAddConnection2A") but i want to check first if...
2
by: Bytter | last post by:
Hi everyone, I need to implement a very quick (performance-wise) Dijkstra shortest path in python, and found that libboost already has such thing. Problem is: I cannot find the installation...
4
by: DMG | last post by:
I have <identity impersonate = "true" /& <authentication mode="Windows"/in the web.config. This is a 2.0 site. My Goal: I want to simply have the user browse to a file on a mapped drive and get...
1
by: Billy | last post by:
Hi All, I'm attempting to use the MapNetworkDrive <snippedbelow from entire code below with very poor performance results. Basically, I have very small 73kb text files that are rewritten daily...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
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,...
0
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...
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...

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.