Part 2 Creating a remoting service and a web service

Share
Embed
  • Published on Nov 17, 2013
  • Link for code samples used in the demo
    csharp-video-tutorials.blogspot.com/2013/11/part-2-creating-remoting-service-and_17.html
    Link for all dot net and sql server video tutorial playlists
    ru-clip.net/user/kudvenkatplaylists
    In this video we will discuss creating a simple remoting and a web service. This is continuation to Part 1. Please watch Part 1 from WCF video tutorial before proceeding.
    We have 2 clients and we need to implement a service a for them.
    1. The first client is using a Java application to interact with our service, so for interoperability this client wants messages to be in XML format and the protocol to be HTTP.
    2. The second client uses .NET, so for better performance this client wants messages formatted in binary over TCP protocol.
    To satisfy the requirement of the first client let's create a web service. Web services use HTTP protocol and XML message format. So interoperability requirement of the first client will be met. Web services can be consumed by any client built on any platform.
    Can we use .NET Remoting to build a Web service?
    Yes.
    If the client is not built using .NET platform, will they be able to consume a .NET Remoting web service?
    They can, but we need to be very careful in choosing the data types that we use in the service, and client-activated objects and events should be avoided. But keep in mind .NET Remoting is not meant for implementing interoperable services.
    If your goal is to build interoperable services use ASP.NET Web Services. But with introduction of WCF, both .NET Remoting and ASP.NET Web Services are legacy technologies.

