What IIS settings are required to allow file upload? I keep getting 401 error

From: Horus Alkebulan (halkebulan_at_adelphia.net)
Date: 04/29/03


Date: Tue, 29 Apr 2003 09:16:37 -0400


How do I set directory and file permissions to allow file upload?

I have a web service that accepts a byte stream from a .NET windows client
and everytime the UploadFile method I get 401 Unauthorized error from IIS
5.1.

Running on development platform where all on XP Pro, no domain controller.

When I call this code from my windows forms client

--- snip ---
Dim uriString As String =
"http://localhost/IDSM_WebService/uploads/wireless1.doc"

' Create a new WebClient instance.
Dim myWebClient As New System.Net.WebClient()
Dim fileName As String = "c:\wireless1.doc"

' Upload the file to the Url using the HTTP 1.0 POST.
Dim responseArray As Byte() = myWebClient.UploadFile(uriString, "PUT",
fileName)

' Decode and display the response.
str = "Response Received.The contents of the file uploaded are: " &
System.Text.Encoding.ASCII.GetString(responseArray)

--- snip ---

I get this error. Any ideas?

   An unhandled exception of type 'System.Net.WebException' occurred in
system.dll
   Additional information: The remote server returned an error: (401)
Unauthorized.



Relevant Pages

  • Re: exporting to excel
    ... Dim MyCn As ADODB.Connection ... Dim SQLStr As String ... Set delRows = Union) ... Right now, if any of those 3 cells are missing from a row, it won't upload ...
    (microsoft.public.excel.programming)
  • Re: Is This Possible ... ? Yes - Upload images to an Access database
    ... It looks like your databases folder is outside the root of your web ... I created a database exactly as you said, the only change I made was to ... and underneath an 'upload' button and a 'view images' button. ... Dim con As New Data.OleDb.OleDbConnection ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Is This Possible ... ? Yes - Upload images to an Access database
    ... It looks like your databases folder is outside the root of your web ... I created a database exactly as you said, the only change I made was to ... and underneath an 'upload' button and a 'view images' button. ... Dim con As New Data.OleDb.OleDbConnection ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Is This Possible ... ? Yes - Upload images to an Access database
    ... I created a database exactly as you said, the only change I made was to ... upload it into the 'databases' folder, and not a folder called 'App_Data', ... and underneath an 'upload' button and a 'view images' button. ... Dim con As New Data.OleDb.OleDbConnection ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Listbox controls
    ... When the first time I upload the file into the database, ... 'Dim oConnection As New OleDbConnection ... Dim strFileUploadQuery As String = "INSERT INTO Attachments ...
    (microsoft.public.dotnet.languages.vb)