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

Server side service sample?

9 Answers 109 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Ben Hayat
Top achievements
Rank 2
Ben Hayat asked on 23 Dec 2009, 02:49 AM
Is there a WCF service sample that communicates with the data sent by the RADUpload control? Is it better to do the server storing the file/image using a WCF service or ASP.net ashx?

Secondly, any links or articles on creating, deleting directories on the server?

Thank you in advance!
..Ben

9 Answers, 1 is accepted

Sort by
0
Accepted
Valentin.Stoychev
Telerik team
answered on 23 Dec 2009, 08:13 AM
Hi ..Ben,

For the moment the ASHX is the only alternative. You can see this help article how to extend the server side handler to add your custom logic:
http://www.telerik.com/help/silverlight/creating_custom_server-side_handler.html

On the server there is nothing special - this is a .net code and working with files and dirs is simaple. You can check the following msdn article:
http://msdn.microsoft.com/en-us/library/system.io.file.aspx


Sincerely yours,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Ben Hayat
Top achievements
Rank 2
answered on 23 Dec 2009, 03:02 PM
Thanks Valio; Is the ASHX going to stay as the only route or will it change to WCF? I was reading somewhere that the ASHX is faster than WCF.

On the server there is nothing special - this is a .net code and working with files and dirs is simaple.
I was under the impression that you have to write code to communicate with IIS to work with files and folders since they are under control of IIS. That's why I asked if special considerations need to be made to deal files and folders under IIS?

Thanks!
..Ben
0
Valentin.Stoychev
Telerik team
answered on 24 Dec 2009, 09:14 AM
Hi ..Ben,

We can provide a WCF solution also, but what do you think the benefit will be?

Sincerely yours,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Ben Hayat
Top achievements
Rank 2
answered on 24 Dec 2009, 09:42 AM
Valio, truthfully services are not my specially at all. I came from WinForm 2-tier app building LoB apps. But for SL, that has changed and I never went through ASP.Net to learn it's services.
Then Came along WCF and I noticed lots of ASP.Net services were converted using WCF.

When looking at some other "Upload" solutions, I saw them all using WCF and not ASHX. So my first thought was that, your control  must be a left over from where ASHX was still popular. However, there was one place I read that the HTTP handlers were more efficient and faster than WCF.

I asked this question originally, mainly to see if there is a "Real" upload sample, where the server side actually creates the stream that was given to it by client and my second question was, if the ASHX going to be replaced with the new WCF and using Binary compression?

You are the product manager and you know your product better than anyone else and I have never questioned that. I leave it to you as the person in charge what's best for this product. Should we stay with ASHX or move to WCF? Either way, I still like to see a complete "working sample" :-)

Hope this explained better!
..Ben
0
Valentin.Stoychev
Telerik team
answered on 04 Jan 2010, 09:02 PM
Hello ..Ben,

Sorry for the late response. I wonder what you want to see with the custom handler, so we can give you a specific example.

Sincerely yours,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Ben Hayat
Top achievements
Rank 2
answered on 04 Jan 2010, 11:45 PM
Valio, Thank you for bringing this back, since I didn't feel that we had resolved this post.

My request is to show the same sample as uploading an image, showing the image on the screen before the upload and then use the WCF service to communicate with your control to save that image on the server in a directory.

For the bonus, it would be helpful with the same sample, how that image can be downloaded from same service and then show it on client.

This sample will show the Upload control in a real application.
Thanks and hope this clears it!
0
Accepted
Ivan
Telerik team
answered on 08 Jan 2010, 04:01 PM
Hello ..Ben,

Sorry for this so late reply.

Attached you can find an example with RadUpload where all selected files (local files) are previewed and before the upload and all uploaded files (server side located) are previewed after the upload. About the WCF we are still not ready.

Please preview the example and let us know if you have other ideas.

Greetings,
Ivan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Ben Hayat
Top achievements
Rank 2
answered on 08 Jan 2010, 04:48 PM
Thank you Ivan [and Valio], for the follow up. I'll look at it and let you know. Since MSFT is shifting most of the communications to WCF, it might be good to start looking into the Upload with WCF. BUT, I still trust and respect your final decision either way!
..Ben
0
Ben Hayat
Top achievements
Rank 2
answered on 10 Jan 2010, 04:14 PM
Thank you I van. Very interesting sample. It solved one important confusion and misunderstanding I had about the Upload control. At first I became more confused when I saw there is no code on the server side in ASHX.C section and the images were being saved. I had been under the impression, that the Upload control, just delivers the stream to server and then "we" have to take over in ASHX to pickup the stream and then create an image from it and save it. If you look at my previous posts with Valio, you could see me asking about this point. What was missing between my discussion and Valio, is that "the Upload control does that automatically". And this sample cleared that point. So, thank you for making the point clear.
Tags
Upload
Asked by
Ben Hayat
Top achievements
Rank 2
Answers by
Valentin.Stoychev
Telerik team
Ben Hayat
Top achievements
Rank 2
Ivan
Telerik team
Share this question
or