Connecting Tech Pros Worldwide Help | Site Map

vb.net webclient upload file and IIS configuration on XP

  #1  
Old July 15th, 2008, 12:25 AM
Mitch
Guest
 
Posts: 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.


  #2  
Old July 15th, 2008, 03:05 PM
Reverend Fuzzy
Guest
 
Posts: n/a

re: vb.net webclient upload file and IIS configuration on XP


Not here.
dot net? we don't plat that. :)

"Mitch" <mhmooney@no.bother.to.spamwrote in message
news:D0Rek.233$gH4.139@trnddc05...
Quote:
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.
>

  #3  
Old July 16th, 2008, 02:25 PM
Jason Keats
Guest
 
Posts: n/a

re: vb.net webclient upload file and IIS configuration on XP


Mitch wrote:
Quote:
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.
Closed Thread