Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Exception while trying to deserialize
SteveDeclerck
#1 Posted : Friday, September 30, 2016 7:31:54 AM(UTC)
Groups: Member
Joined: 9/30/2016(UTC)
Posts: 7

Thanks: 2 times
Good afternoon,

I have a problem that looks a lot like this post :

http://ultidev.com/forum...ialize-the-message.aspx

The error happens during a image upload.
This the error :

"The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:request. The InnerException message was 'There was an error deserializing the object of type FileTransferService.DataContracts.UploadRequest. Unexpected end of file. Following elements are not closed: Content, request, Upload, Body, Envelope. Line 1, position 131073.'. Please see InnerException for more details."

It seems that the transfer is cut somewhere. I was wondering if there was a solution to the previous post about this topic? Findings were not published.

Many thanks in advance !
Steve
Ultidev Team
#2 Posted : Friday, September 30, 2016 9:26:26 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi, Steve.

Could you please post the stack trace. We're interested to see whether this exception is happening in our code.

Regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
SteveDeclerck
#3 Posted : Monday, October 3, 2016 7:27:23 AM(UTC)
Groups: Member
Joined: 9/30/2016(UTC)
Posts: 7

Thanks: 2 times
Hi,

Thank you for the reply !
I forgotten to say that (just as a test), I tried with IIS and the file upload completed without errors.

This is the Visual Studio 2015 call stack (to me it doesn't say much). I'm not sure if it's that what you meant? Sorry in case I misunderstood.


> DocMaster.exe!DocMaster.Models.FileUpload.UploadFile(DocMaster.Common.UserDefined.DocType docType = DocTypeProject, string FileName = "ijtgijti.jpg", string FilePath = "C:\\Users\\Beheerder\\AppData\\Local\\Packages\\ETSInformatics.DocMaster_7n70s8bzwzma6\\LocalState\\Project\\0000001\\00 - CONTRACT\\ijtgijti.jpg", string Folder = "00 - CONTRACT", string SubFolder = "") Line 155 C#
[Resuming Async Method]
mscorlib.ni.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
mscorlib.ni.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run() Unknown
mscorlib.ni.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.OutputAsyncCausalityEvents.AnonymousMethod__0() Unknown
mscorlib.ni.dll!System.Runtime.CompilerServices.TaskAwaiter.OutputWaitEtwEvents.AnonymousMethod__0() Unknown
System.Runtime.WindowsRuntime.dll!System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore() Unknown
mscorlib.ni.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
System.Runtime.WindowsRuntime.dll!System.Threading.WinRTSynchronizationContext.Invoker.Invoke() Unknown
[Async Call]
DocMaster.exe!DocMaster.Views.Detail.UploadButton_Tapped(object sender = {Windows.UI.Xaml.Controls.MenuFlyoutItem}, Windows.UI.Xaml.Input.TappedRoutedEventArgs e = {Windows.UI.Xaml.Input.TappedRoutedEventArgs}) Line 838 C#


Many thanks in advance !
Best regards, Steve
Ultidev Team
#4 Posted : Monday, October 3, 2016 2:49:45 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Steve,

The stack trace appears to be taken from the client application.
Does the server application throw an exception? Can you test it? Maybe you could run Fiddler on the client to intercept HTTP traffic to the server application, so it would be possible to see whether server application is failing.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
SteveDeclerck
#5 Posted : Tuesday, October 4, 2016 8:12:35 AM(UTC)
Groups: Member
Joined: 9/30/2016(UTC)
Posts: 7

Thanks: 2 times
Hi !

Thanks for replying.

I installed Fiddler. I never used it before, so I hope I'm sending you the right logs. I will try to add the 3 files to this message.

Thank you !
File Attachment(s):
Statistics.txt (1kb) downloaded 126 time(s).
InternalServerError.txt (1kb) downloaded 131 time(s).
Raw.txt (141kb) downloaded 131 time(s).
Ultidev Team
#6 Posted : Wednesday, October 5, 2016 11:08:57 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Steve,

Thank you for provided information.

Are you able to debug server-side code? Can you see whether the service received entire POSTed content of roughly 140 KB? We so far do not see any problem attributable to UWS server.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
1 user thanked Ultidev Team for this useful post.
SteveDeclerck on 10/8/2016(UTC)
SteveDeclerck
#7 Posted : Saturday, October 8, 2016 5:03:21 AM(UTC)
Groups: Member
Joined: 9/30/2016(UTC)
Posts: 7

Thanks: 2 times
Hi,

Sorry for the delay...
The last few days I tried to debug the server side code but to no avail. I'm not too experienced yet on .NET / WCF services. First I tried to attach the WCF service to the UWS.EXPLORER.exe process (from Visual Studio). Debug menu -> Attach to process. I didn't end up in the server code (using Step into or F11 from the client app). The client app is a windows 10 universal app.
Then I tried by opening the project properties -> Debug tab -> Start external program. Nothing helped, I never end up in the source code of the WCF service. Maybe I'm doing something wrong?

I downloaded the UWS Visual Studio web server replacer utility, but when I run it, I receive the following error :

" Visual Studio development server (WebDev.WebServer) was not found on this system. "

Sorry for asking if you know maybe how to configure Visual Studio or to debug the server code. Would be nice to see what is arriving inside the service.

Thanks a lot, best regards, Steve
Ultidev Team
#8 Posted : Monday, October 10, 2016 9:44:12 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi, Steve.

In order to debug application registered with UWS service, you would need to attach the debugger to one of the "UWS.AppHost.Clr..." processes, not to UWS Explorer, which is the management console.

Even more convenient could be using one of the UWS Interactive Hosts, which can be set in Visual Studio Debug settings as an external application, with the appropriate command line parameters, and that way you could simply start debugging from the Visual Studio, and not having to attach debugger.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
SteveDeclerck
#9 Posted : Thursday, October 13, 2016 8:27:35 AM(UTC)
Groups: Member
Joined: 9/30/2016(UTC)
Posts: 7

Thanks: 2 times
Hi,

Sorry again for the delay.
I managed to attach the debugger and I found the root of the problem.
The problem is the file size. It goes wrong when the file size exceeds 100 KB. That's weird, it's still a small file.
That way, I never end up in the server side code.

When the filesize is less than 100 KB, everything is fine and I reach the breakpoint in the webservice, file is written, everything ok.

I guess this is not a Ultidev problem. I'm just puzzled why everything above 100KB gets truncated.

Thanks for your time and your help!
Best regards, Steve
Ultidev Team
#10 Posted : Monday, October 17, 2016 10:47:40 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
No problem.

Please check ASP.NET .config settings: sometimes buffer sizes can be adjusted via settings. Buffer sizes can be limited as a security feature, preventing random malicious requests from DDoSing your site by sending huge bogus payloads.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
1 user thanked Ultidev Team for this useful post.
SteveDeclerck on 11/2/2016(UTC)
SteveDeclerck
#11 Posted : Wednesday, November 2, 2016 3:48:40 AM(UTC)
Groups: Member
Joined: 9/30/2016(UTC)
Posts: 7

Thanks: 2 times
Thanks !
Ultidev Team
#12 Posted : Wednesday, November 2, 2016 3:19:04 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
No problem!

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Guest
#13 Posted : Tuesday, November 29, 2016 8:03:09 AM(UTC)
Groups:

Message was deleted by a Moderator.
Rss Feed  Atom Feed
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.