Page 1 of 1

HTTP/1.1 401 Unauthorized

Posted: Mon Sep 22, 2014 12:21 pm
by amrish_deep
Hi JfileUpload

we are getting HTTP/1.1 401 Unauthorized error while uploading using jfielupload
please see the java error logs mentioned below
if you need more erorr logs i can send that also
please suggest a solution

[DEBUG] header - >> "PUT /SIS/upload/AppletFileUpload.aspx?selectedProductID=1273&selectedFileID=7150 HTTP/1.1[\r][\n]"
[DEBUG] HttpMethodBase - Adding Host request header
[DEBUG] header - >> "overwritewarnforwardfile: all[\r][\n]"
[DEBUG] header - >> "Resumecommand: append[\r][\n]"
[DEBUG] header - >> "todo: upload[\r][\n]"
[DEBUG] header - >> "httpmethod: put[\r][\n]"
[DEBUG] header - >> "chunksize: 104857600[\r][\n]"
[DEBUG] header - >> "relativefilename: new.txt[\r][\n]"
[DEBUG] header - >> "Content-Type: text/plain[\r][\n]"
[DEBUG] header - >> "filename: new.txt[\r][\n]"
[DEBUG] header - >> "User-Agent: JFileUpload[\r][\n]"
[DEBUG] header - >> "Host: http://name[\r][\n]"
[DEBUG] header - >> "Cookie: ASP.NET_SessionId=ucep25oe5dbigpcgzhazkxnk[\r][\n]"
[DEBUG] header - >> "Content-Length: 15301[\r][\n]"
[DEBUG] header - >> "[\r][\n]"
[DEBUG] EntityEnclosingMethod - Request body sent
[DEBUG] header - << "HTTP/1.1 401 Unauthorized[\r][\n]"
[DEBUG] header - << "HTTP/1.1 401 Unauthorized[\r][\n]"
[DEBUG] header - << "Cache-Control: private[\r][\n]"
[DEBUG] header - << "Content-Type: text/html[\r][\n]"
[DEBUG] header - << "Server: Microsoft-IIS/7.5[\r][\n]"
[DEBUG] header - << "X-AspNet-Version: 4.0.30319[\r][\n]"
[DEBUG] header - << "X-Powered-By: ASP.NET[\r][\n]"
[DEBUG] header - << "X-Frame-Options: SAMEORIGIN[\r][\n]"
[DEBUG] header - << "Date: Mon, 22 Sep 2014 11:21:38 GMT[\r][\n]"
[DEBUG] header - << "Content-Length: 1293[\r][\n]"
[DEBUG] header - << "[\r][\n]"
[DEBUG] HttpMethodDirector - Authorization required
[DEBUG] HttpMethodDirector - Authentication challenge(s) not found
[INFO] HTTPUploadTransfer - Upload Status code = 401
[DEBUG] HttpMethodBase - Resorting to protocol version default close connection policy
[DEBUG] HttpMethodBase - Should NOT close connection, using HTTP/1.1
[DEBUG] HttpConnection - Releasing connection back to connection manager.
[INFO] HTTPUploadTransfer - Upload failed

Re: HTTP/1.1 401 Unauthorized

Posted: Mon Sep 22, 2014 12:27 pm
by amrish_deep
Please see the detailed scenario
I am using Jfile upload in my application which is in asp.net
and it is hosted in IIS 7.5 web server with identity pool set to a local user account
and when i upload file using jfileupload it gives me HTTP 1.1/ 401 Unauthorized Error

in the file server where the applet suppose to upload the file the shared directory have the security access for the user which is domain user (Dir\UserName) with same username and password as that of webserver user (The user which is set in app pool identity of the website)

Note that username and password in web server and file server are same and only difference is that
one user is local user to the webserver and the one in file server is domain user
but same password
web server user --> "UserName"
File server user --> "Dir\UserName"

Please see the attachment for the error.
Please help me in solving this issue.

Re: HTTP/1.1 401 Unauthorized

Posted: Sun Oct 19, 2014 9:28 am
by support
It looks web server is expecting some credentials or authorization token for PUT verb.
Did you have a look to:
http://www.jfileupload.com/products/jfi ... ation.html

Try:
<PARAM NAME="param9" VALUE="cookiesource">
<PARAM NAME="value9" VALUE="jse">