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

Problem with WebClient Upload to Remote IIS Server with FP2002 extensions

Can anyone help?

I am writing an application to upload a data file to a remote website
running IIS and FP2002 extensions. If I use "My Network Places" in windows
XP, I can do this with "Explorer".
I assume you use WebClient to upload files to a website, but I haven't got
it to work yet.

When I try the following code....

WebClient myWeb = new WebClient();
myWeb.Credentials = new NetworkCredential("username","password");
myWeb.UploadFile("http://mywebsite/x.htm","PUT","C:\\t.htm");

... I get the following error(WebEx:The remote server returned an error:
(403) Forbidden.)

If I change "PUT" to "POST" I get (WebEx:The remote server returned an
error: (404) Not Found.)

What am I doing wrong?

TonyR
Nov 21 '05 #1
0 2138

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

Similar topics

1
by: jmhmaine | last post by:
I've used the WebClient class on a few projects but I wanted to know if anyone could point to the good resource for Best Practices with this object. The two things I haven't seen in sample code...
1
by: JoshP | last post by:
Hi All, I am attemting to setup an file upload page in asp.net C# 2005 .net 2.0. I am receiving an "The remote server returned an error: (401) Unauthorized." error when uploading. Here is my...
1
by: pmz | last post by:
Dear Group, I'm currently developing a simple Windows application in C#, which is supposed to upload images - through 'WebClient' - into remote (FreeBSD/Apache/PHP) server. What is...
1
by: Phillip N Rounds | last post by:
I'm having problems using the WebClient.UploadFile() command. I have MySender.ASPX which is supposed to upload two files to the server. There is also ConsumeFileUpload.aspx which is intended to...
2
by: Amos Soma | last post by:
I am using WebClient to upload a file to a remote server. The call I'm making looks as follows: webClient.UploadFile("http://sdtpcal.someserver.com/Federation/Databases/Federation.Zip",...
5
by: Svinja | last post by:
Hi, i am using WebClient.UploadFile to upload a file on my web page, code: WebClient webClient = new WebClient(); webClient.Credentials = new NetworkCredential(userName, pass);...
2
by: Mitch | last post by:
Not sure where to post this but simply I want to upload a file using the WebClient, ie: Try Dim wc As New WebClient wc.Credentials = New System.Net.NetworkCredential("someuser", "somepass")...
0
by: y2ktan | last post by:
Hi All, I try to use WebClient.UploadData to upload a photo with the size less than 1MB to my local IIS. I setup my IIS by adding a new virtual directory with the write access to the photo...
5
by: benmess | last post by:
This code snippet works fine on a localhost because the file you upload resides on the host machine (where FileServer.aspx is a new page invoked from the UploadFile call) function...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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...

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.