I have searched for IO issue in forums and found many questions on the same topic but topic leads to any solution so can someone from uploadify.com help me to resolve my issue here is the link of my Sample Application which is created in asp.net C# : http://www.mediafire.com/?cale04it8susavv
Here is the code (If any 1 want to have a look at it)
rickjackson
Participant
1362 Points
410 Posts
Error #2038 IO error When Implementing Uploadify in asp.net site
Jun 11, 2011 10:48 AM|LINK
Hello to all,
I have searched for IO issue in forums and found many questions on the same topic but topic leads to any solution so can someone from uploadify.com help me to resolve my issue here is the link of my Sample Application which is created in asp.net C# : http://www.mediafire.com/?cale04it8susavv
Here is the code (If any 1 want to have a look at it)
<head runat="server"> <title></title> <script src="Uploadify/jquery-1.4.2.min.js" type="text/javascript"></script> <script src="Uploadify/swfobject.js" type="text/javascript"></script> <script src="Uploadify/jquery.uploadify.v2.1.4.min.js" type="text/javascript"></script> <link href="Uploadify/uploadify.css" rel="stylesheet" type="text/css" /> </head> <input id="file_upload" name="file_upload" type="file" /> <script type="text/javascript" language="javascript"> $(document).ready(function() { alert("Hello I am Fired"); $('#file_upload').uploadify({ 'uploader': 'Uploadify/uploadify.swf', 'script': 'Uploadify/uploadify.ashx', 'scriptData': {}, 'cancelImg': 'Uploadify/cancel.png', 'auto': true, 'multi': true, 'fileDesc': 'Image Files', 'fileExt': '*.jpeg;*.jpg;*.gif;*.bmp;*.txt;', 'queueSizeLimit': '90', 'sizeLimit': 4000000, 'folder': 'Upload', 'auto': true, 'onError': function(a, b, c, d) { if (d.status == 404) alert('Could not find upload script. Use a path relative to: ' + '<?= getcwd() ?>'); else if (d.type === "HTTP") alert('error ' + d.type + ": " + d.status); else if (d.type === "File Size") alert(c.name + ' ' + d.type + ' Limit: ' + Math.round(d.sizeLimit / 1024) + 'KB'); else alert('error ' + d.type + ": " + d.text); }, 'onAllComplete': function(event, queueID, fileObj, response, data) { } }); }); </script> Upload.ashx File Handler <%@ WebHandler Language="C#" Class="Upload" %> using System; using System.Web; public class Upload : IHttpHandler { public void ProcessRequest(HttpContext context) { HttpPostedFile file = context.Request.Files["Filedata"]; file.SaveAs("C:\\" + file.FileName); context.Response.ContentType = "text/plain"; context.Response.Write("Hello World"); } public bool IsReusable { get { return false; } } }Whenever i upload file i get rickjackson.jpg (1.65KB) - IO Error Please help me to solve this issue...
regards,
Anton Palyok
Contributor
2526 Points
404 Posts
Re: Error #2038 IO error When Implementing Uploadify in asp.net site
Jun 11, 2011 03:50 PM|LINK
Hi,
It looks like it is a configuration issue.
I working with this config and it works fine:
<script type = "text/javascript"> $(document).ready( function() { $("#file_upload").uploadify({ 'uploader' : 'Uploadify/uploadify.swf', 'script' : 'Upload.ashx', 'cancelImg' : 'Uploadify/cancel.png', 'folder' : 'uploads', 'multi' : true, 'auto' : true }); }); </script>also in your code wrong path to handler (your handler in a root folder but you specify it to uploadify folder)
rickjackson
Participant
1362 Points
410 Posts
Re: Error #2038 IO error When Implementing Uploadify in asp.net site
Jun 13, 2011 05:41 AM|LINK
Hey Anton Palyok.... Thanks for your reply.... and your solution worked......