write a file out to a network drive via ASP.Net | Bytes (2024)

Home Posts Topics Members FAQ

michael.esposito

When I try to write a file out to a network drive via ASP.Net, I get
the following error when I deploy the application to the test server. I
have no problems at all when I run it on my machine. Any help?

I have my impersonation set to true and I turned off the IIS password
control in the virtual directory.

Michael
Could not find a part of the path
"\\network-drive\folder".---------------------------Stack Trace:
at System.IO.__Err or.WinIOError(I nt32 errorCode, String str) at
System.IO.Direc tory.InternalCr eateDirectory(S tring fullPath, String
path)
at System.IO.Direc tory.CreateDire ctory(String path) at
AuditorFileForm at.UC_AuditorFo rmat.ParseAudit orFile(String filename,
String TargetDir) in
C:\Inetpub\wwwr oot\AuditorFile Format\Controls \UC_AuditorForm at.ascx.vb:line
75

Nov 19 '05 #1

Subscribe Reply

1 write a file out to a network drive via ASP.Net | Bytes (1) 1442 write a file out to a network drive via ASP.Net | Bytes (2)

Curt_C [MVP]

What user is the site running under? Do you have Anonymous or Integrated Auth
running? Sounds like the user doesn't have access to the share

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"mi************ **@gmail.com" wrote:

When I try to write a file out to a network drive via ASP.Net, I get
the following error when I deploy the application to the test server. I
have no problems at all when I run it on my machine. Any help?

I have my impersonation set to true and I turned off the IIS password
control in the virtual directory.

Michael
Could not find a part of the path
"\\network-drive\folder".---------------------------Stack Trace:
at System.IO.__Err or.WinIOError(I nt32 errorCode, String str) at
System.IO.Direc tory.InternalCr eateDirectory(S tring fullPath, String
path)
at System.IO.Direc tory.CreateDire ctory(String path) at
AuditorFileForm at.UC_AuditorFo rmat.ParseAudit orFile(String filename,
String TargetDir) in
C:\Inetpub\wwwr oot\AuditorFile Format\Controls \UC_AuditorForm at.ascx.vb:line
75


Nov 19 '05 #2

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

Similar topics

7 3017

bug in file.write() ?

by: Patrick Useldinger |last post by:

Hi, I think I found a bug in the write method of file objects. It seems as if before writing each block, a check was done in order to verifiy that there is enough space left for the *whole* file, not for the *remaining* data to be written. It happens both under 2.3 and 2.2.3. Any ideas?

Python

2 3592

when i use stream writer to write to a shared folder, and the network card of that remote computer is disabled

by: Daniel |last post by:

when i use stream writer to write to a shared folder, and the network card of that remote computer is disabled in the middle of the write then reenabled later. every time i try to write to that same path on the network drive it says "The process cannot access the file "\\foo\bar.txt" because it is being used by another process. its not until i...

.NET Framework

3 8575

how to write a file to UNC folder

by: DotNetUser |last post by:

I know the Domain, UserName, Password and folder on the domain:\\inpsol301\home$\abc Supposed I can use UserName, Password and Window Explore to map the folder above to X: and then write a file to it. Question: How can I do it programmatically without mapping the drive? full source code is most welcome!

C# / C Sharp

2 9365

System.IO.File.Exists behaves differently when run from a mapped drive

by: Zeno Lee |last post by:

I'm using File.Exists to test a file on my C: drive. My program was strongly named and had caspol -af run on it to allow it to run from the network. There are 3 ways I am doing this: 1) Run from my C: drive, File.Exists works properly and says C:\Temp\test.txt exists 2) Run from my H:\ (network) drive, File.Exists says the file doesn't...

C# / C Sharp

8 9707

VB.Net file access problem with UNC

by: Sarah |last post by:

I need to access some data on a server. I can access it directly using UNC (i.e. \\ComputerName\ShareName\Path\FileName) or using a mapped network drive resource (S:\Path\FileName). Here is my problem: my vb.net program has problems with UNC. If the UNC server is restarted or goes off-line, my VB.net program crashes. The code for UNC...

Visual Basic .NET

2 2663

exception while copying a file to a network drive

by: .Net Believer |last post by:

I using the routine below to copy file to a network drive for a regular backup process. Before calling this routine I using another function to check the presence of the LAN connection and the server where the network drive exists. Although of this check I am sometimes getting an exception (in 5% of times)saying "Could not find the...

Visual Basic .NET

1 3565

May Cluster Execute BAT file to Start/Stop Java Program

by: =?Utf-8?B?S2Vubnk=?= |last post by:

I have one bat file that contains a command to startup Java Program. Then, I would like to create a cluster job to call the bat file. In case of one computer is down, another computer can also call the bat file and startup my Java Program. For this purpose, I have tried to place the bat file into share drive of two computers which are...

.NET Framework

1 1490

shortest path to write to a network drive?

by: =?Utf-8?B?TWlrZQ==?= |last post by:

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...

ASP.NET

3 2682

Writing flat file to network is slow

by: Barry Flynn |last post by:

Hi I am working with a VB 2005 program which has been converted from VB6. It writes data out to a flat file, with code like the following line WriteLine(riFileNo, "Hist", lsAssetID, lsRecordType, lsXNbr, lsFiscYr, "Beg", CStr(H.BegBalAccDepn), CStr(H.BegBalCost), CStr(H.BegBalCostReval), CStr(H.BegBalDepCost), CStr(H.BegBalDepnReval)) ...

.NET Framework

7499

What is ONU?

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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...

General

7689

Problem With Comparison Operator <=> in G++

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. ...

C / C++

7943

Maximizing Business Potential: The Nexus of Website Design and Digital Marketing

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...

Online Marketing

7786

Discussion: How does Zigbee compare with other wireless protocols in smart home applications?

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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...

General

6022

AI Job Threat for Devs

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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...

Career Advice

5076

Couldn’t get equations in html when convert word .docx file to html file in C#.

by: conductexam |last post by:

I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...

C# / C Sharp

3490

Trying to create a lan-to-lan vpn between two differents networks

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...

Networking - Hardware / Configuration

1 1919

transfer the data from one system to another through ip address

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

C# / C Sharp

1 1044

How to add payments to a PHP MySQL app.

by: muto222 |last post by:

How can i add a mobile payment intergratation into php mysql website.

PHP

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

To disable or enable advertisem*nts and analytics tracking please visit the page.

write a file out to a network drive via ASP.Net | Bytes (2024)
Top Articles
Latest Posts
Article information

Author: Gregorio Kreiger

Last Updated:

Views: 5699

Rating: 4.7 / 5 (77 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Gregorio Kreiger

Birthday: 1994-12-18

Address: 89212 Tracey Ramp, Sunside, MT 08453-0951

Phone: +9014805370218

Job: Customer Designer

Hobby: Mountain biking, Orienteering, Hiking, Sewing, Backpacking, Mushroom hunting, Backpacking

Introduction: My name is Gregorio Kreiger, I am a tender, brainy, enthusiastic, combative, agreeable, gentle, gentle person who loves writing and wants to share my knowledge and understanding with you.