Comments • 86

  • Anand Deshmukh
    Anand Deshmukh Month ago

    Sir, you Are mental Giant or forte or Genius!

  • nitish prasad satpathy
    nitish prasad satpathy 4 months ago

    Sir I am using visual Studio 2015, and i have get some error -> WcfPOC.RestServiceImpl' does not implement interface member 'WcfPOC.IRestServiceImpl.SaveEmployee(WcfPOC.RequestData)' . How to solved this .

  • Sonia mittal
    Sonia mittal 6 months ago

    it is asking for welknown array to retrieve the value

  • Sonia mittal
    Sonia mittal 6 months ago

    RemotingConfiguration.GetRegisteredWellKnownServiceTypes(typeof(
    Helloremotingservice.Helloremotingsevice), "Getmessage", WellKnownObjectMode.Singleton);,,in this part

  • Sonia mittal
    Sonia mittal 6 months ago

    Hey venkat m getting error
    while i try to implement same,can you please help me

  • David Tangman
    David Tangman 6 months ago

    I am so glad that these meatballs have now been replaced by WebAPI

  • Guilherme Silva
    Guilherme Silva 8 months ago

    6 years later, i have a doubt, "The Channel.TCP was discontinued?"

  • Rhonwen Van Druten

    I get this error:
    "Project '..\HelloRemotingService\HelloRemotingService.csproj' targets 'netcoreapp2.1'.
    It cannot be referenced by a project that targets '.NETFramework,Version=v4.6.1'."
    ...If I try to add a WPF, WFA or a Console application. if I create a Web Console Application then I cannot add the .net assemblies:
    System.Runtime.Remoting;
    System.Runtime.Remoting.Controller;
    System.Runtime.Remoting.Controller.Tcp;
    Does anyone has a suggestion to what I should do? (Oh, I am using Visual Studio 2017)

  • Harshil Soni
    Harshil Soni Year ago

    hey your video is nice but i have doubt regarding local host its not redirecting when i use in my browser
    can you give me some solution about that

  • denisha patel
    denisha patel Year ago

    i didn't find my exe file in debug folder.

  • denisha patel
    denisha patel Year ago

    hey venkat.
    i have one warning like this.

    Severity Code Description Project File Line Suppression State
    Warning CS0618 'ChannelServices.RegisterChannel(IChannel)' is obsolete: 'Use System.Runtime.Remoting.ChannelServices.RegisterChannel(IChannel chnl, bool ensureSecurity) instead.' RemotingServiceshost C:\Users\patel\onedrive\documents\visual studio 2015\Projects\IHelloRemotingservices\RemotingServiceshost\Program.cs 18 Active

  • nikhil kumar
    nikhil kumar Year ago

    Hi Venkat,
    Really appreciate your efforts. Great videos.
    Can u please create a playlist for MVVM in WPF.

  • Sanjeev Sriramoju

    I am getting this error . please help me out ... "No connection could be made because the target machine actively refused it 127.0.0.1:65100"
    getting error at "
    Line 119: HellowWebClient.HelloWebService.GetMessageResponse HellowWebClient.HelloWebService.HelloWebServiceSoap.GetMessage(HellowWebClient.HelloWebService.GetMessageRequest request) {
    Line 120: return base.Channel.GetMessage(request);
    Line 121: }"

  • Nilesh Chauhan
    Nilesh Chauhan Year ago

    @Venkat - I have one question. Please tell me why we need TCP communication? Most of the people related this neccessity with cross-machine communication over intranet. But not easy to grab. Can you please give a demonstration on it?

  • Nilesh Chauhan
    Nilesh Chauhan Year ago

    Thanks a lot man. Your way of representation is too good. and thanks for highlights into why should we prefer to WCF. Means what is drawback of Web service and Remote service. This is awesome. I will go through all the video. And i hope you would have explain Security mechanism, authentication and SSL also in next videos.

  • Greeshma P Balan
    Greeshma P Balan Year ago

    Really great explanation ..😊👍👍

  • Darko Gelevski
    Darko Gelevski 2 years ago +1

    Da si ziv i zdrav :D

  • Marumo Maboe
    Marumo Maboe 2 years ago

    Genius at work

  • Michael Esser
    Michael Esser 2 years ago

    I really like your style and your efforts. Keep up the great work. While executing your example the line of code doesnt allow me to select Label1.Text = Client. GetMessage --- GetMessage doesnt populate. Any insights to this? I have researched for about 1.5 hours now to no avail.

    • Michael Esser
      Michael Esser 2 years ago

      Wow, My bad. Having a Exception Details: System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:51795 issue now and I turned off the proxy in web.config.

  • Varsha Rabde
    Varsha Rabde 2 years ago

    superb videos.....

  • 王雪飞
    王雪飞 2 years ago

    非常有用,感谢,赞

  • lucky negi
    lucky negi 2 years ago +1

    One important thing to remember is that you have to run your application through IIS ant not through default VS IIS express . Otherwise you will see HTTP Error 403.14 - Forbidden error message.

    • Surya Iduri
      Surya Iduri 2 years ago

      Hey negi , I got the same error here can u pls tell me how to run my application through IIS ant ??

  • Stanley Toles
    Stanley Toles 2 years ago

    Pragim technologies!!!

  • Rohail iqbal
    Rohail iqbal 2 years ago

    Very Nicely explained. Thank you sir for your effort :)

  • Waqas Ali
    Waqas Ali 2 years ago

    thanks for the great video series. i have a question. i have single windows forms application running on two other machines in Intranet. i have installed sql server on both machines. all i want is to share the database with each other like i want my database to be hosted on first machine and second machine should use the database from there, i am looking for solution over a week ago but nothing is working for me. please help me solve this. thank you !

  • Meghana Reddy
    Meghana Reddy 2 years ago

    Much better than anyother tutorial on Pliralsight

  • Quark Bytes
    Quark Bytes 3 years ago

    awesome series and explanation !!!!

  • Soumabha & NeEON
    Soumabha & NeEON 3 years ago

    Hi sir , I got an error like
    The Web server is configured to not list the contents of this directory.
    what can be the cause of causing the error?

  • Pavan Birajdar
    Pavan Birajdar 3 years ago

    Supper video sir
    pls come with wcf Rest

  • Eduardo Chávez
    Eduardo Chávez 3 years ago

    You mention at the beggining of the video that .NET remoting is for .NET to .NET communication, is not interoperable, at the end of the video you mention that maybe is posible just taking care of the client-objects, events, some stuff and knowing that is not the purpose of that technology. So, is it possible? as the video shows is tricky to coding for .net to .net and this is only for a simple service.
    But well just want to make it clear :) Cheers!

  • Eduardo Chávez
    Eduardo Chávez 3 years ago

    Hi @venkat, on HelloWebServicesHost proyect the method that you choose does not exist,
    RemotingConfiguration.GetRegisteredWellKnownServiceType
    (typeof(HelloRemotingService.HelloRemotingService),"GetMessage",WellKnownObjectMode.Singleton);
    maybe is my .net version but doesn't work instead of that I used the next
    RemotingConfiguration.GetRegisteredWellKnownServiceType(); /*No overloadings available*/
    Everything looks fine at building and run the service, but when I run the windows form client i get a not handled exception :
    ************* Texto de la excepción **************
    System.Runtime.Remoting.RemotingException: No se encontró el servicio solicitado
    ( **Requested service not found)
    Server stack trace:
    en System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
    What can I do :P ?
    I understood the main idea but this is a tricky code, I hope real WCF doesn't work like that.
    Regards!!

  • tamil azhagan
    tamil azhagan 3 years ago

    Thanks for your efforts.I get a clear idea in remoting services.

  • Omar Dieng
    Omar Dieng 3 years ago

    Yep ! very Clear explanations and Voice sounds is very radiophonic; keep on doing so - congratulation We are happy !!!

  • Arvind upadhyay
    Arvind upadhyay 3 years ago

    Good, nice vedio...

  • Narottam Singh Bisht
    Narottam Singh Bisht 3 years ago +1

    Sir what is HelloWebServiceSoapClient from where this comes in HelloWebClient.HelloWebServiceSoapClient

  • Ashwani Agarwal
    Ashwani Agarwal 3 years ago

    Please write a tutorial for Web API.

  • RISHABH SHREYAS
    RISHABH SHREYAS 3 years ago

    Hello Venkat, i am sorry to say this but this is the first time i haven't understood something in your videos. You just kept writing line of codes without clearly mentioning the intention.

  • Just Anthony
    Just Anthony 3 years ago

    You are the man. Kudos and God bless, so glad I found your channel.
    Keep up the good work!

  • Hema Singamsetty
    Hema Singamsetty 3 years ago +1

    Hi Kudvenkat,
    instead of showing this small displaying name , can u show us real time example....then it will be more helpful....could u teach us with real time examples

  • Indrakaran G
    Indrakaran G 3 years ago

    Hello sir, I am using visual studio 2915, but i am not getting any response ( but just blank) when I click on the get message button. I did all same as you did, please help me out. Thank you.

  • Raamesh Kandalgaonkar
    Raamesh Kandalgaonkar 3 years ago +1

    Excellent Videos. The way you have explained each concept with details along with the practical coding in Visual Studio makes it all the more easier to understand the concepts clearly.
    Thank you so much and keep up the good work. These set of videos are the best I have found!
    :)

  • pragnya sahoo
    pragnya sahoo 3 years ago

    I dnt have the web service template in my studio. Could you help

    • Eduardo Chávez
      Eduardo Chávez 3 years ago

      There is no template for that (not in VS 2015) you can see on the video that the template is c#>Class library, the other used proyects are c#>Console Application and Windows Forms, just add the necesary references.

  • naveen nvn
    naveen nvn 3 years ago +11

    Super voice Quality and explanation

    • Dan Doris
      Dan Doris 3 years ago

      Excellent presentation, explanation.. Stumbled across your videos, started watching some of the later ones in the WCF series, but thought it be best to start from the beginning. Well done.

    • kudvenkat
      kudvenkat  3 years ago +6

      +naveen nvn Thanks a lot for your feedback. This means a lot. I am pleased you found these videos useful.
      Dot Net & SQL Server video tutorials to help you become a web developer
      ru-clip.net/user/kudvenkatplaylists?view=1&sort=dd
      DVDs for offline viewing
      www.pragimtech.com/Order.aspx
      Slides & Text Version of the videos can be found on my blog
      csharp-video-tutorials.blogspot.com
      Tips to effectively use my youtube channel
      ru-clip.net/video/y780MwhY70s/video.html
      To receive email alerts, when new videos are uploaded, please subscribe to my channel
      ru-clip.net/user/kudvenkat
      If you like these videos, please click on the THUMBS UP button below the video
      May I ask you to please share the link with your friends and family who you think would also benefit from them
      Thank You
      Venkat

  • Pardha Saradhi
    Pardha Saradhi 3 years ago +2

    Best Video to easy understand the Remoting service.It's traditional service I want to learning from Webservice to WCF .I have one Question. In real time what scenarios prefer webservice? and what scenarios used for Remoting?.Could you please clarify it.

  • Rashmi H
    Rashmi H 4 years ago +5

    I am WCF begginer. Video is great but remoting service is been quite difficult for me to understand. Is there any other basic video i should look into.?

  • TallCoolDrink
    TallCoolDrink 4 years ago +3

    At first I didn't know where you were going with this video series.
    Now I know.....
    Very well done.
    Thank you.

  • anusha bandi
    anusha bandi 4 years ago

    sir is that enough to create wcf without using remote and web service like this this seems tedious?

  • Web Zone
    Web Zone 4 years ago

    Very Nice work.

  • Mano Appapillai
    Mano Appapillai 4 years ago

    Very nicely done. Thank you.

  • Leonardo Ferreira Vilela

    So much good, this video!!

  • Mario Incio
    Mario Incio 4 years ago

    Muy pero muy bueno la explicación!.. Muchas gracias.

  • Zlatko Zeco
    Zlatko Zeco 4 years ago

    Thanks a lot

  • Kokande Raj
    Kokande Raj 4 years ago

    Thank you sir very good vedio..

  • Nivedita Rawat
    Nivedita Rawat 4 years ago

    Hi,
    I am getting this error while button click in RemotingServiceClientForm that is "System.Net.Sockets.SocketException (0x80004005): No such host is known". Is there any setting to make it correct?

  • meetrjsingh
    meetrjsingh 5 years ago

    Thanks for making me understand the concepts. Really helpful.

  • chandan parihar
    chandan parihar 5 years ago

    What a great way of explaining... Thank you sir

  • David Donari
    David Donari 5 years ago +2

    Wonderfull tutorial Congrats !!!!

  • Ahmed Marzouk
    Ahmed Marzouk 5 years ago

    It is the perfect .Net Channel i have ever seen and really i have a lot of benefits from those videos thank you very much also if you can publish XAML and windows phone courses it will be a great thing
    thank you very much

  • Deeposys Il
    Deeposys Il 5 years ago

    Can you please explain why you need to create an instance of HelloRemotingService if you do not use it? It will be created automatically once client connects to the server. Isn't it?
    Another thing is that they ask to use security flag in RegisterChannel method.. you didn't say anything about it.

  • 卡门山迪亚戈
    卡门山迪亚戈 5 years ago

    Dear Venkat,where could I get the slides for this tutorial,since I am trying to translate all these in to Chinese