This is a migrated thread and some comments may be shown as answers.

Get NotFound exception when upload file to Azure emulator at second time upload

8 Answers 140 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 18 Oct 2011, 07:30 AM
Hi,
When I try use RadAsyncUpload to upload file with sample code form your demo(http://demos.telerik.com/aspnet-ajax/upload/examples/async/imageuploader/defaultcs.aspx?product=asyncupload) on the Azure emulator. I got an exception NotFound second time upload.

Oh, one more information. If I direct access handler.aspx after site startup. I  will got "RadAsyncUpload handler is registered succesfully, however, it may not be accessed directly."  But another exception at below in handler.ashx after first file uploaded.

Value cannot be null.
Parameter name: input

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: input

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentNullException: Value cannot be null.
Parameter name: input]
   System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(String input) +947910

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +640
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +38
   Telerik.Web.UI.AsyncUpload.SerializationService.Deserialize(String obj, Type type) +273
   Telerik.Web.UI.AsyncUploadHandler.HandleChunkUploadRequest(String serializedMetaData) +41
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +625
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +270


Any Idea for this?

8 Answers, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 19 Oct 2011, 08:39 AM
Hi Eric,

I suggest that you use Fiddler in order to debug the requests and compare and contrast the request that was successful and the one that failed. Are there any differences?  

All the best,
Genady Sergeev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Eric
Top achievements
Rank 1
answered on 19 Oct 2011, 10:23 AM
First, thank you for your reply.

I use Fiddler to monitor both request when file upload to handler.ashx.

I got response 200 at first time upload on handler.ashx.

But there is an exception at second time upload on handler.ashx and the response result is 500.

[NullReferenceException: Object reference not set to an instance of an object.]
   System.Web.Util.StringUtil.memcpyimpl(Byte* src, Byte* dest, Int32 len) +42
   System.Web.Util.StringUtil.UnsafeStringCopy(String src, Int32 srcIndex, Char[] dest, Int32 destIndex, Int32 len) +120
   System.Web.HttpWriter.Write(String s) +175
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +624
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +269

Thanks again.
0
Eric
Top achievements
Rank 1
answered on 21 Oct 2011, 07:37 AM
Can anyone help me with this issue ?  Thank you very much.
0
Genady Sergeev
Telerik team
answered on 21 Oct 2011, 08:07 AM
Hello Eric,

To be honest I am out of suggestions on why this issue happens. Looking at the stack trace it is visible that the error is thrown inside the unmanaged function memcpyimpl and it does not seem to be related in any way with the custom handler. Is it possible to attach debugger to the handler and take a look what is going wrong the second time? If you don't use the custom handler but the out of the box async upload handler?

Greetings,
Genady Sergeev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Eric
Top achievements
Rank 1
answered on 21 Oct 2011, 08:32 AM
I already try to attach degugger on handler.ashx at second time.

I set breakpoint on the Process function. It not entering  debug mode at second time but it can stopped on the breakpoint at first time. And it will throw exception directly on the client page at second time upload.

Update:

If I don't use the custom handler is working at every file upload. But I still need custom handler to process my file.

Thanks.
0
Eric
Top achievements
Rank 1
answered on 27 Oct 2011, 08:15 AM
Could someone help please???
0
Genady Sergeev
Telerik team
answered on 27 Oct 2011, 08:40 AM
Hi Eric,

Do you use the same handler as the one in the demo? What bothers me is that the error in your first message is completely different than the one in the second. How have you retrieved the first error?

All the best,
Genady Sergeev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Eric
Top achievements
Rank 1
answered on 27 Oct 2011, 09:43 AM
Yes, I use same handler. And I don't know why they are different in two situation.

In the first post. 

I use IE to directly open handler.aspx after site startup.  I can get exception  "RadAsyncUpload handler is registered succesfully, however, it may not be accessed directly.".  
Afer first upload, Open handler.aspx in IE again. It will throw another exception that [ArgumentNullException: Value cannot be null.
Parameter name: input]


In the Second post.

Following to your suggestions, I used Fiddler to monitor reponses when file upload to handler.ashx.
There is the response of the handler.ashx at second time upload. 
 [NullReferenceException: Object reference not set to an instance of an object.] 


I hope you can understand my question. Help me to solve this problem, Please .
 

Tags
AsyncUpload
Asked by
Eric
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Eric
Top achievements
Rank 1
Share this question
or