By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 915 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

vb.net webclient upload file and IIS configuration on XP

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.