Тёмный

Part 24 Self hosting a wcf service in console application 

kudvenkat
Подписаться 830 тыс.
Просмотров 93 тыс.
50% 1

Link for code samples used in the demo
csharp-video-tutorials.blogspo...
Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our RU-vid channel. Hope you can help.
/ @aarvikitchen5572
Link for all dot net and sql server video tutorial playlists
/ kudvenkat
In this video, we will discuss hosting a wcf service using a console application. Hosting a wcf service in any managed .net application is called as self hosting. Console applications, WPF applications, WinForms applications are all examples of managed .net applications.
Advantages of self hosting a wcf service in a console application
1. Very easy to setup. Specify the configuration in app.config file and with a few lines of code we have the service up and running.
2. Easy to debug as we don't have to attach a separate process that hosts the wcf service.
3. Supports all bindings and transport protocols.
4. Very flexible to control the lifetime of the services through the Open() and Close() methods of ServiceHost.
Disadvantages of self hosting a wcf service in a console application
1. The service is available for the clients only when the service host is running.
2. Self hosting does not support automatic message based activation that we get when hosted within IIS.
3. Custom code required.
In general, self-hosting is only suitable during the development and demonstration phase and not for hosting live wcf services.

Опубликовано:

 

23 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 31   
@TruthSeeker1608
@TruthSeeker1608 6 лет назад
Thank you so much. You are the perfect teacher, I wish all would teach like you do. You are unbelievable !!!
@giorgizhghamadze2922
@giorgizhghamadze2922 7 лет назад
One and the only kudvenka will save us all :)) thanks man! was really helpful!
@Csharp-video-tutorialsBlogspot
Thank you very much for taking time to give feedback. This means a lot. I am very glad you found the videos useful. I have organised all the Dot Net & SQL Server videos in to playlists, which could be useful to you ru-vid.complaylists?view=1&sort=dd If you need DVDs or to download all the videos for offline viewing please visit www.pragimtech.com/order.aspx Slides and Text Version of the videos can be found on my blog csharp-video-tutorials.blogspot.com Tips to effectively use my youtube channel. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-y780MwhY70s.html If you want to receive email alerts, when new videos are uploaded, please subscribe to my youtube channel. ru-vid.com If you like these videos, please click on the THUMBS UP button below the video. May I ask you for a favor. I want these tutorials to be helpful for as many people as possible. Please share the link with your friends and family who you think would also benefit from them. Good Luck Venkat
@shamim083
@shamim083 4 года назад
I guess you haven't worked with wcf service at all.
@saagarsoni3
@saagarsoni3 10 лет назад
thnx a lot sir...your simple technique of explaining concept's are very nice
@user-zu5bk7cv4c
@user-zu5bk7cv4c 6 лет назад
Thank you, kudvenkat :)
@eswarvoleti1410
@eswarvoleti1410 7 лет назад
Hi Sir I seen your videos that are really awesome but i have doubt that is can we add classes to wcf service references because when we access classes that are not declared in services methods it impossible to access in web forms. is there any chance to retrive those classes in webform. thank you sir.
@typicalgymrat22
@typicalgymrat22 8 лет назад
what would i have to set for addresses if i wanted to consume the client form another computer on the same network?
@paxobi9322
@paxobi9322 6 лет назад
Thank U for sharing. If I don't want to use TCP but rather use HTTP, what is the Base Address I must use to specify endpoints?
@AutomateTechPro
@AutomateTechPro 10 лет назад
Hi Sir, I have one doubt in this session. You have created one End point for netTCP. Is it necessary to create an end point for metadata too?
@aarfeenraza3344
@aarfeenraza3344 10 лет назад
Sir your vedios are very helpful.. Will you please post vedios on SQL server reporting services
@akhilb3907
@akhilb3907 10 лет назад
Hi venkat. Thank you very much for your tutorial .could you plese provide us some tutorials on pay pal integration .i have googled for it .but those are not working for me please can you help in this regard by providing videos on it
@paxobi9322
@paxobi9322 6 лет назад
To test the Server, if browser to localhost:8080 , do you see a link ending with ?wsdl for netTcpBinding ?
@EricK-bh2sk
@EricK-bh2sk 7 лет назад
Hi Sir, following your guide, it work perfectly. Can you share me, how can I configure it, if I want the service host run on 1 computer, and client run on other computer, under intranet network. Thanks in advance
@mateusbaoba
@mateusbaoba 7 лет назад
You could try to replace the "localhost" string to the "server machine" ip... like this: WebReference.MyService myService = new WebReference.MyService(); myService .Url = myService .Url.Replace("localhost", "192.168.0.10"); I found some good reference here: nicksnettravels.builttoroam.com/post/2009/07/16/WCF-on-Windows-Mobile-and-NET-Compact-Framework.aspx
@josephgarronegj
@josephgarronegj 10 лет назад
Hello thx for this very helpful playlist. How can I do to host the service on an other interface than localhost in order to make the service avalible outside the system?
@stephanerichard3979
@stephanerichard3979 10 лет назад
Hi Joseph, to answer you question if you right click the project name and select properties from that context menu, in the window that will appear you can click on web and there you will see what you need to put your application on the web. The instructions for doing so on the window are pretty self explanatory. I hope this helps.
@josephgarronegj
@josephgarronegj 10 лет назад
Thx for the help!
@chihabahmed5207
@chihabahmed5207 7 лет назад
Hi i dont get the idea of self-hosting i know its like you own a car so this service runs on your server not someone elses server. can you explain to me what is exactly a self hosted services. and how do i host the database of that self-hosted services. for instance if i want to make a self-hostes services for a mobile app, i have to have a database, where am i going to host that database. because its a slef-hosted. thanks a lot
@monibratabhattacharjee8530
@monibratabhattacharjee8530 10 лет назад
Please check the video part 23...Don't know ehy its not showing...whenever trying to see that either its moving towards 24 or 22. Thanks !!
@nitingoswami1959
@nitingoswami1959 4 года назад
How I can update wcf which consumes by console application ?please help
@nilugupta2606
@nilugupta2606 10 лет назад
sir greate video thakns a lot... sir sir want to asked some thing .. sir how to host our service into the ftp (software ) for inter operable pl sir give this solution if have free time any time ... thanks ...
@amanrohilla9547
@amanrohilla9547 2 года назад
How to use ssl with self host wcf service?
@sanket7620
@sanket7620 6 лет назад
Getting this error "Attempted to read or write protected memory. This is often an indication that other memory is corrupt"
@Radha238
@Radha238 9 лет назад
Hi,I get below error when try to run the service. HTTP could not register URL +:8080/. Your process does not have access rights to this namespace (see go.microsoft.com/fwlink/?LinkId=70353 for details). could please let me know the reason.
@alexeypankov9232
@alexeypankov9232 9 лет назад
Radha238 Run the program with administrator rights
@mateusbaoba
@mateusbaoba 7 лет назад
To me, it was necessery to open the doors... in my case i used 8731 and 8732, to do this you need open command prompt as administrator and then run the netsh commands: netsh http add urlacl url=+:8732/ user=[UserPermission] *[UserPermission] means te user that can get access in your services.. so in my case, i opened to Everyone ("Todos" in my language)...
@EgiRoka
@EgiRoka 5 лет назад
no endpoints were defined in the service element.'
@priyankabansal6123
@priyankabansal6123 8 лет назад
I am getting There was an error downloading 'localhost:8080'. The underlying connection was closed: The connection was closed unexpectedly. Metadata contains a reference that cannot be resolved: 'localhost:8080/'. An error occurred while receiving the HTTP response to localhost:8080/. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details. The underlying connection was closed: An unexpected error occurred on a receive. Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. An existing connection was forcibly closed by the remote host If the service is defined in the current solution, try building the solution and adding the service reference again. while trying to add service reference to the wcf service in the WindowsClient. Can you please suggest something ? Thanks
@deyanstoyanov8130
@deyanstoyanov8130 7 лет назад
Hello I am getting the same error. Do you have a decision ? Thanks
@berkarslan
@berkarslan 7 лет назад
Wrong man.. You can add Non-Http Activation feature and use the non http bindings in the IIS hosted environment..
Далее
БАССЕЙНЫ ПО ЦВЕТАМ ЧЕЛЛЕНДЖ !
38:20
ASP NET Core in process hosting
9:32
Просмотров 436 тыс.
Liskov: The Liskov Substitution Principle
4:23
Просмотров 20 тыс.
Part 27   Hosting a wcf service in a windows service
10:40
This Free AI Video Tool Brings Characters to Life
10:32
How to Run Betrayal in Settlers League
29:37
Просмотров 4 тыс.
Stored procedures with output parameters   Part 19
18:20
Просмотров 774 тыс.
Crowdstruck (Windows Outage) - Computerphile
14:42
Просмотров 113 тыс.