473,507 Members | 2,504 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

vb.net webclient upload file and IIS configuration on XP

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")
wc.UploadFile("http://localhost/public/", "PUT", "c:\test.txt")
Catch ex As Exception
Console.WriteLine(ex.Message)
Console.ReadKey()
End Try

It always returns : The remote server returned an error: (403) Forbidden.

I have permissions set on public for read/write, I have web shared the
folder. Im guessing its how I have IIS setup. Using XP Pro sp3 and IIS.
Jul 14 '08 #1
2 6343
Not here.
dot net? we don't plat that. :)

"Mitch" <mh******@no.bother.to.spamwrote in message
news:D0Rek.233$gH4.139@trnddc05...
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")
wc.UploadFile("http://localhost/public/", "PUT", "c:\test.txt")
Catch ex As Exception
Console.WriteLine(ex.Message)
Console.ReadKey()
End Try

It always returns : The remote server returned an error: (403) Forbidden.

I have permissions set on public for read/write, I have web shared the
folder. Im guessing its how I have IIS setup. Using XP Pro sp3 and IIS.

Jul 15 '08 #2
Mitch wrote:
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")
wc.UploadFile("http://localhost/public/", "PUT", "c:\test.txt")
Catch ex As Exception
Console.WriteLine(ex.Message)
Console.ReadKey()
End Try

It always returns : The remote server returned an error: (403) Forbidden.

I have permissions set on public for read/write, I have web shared the
folder. Im guessing its how I have IIS setup. Using XP Pro sp3 and IIS.

Yes, I think it is an IIS problem. Try giving the ASPNET user modify
permissions on the folder.
Jul 16 '08 #3

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

Similar topics

0
1156
by: Shen | last post by:
Hi, I have a windows app that uses vb.net WebClient upload function to upload a file to the website for processing. My website uses ASP. I know how to parse a uploaded file from a webpage using...
2
1423
by: Brian | last post by:
Hi, I've been trying to find a way to upload file to another site that is not using IIS. The site that I want to upload file to has a simple php script to receive file uploaded through standard...
1
1781
by: paras | last post by:
I am using File Upload Control to upload file on server. If size of the file exceeds maxRequestLength property in httpRuntime section of my configuration file, then DNS error is thrown. how can i...
3
2411
by: Brian | last post by:
Hi, I've been trying to find a way to upload file to another site that is not using IIS. The site that I want to upload file to has a simple php script to receive file uploaded through standard...
1
5163
by: Pedro Carvalho | last post by:
I am using a WebClient.Upload File method on the Client side and, to accept posted files on the Server side, I am using an ASP.NET page with the following code: void Page_Load(object sender,...
0
1821
by: cherry | last post by:
Dear All, I have written a program in sharepoint, in which will call a Web Service of another Sharepoint portal server so that documents from sharepoint portal server A can push document to...
2
1284
by: aratimane | last post by:
I'm using php5.2.2 and not able to upload file from mobile J2ME . same code is running in php4.3.11 but not in php5.2.2 I'm uploading file by using $_FILES. while using print_r($_FILES) it...
3
4285
by: =?Utf-8?B?dmFzaW1v?= | last post by:
Have the following code: wkLocalPath = "C:\A\1.jpg" wkServerPath = "http://servername/dirname/1.jpg" wcClient.Credentials = New NetworkCredential("UID", "PW") wcClient.UploadFile(wkServerPath,...
0
1363
by: rajib123 | last post by:
I am trying to write a windows utility that downloads some files from an ftp site to a local directory and then uploads those files to another ftp site. The files that I need to download are posted...
0
7223
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
7372
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...
1
7030
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
7482
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...
1
5041
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...
0
4702
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...
0
3191
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...
0
1540
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 ...
0
411
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...

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.