views:

33

answers:

2

Hi guys,

I'm using JUpload (http://jupload.sourceforge.net/) to process file uploading, as I need the possibility to select a folder and upload all the files within. Well anyways, my problem is that with the same code, on the IIS7 file upload is working and with the Asp Net Development Server (of MS Visual Studio 2010) the upload will fail (Error message: "The string '^SUCCESS$' was not found in the response body").

My code looks like this:

        public ActionResult UploadTest(HttpPostedFileBase file)
    {
        Debug.WriteLine("ContentType: " +Request.ContentType + " HttpMethod: " + Request.HttpMethod);
        Debug.WriteLine("File is null ?: " + (file == null));

        Response.StatusCode = 200;

        if (file != null)
        {
            Debug.WriteLine("filename: " + file.FileName + " size: " + file.ContentLength + " Type: " + file.ContentType);
            Response.Write(file.FileName);
        }

        Response.Write("\n");
        return Content("SUCCESS");
    }

The log of JUpload shows this in the development server:

_http://paste-it.net/public/j6608f6/

and this is from IIS7

http://paste-it.net/public/f51cbb7/

From whatI see the files get passed throught the controller, but in the Development server there seems to be an additional HTTP Code 100 which is introducing the error.

I'd be happy for any suggestions :)

A: 

Hello,

You may have posted on JUpload forum with a different username, and I just posted there because I'm facing the same problem. So here is the link for people coming to this page through search engines to get a clue...

I personally think I'm going to code a custom upload policy but have to think over more about what I can do.

I'm going to have a look at http code 100 too.

https://sourceforge.net/projects/jupload/forums/forum/199107/topic/3733719

Barbara

postb99
Dear Barbara,wow, I didn't expect an answer anymore :)Yes, it was me also who posted on the official JUpload forums. I didn't give this problem much more thought, since uploading worked on the IIS and I had other stuff to do. But since now I have my next "problem" with JUpload ("Too many open files" - Error message when uploading >1000 files of around 300MB) I would be happy to have the upload run on the Development Server for debugging purposes :D
barabler
A: 

OK, so if you want to do like me, here you go, if you're willing to recompile the applet and sign it... the main steps :

  • Download the file I submitted here [link text][1]
  • Get the project source using subversion (see project's doc).
  • Get JDK SE installed and environment variable JAVA_HOME defined, JAVA_HOME\bin added to your path
  • Get NetBeans installed
  • Get Maven installed, and environment variables M2_HOME and M2 defined, M2 added to your path
  • Create a certificate using keytool (see JUpload's "how to sign" page) but at the end of key generation command line, add "-keystore mykeystore.jks" so that the private key resides in a file
  • Create a settings.xml file according to JUpload's "how to compile" page and put it in your user profile ".m2" directory (I had to create it). See in your Maven install folder, "conf" subdir, for settings.xml global structure.

So in your user settings.xml you would have : <jupload.keystore.alias>jupload</jupload.keystore.alias> <jupload.keystore.filename>d:\keystore\mykeystore.jks</jupload.keystore.filename> <jupload.keystore.storepass>[password you used to generate private key]</jupload.keystore.storepass>

And you're done after launching project recompilation in Netbeans. Jar resides in project's "target" folder.

Now, use "DefaultUploadPolicy2" for "uploadPolicy" applet parameter.

Regards,

Barbara

[1]: https://sourceforge.net/tracker/?func=detail&amp;aid=3036551&amp;group_id=59144&amp;atid=490055|"patch proposal"

postb99
Thanks a lot for your custom Policy! I alread set up the environment in eclipse and will try it out.I'll keep you informed !
barabler