473,412 Members | 2,072 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,412 software developers and data experts.

HttpPostedFile.SaveAs() permission error

I am using the HttpPostedFile to allow users to upload files to a
server farm. The SaveAs() saves to a shared network path
(\\SERVER\SHARE) so that no matter which web server is taking the
request, all uploaded files go to the same location. The .SaveAs()
call throws the error "unknown user name or bad password".

The file share referenced has Full Permission granted to the Everyone
group on the network. I cannot figure out why the save is causing a
problem. Is there some way to provide the SaveAs() method with login
credentials?

Thanks
Nov 17 '05 #1
1 3393
Your ASP.Net apps are running on accounts that belong to the local machines
on which your apps are running. I believe they need to run under either
"system" (in which they will have the same rights as the system on that
machine) or as a Domain user account.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"Jeff" <je**********@benefitstreet.com> wrote in message
news:65*************************@posting.google.co m...
I am using the HttpPostedFile to allow users to upload files to a
server farm. The SaveAs() saves to a shared network path
(\\SERVER\SHARE) so that no matter which web server is taking the
request, all uploaded files go to the same location. The .SaveAs()
call throws the error "unknown user name or bad password".

The file share referenced has Full Permission granted to the Everyone
group on the network. I cannot figure out why the save is causing a
problem. Is there some way to provide the SaveAs() method with login
credentials?

Thanks

Nov 17 '05 #2

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

Similar topics

4
by: | last post by:
Hi! It seems the HttpPostedFile object can't save a file to a destination withing the web's structure. I want to upload pictures from a page and store them in a subfolder to the web folder...
3
by: huan | last post by:
Hi, I am creating a function using C# to send emails with attachment file. And I am using File Field control to get file for attachment. Sending email works fine on development machine, however...
1
by: terrorix | last post by:
I want to save uploaded file to disk. I have this construction: HttpPostedFile myFile = ((HttpRequest)Request).Files; if (myFile != null) { string fn =...
8
by: Al Smith | last post by:
Hi, I am able to use the HttpPostedFile.SaveAs() method to upload and save a file to the local web machine. However, I would really like to save the file to a VirtualDirectory. Does anyone...
5
by: MSDN | last post by:
Does anyone know why I am getting Invalid cast exception??? For Each oFile As System.web.HttpPostedFile In Request.Files ....... etc..... Next I Checked that
2
by: binujose | last post by:
I am trying to access a folder which resides outside the application.My application hosted in a medium trust level server. I am getting error in the below line of code. ...
1
by: Ralph Watermann | last post by:
Hi, we upload an Excel-file via a FileUpload-Control into an HttpPostedFile object. Now we want to access the contained data directly without saving it to a temp file. Is this possible? So...
1
by: byrdman | last post by:
When I upload a image file to a folder on a my server in Fire Fox i get a request for username and password dialog box. If I cancel the dialog box for Fire Fox I get a permission denied error. The...
4
by: macap.usenet | last post by:
Hello, I´ve a strange problem with my HttpPostedFile object. I coded a File Upload where the user can upload a zip file. My code looks like this: HttpFileCollection files =...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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,...
0
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...

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.