Re: Cannot upload file - 501



On Jan 7, 9:54 am, Kevin <kev...@xxxxxxxxxxxxxxxxx> wrote:
Hi,

First, I'm fairly new to using/administrating IIS. So, speak slow and in a clear
voice ;-)

I'm writing a mobile application (currently testing on a PC) where I need to
send a potentially large file (up to 2MB) to the web server. The web server is
IIS 5.1 on Windows Server 2003 R2 (SP2). I'm using WinInet functions to do the
request and transfer of the file. I finally and successfully achieved sending
the large file on my local Windows XP Pro PC. The errors that I'm getting (from
the logs) are:

PUT /Uploads/testfile.xml - 8888 - 192.168.1.111 HTTP 501 0 0 42546

I performed essentially the same actions on both servers (local and remote). I
created a virtual directory off of the web site directory and pointed it to the
directory where I want the files. I realized this was a "security" issue when,
on my local PC, I allowed "write" to both the virtual directory and the physical
directory. I tried the transfer and it worked. Now, I'm lost as to what I'm
doing wrong on the remote (Win2003) side. I've tried to set the same
permissions, but with no success.

I know the process I'm using works, so it is not on my client side. I'm using
the HttpSendRequestEx() function to start the file transfer, and
InternetWriteFile() function to send the file in blocks. The strange behavior on
the remote side is that I can go through the entire write process, but there is
no file on the other side. Again, the error code (501) and the security issues
are the cause.

Could someone please tell me what I'm doing wrong here and how to fix it?

Thanks,
Kevin


You need to enable "Write" permission on the vdir in IIS as well as
enable "WebDAV" in Web Service Extensions node inside of IIS Manager
UI.

http://blogs.msdn.com/david.wang/archive/2005/08/20/Why-can-I-upload-a-file-without-IIS-Write-Permission.aspx


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
.



Relevant Pages

  • Re: Jeez... how do I even start ????
    ... > When I would start IIS from the Administrative tools, ... > situation, with the same resolution as described in the msdn article, so ... A lot of these other posts also mentioned the ASPNET user. ... > the web server was running on this machine. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: configuring folder as Share Located On Another Computer permissi
    ... Located On Another Computer' home directory permissions? ... folder from the remote machine's local IIS localhost site, ... machine's IIS Anonymouse User account? ...
    (microsoft.public.inetserver.iis.security)
  • Re: preventing username enumeration on NT4
    ... Nimda Worm Shows You Can't Always Patch Fast Enough ... should start to investigate less-vulnerable Web server products. ... Microsoft's Internet Information Server (IIS), ...
    (comp.security.misc)
  • Re: preventing username enumeration on NT4
    ... Nimda Worm Shows You Can't Always Patch Fast Enough ... should start to investigate less-vulnerable Web server products. ... Microsoft's Internet Information Server (IIS), ...
    (comp.security.misc)
  • Re: preventing username enumeration on NT4
    ... Nimda Worm Shows You Can't Always Patch Fast Enough ... should start to investigate less-vulnerable Web server products. ... Microsoft's Internet Information Server (IIS), ...
    (comp.os.ms-windows.nt.admin.security)