Part 24 Self hosting a wcf service in console application

preview_player
Показать описание
Link for code samples used in the demo

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 YouTube channel. Hope you can help.

Link for all dot net and sql server video tutorial playlists

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
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.
Рекомендации по теме
Комментарии
Автор

Thank you so much. You are the perfect teacher, I wish all would teach like you do. You are unbelievable !!!

TruthSeeker
Автор

One and the only kudvenka will save us all :)) thanks man! was really helpful!

giorgizhghamadze
Автор

thnx a lot sir...your simple technique of explaining concept's are very nice

saagarsoni
Автор

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.

eswarvoleti
Автор

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?

paxobi
Автор

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?

Arunkumar_Techie
Автор

Sir your vedios are very helpful.. Will you please post vedios on SQL server reporting services

aarfeenraza
Автор

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?

josephgarronegj
Автор

what would i have to set for addresses if i wanted to consume the client form another computer on the same network?

typicalgymrat
Автор

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

akhilb
Автор

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

chihabahmed
Автор

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 ...

nilugupta
Автор

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

EricK-bhsk
Автор

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 !!

monibratabhattacharjee
Автор

How I can update wcf which consumes by console application ?please help

nitingoswami
Автор

Hi, I get below error when try to run the service.

could please let me know the reason.

Radha
Автор

How to use ssl with self host wcf service?

amanrohilla
Автор

Getting this error "Attempted to read or write protected memory. This is often an indication that other memory is corrupt"

sanket
Автор

I am getting

The underlying connection was closed: The connection was closed unexpectedly.
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

priyankabansal
Автор

Wrong man.. You can add Non-Http Activation feature and use the non http bindings in the IIS hosted environment..

berkarslan
join shbcf.ru