Server side service sample?

10 posts, 2 answers
  1. Ben Hayat
    Ben Hayat avatar
    892 posts
    Member since:
    May 2008

    Posted 22 Dec 2009 Link to this post

    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
  2. Answer
    Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 23 Dec 2009 Link to this post

    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.
  3. DevCraft banner
  4. Ben Hayat
    Ben Hayat avatar
    892 posts
    Member since:
    May 2008

    Posted 23 Dec 2009 Link to this post

    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
  5. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 24 Dec 2009 Link to this post

    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.
  6. Ben Hayat
    Ben Hayat avatar
    892 posts
    Member since:
    May 2008

    Posted 24 Dec 2009 Link to this post

    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
  7. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 04 Jan 2010 Link to this post

    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.
  8. Ben Hayat
    Ben Hayat avatar
    892 posts
    Member since:
    May 2008

    Posted 04 Jan 2010 Link to this post

    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!
  9. Answer
    Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 08 Jan 2010 Link to this post

    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.
  10. Ben Hayat
    Ben Hayat avatar
    892 posts
    Member since:
    May 2008

    Posted 08 Jan 2010 Link to this post

    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
  11. Ben Hayat
    Ben Hayat avatar
    892 posts
    Member since:
    May 2008

    Posted 10 Jan 2010 Link to this post

    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.
Back to Top
DevCraft banner