Server error HTTP/1.1 405 Method Not Allowed

Upload core product.
Post Reply
amrish_deep
Posts: 40
Joined: Tue Jun 17, 2008 5:14 am

Server error HTTP/1.1 405 Method Not Allowed

Post by amrish_deep »

Hi,
I recently upgraded my application's DOTNET framework from 2.0 to 4.0 on IIS7 (Windows 2008 server). The upload functionality seems to have been throwing this error since then:

Server error HTTP/1.1 405 Method Not Allowed

This is the Java log that I am getting:

Java Plug-in 1.6.0_23
Using JRE version 1.6.0_23-b05 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\rjay_shva
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------


[INFO] MApplet - JFileUpload 2.8 Build FINAL.001
[INFO] HTTPTransfer - WeakSSL registered for HTTPS
[INFO] HTTPTransfer - Auto-detect proxy settings (ps): DIRECT
[INFO] HTTPTransfer - Auto-detect proxy settings : host = null
[INFO] HTTPTransfer - Auto-detect proxy settings : port = -1
[INFO] Conf - TransferUI instantiated : jfileupload.transfer.client.edesign.BatchTransferUI
[INFO] BatchTransferUI - JBatchUpload 2.8 FINAL.001
[INFO] HTTPTransfer - Head Status code = 200
[INFO] HTTPUploadTransfer - Upload (PUT) started : D:\test123\ragarl2.txt (https://www.yyyy.xxxxx.ssss.com:443/SYS ... leIC=10946)
[INFO] HTTPUploadTransfer - Upload Status code = 405
[INFO] HTTPUploadTransfer - Upload failed


It was working fine before the DOTNET framework update. Can you please help me with this. Is there any specific setting that I need to use in this new framework/IIS.
I have embedded the applet in my aspx page with the below settings:

Code: Select all

<applet code="jfileupload.upload.client.MApplet.class" java_codebase="." archive="lib/jfileupload.jar,lib/httpimpl.jar,lib/chttpclient.jar,lib/clogging.jar,lib/batchui.jar,lib/weakssl.jar"
                                                                                                                width="490" height="150" name="fileupload" mayscript>
                                                                                                                <param name="CODE" value="jfileupload.upload.client.MApplet.class" />
                                                                                                                <param name="CODEBASE" value="./" />
                                                                                                                <param name="ARCHIVE" value="lib/jfileupload.jar,lib/httpimpl.jar,lib/chttpclient.jar,lib/clogging.jar,lib/batchui.jar,lib/weakssl.jar" />
                                                                                                                <param name="NAME" value="fileupload" />
                                                                                                                <param name="type" value="application/x-java-applet;version=1.4" />
                                                                                                                <param name="scriptable" value="true" />
                                                                                                                <param name="url" value="<%=uploadHandlerURL%>" />
                                                                                                                <param name="paramfile" value="uploadfile" />
                                                                                                                <param name="param1" value="todo" />
                                                                                                                <param name="value1" value="upload" />
                                                                                                                <param name="param2" value="errorheader" />
                                                                                                                <param name="value2" value="custommessage" />
                                                                                                                <param name="param3" value="relativefilename" />
                                                                                                                <param name="value3" value="true" />
                                                                                                                <param name="param4" value="weakssl" />
                                                                                                                <param name="value4" value="dummy" />
                                                                                                                <param name="param5" value="httpmethod" />
                                                                                                                <param name="value5" value="put" />
                                                                                                                <param name="param6" value="cookiename" />
                                                                                                                <param name="value6" value="ASP.NET_SessionId" />
                                                                                                                <param name="param7" value="cookievalue" />
                                                                                                                <param name="value7" value="<%=aspNetSessionID%>" />
                                                                                                                <param name="param8" value="errorheader" />
                                                                                                                <param name="value8" value="custommessage" />
                                                                                                                <param name="param9" value="chunksize" />
                                                                                                                <param name="value9" value="104857600" />
                                                                                                                <param name="chunksize" value="104857600" />
                                                                                                                <param name="param10" value="Resumecommand" />
                                                                                                                <param name="value10" value="append" />
                                                                                                                <param name="overwrite" value="false" />
                                                                                                                <%--<param name="ziponfly" value="true"/>
                                                                                                        <param name="zipignorelist" value="*.zip,*.exe,*.mp3,*.wmv"/>--%>
                                                                                                                <param name="folderdepth" value="-1" />
                                                                                                                <param name="mode" value="http" />
                                                                                                                <param name="blacklist" value="*.mp3" />
                                                                                                                <param name="resume" value="true" />
                                                                                                                <param name="resources" value="i18n_bar" />
                                                                                                                <param name="maxfiles" value="1" />
                                                                                                                <param name="transferui" value="jfileupload.transfer.client.edesign.BatchTransferUI" />
                                                                                                                <param name="transferuiresources" value="i18n_pane" />
                                                                                                                <param name="transferuiparam1" value="displayalternatestart" />
                                                                                                                <param name="transferuivalue1" value="false" />
                                                                                                                <param name="resetprogressbar" value="true" />
                                                                                                                <param name="preferences" value="true" />
                                                                                                                <param name="forward" value="<%=redirectURL%>" />
                                                                                                                <param name="forwardparameters" value="true" />
                                                                                                                <%--<param name="post" value="<%=redirectURL%>" />
                                                                                                        <param name="postparameters" value="true" />--%>
                                                                                                            </applet>
Let me know if you need more details.

Thanks

amrish_deep
Posts: 40
Joined: Tue Jun 17, 2008 5:14 am

Re: Server error HTTP/1.1 405 Method Not Allowed

Post by amrish_deep »

I did some more internal logging in my application. I came to know that the first request (for checking if the file exists) is the HTTP HEAD method. It is served properly by the application and appropriate status code is returned.
For the next one, which is PUT method, the control does not come to the page itself. Please let me know how to get this fixed.

Thanks

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Server error HTTP/1.1 405 Method Not Allowed

Post by support »

Applet does not depend on dotnet version on server-side. I think you have to fix the settings on IIS. It may be in Web.config file. We have a sample ASPX script that workd with JFileUpload at:
http://www.jfileupload.com/products/tools/index.html

surabhi.chakravarthy
Posts: 1
Joined: Wed Apr 23, 2014 5:32 am

Re: Server error HTTP/1.1 405 Method Not Allowed

Post by surabhi.chakravarthy »

Hi,
I am facing the same error "Server error HTTP/1.1 405 Method Not Allowed" while trying to upload a file using the jfileupload applet embedded in the asp.net code.
Assuming it could be because of the applet handler settings, I modified it in IIS to enable the verbs GET,HEAD,PUT,POST,DEBUG. Yet the Put method doesn't seem to be executing in the code.
Please Help.

Thanks in advance!

Post Reply