Part 2 Creating a remoting service and a web service
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.
Sir, you Are mental Giant or forte or Genius!
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 .
it is asking for welknown array to retrieve the value
RemotingConfiguration.GetRegisteredWellKnownServiceTypes(typeof(
Helloremotingservice.Helloremotingsevice), "Getmessage", WellKnownObjectMode.Singleton);,,in this part
Hey venkat m getting error
while i try to implement same,can you please help me
I am so glad that these meatballs have now been replaced by WebAPI
6 years later, i have a doubt, "The Channel.TCP was discontinued?"
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)
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
i didn't find my exe file in debug folder.
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
Hi Venkat,
Really appreciate your efforts. Great videos.
Can u please create a playlist for MVVM in WPF.
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: }"
@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?
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.
Really great explanation ..😊👍👍
Da si ziv i zdrav :D
Genius at work
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.
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.
superb videos.....
非常有用,感谢,赞
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.
Hey negi , I got the same error here can u pls tell me how to run my application through IIS ant ??
Pragim technologies!!!
Very Nicely explained. Thank you sir for your effort :)
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 !
Much better than anyother tutorial on Pliralsight
awesome series and explanation !!!!
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?
Supper video sir
pls come with wcf Rest
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!
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!!
Thanks for your efforts.I get a clear idea in remoting services.
Yep ! very Clear explanations and Voice sounds is very radiophonic; keep on doing so - congratulation We are happy !!!
Good, nice vedio...
Sir what is HelloWebServiceSoapClient from where this comes in HelloWebClient.HelloWebServiceSoapClient
Please write a tutorial for Web API.
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.
You are the man. Kudos and God bless, so glad I found your channel.
Keep up the good work!
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
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.
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!
:)
I dnt have the web service template in my studio. Could you help
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.
Super voice Quality and explanation
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.
+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
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.
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.?
At first I didn't know where you were going with this video series.
Now I know.....
Very well done.
Thank you.
sir is that enough to create wcf without using remote and web service like this this seems tedious?
Very Nice work.
Very nicely done. Thank you.
So much good, this video!!
Muy pero muy bueno la explicación!.. Muchas gracias.
Thanks a lot
Thank you sir very good vedio..
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?
Thanks for making me understand the concepts. Really helpful.
What a great way of explaining... Thank you sir
Wonderfull tutorial Congrats !!!!
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
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.
Dear Venkat,where could I get the slides for this tutorial,since I am trying to translate all these in to Chinese
csharp-video-tutorials.blogspot.in/p/wcf-slides.html