Part 29 Hosting wcf service in iis

Share
Embed
  • Published on Feb 11, 2014
  • Link for code samples used in the demo
    csharp-video-tutorials.blogspot.com/2014/02/part-29-hosting-wcf-service-in-iis_11.html
    Link for all dot net and sql server video tutorial playlists
    ru-clip.net/user/kudvenkatplaylists
    In this video we will discuss, hosting wcf service in IIS. This is continuation to Part 28. Please watch Part 28, before proceeding.
    To host a wcf service in IIS, create a file with .svc extension. This file contains ServiceHost directive. The Service attribute of ServiceHost directive, specifies which service this file points to. The service code can reside in
    1. The .svc file
    2. A separate assembly
    3. A file in App_Code folder
    The configuration for the wcf service goes in web.config file.
    The ServiceHost directive in .svc file is responsible for creating an instance of ServiceHost when required. There is no need to write code to instantiate and start ServiceHost, as we did with self hosting.

Comments • 49

  • Eko Radesna
    Eko Radesna 2 months ago

    Thank you for your tutorials. Great job!

  • omostan
    omostan 4 months ago

    Like lasmini rightly said, all your videos are excellently done and your teaching style has no match compared to the numerous tutorials all over RU-clip . Thank you very much!

  • Virgilio I. Morales
    Virgilio I. Morales 4 months ago

    Your videos are awesome. I just face a web service situation with the WFC and now I have better understanding

  • Semi Kolon
    Semi Kolon 5 months ago

    Thanks, a lot.

  • omar isaid
    omar isaid 7 months ago

    Thank you for your videos , in context of publishing WCF hosting iis this tutorial can give hand www.c-sharpcorner.com/article/hosting-wcf-service-on-iis/ , I am using Windows 10 , VS 2017 , IIS 10

  • aanchal sharma
    aanchal sharma 9 months ago

    Plz provide .svc or wcf service application video

  • ravi uniyal
    ravi uniyal 9 months ago

    i got an error
    The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
    Please help me out

    • vignesh naik
      vignesh naik 8 months ago

      Install wcf services in ur pc or server...error will get solved ..check on internet as how to install wcf services ...it is just a checkbox we have to check and install

  • Matthew Fleck
    Matthew Fleck Year ago

    Looks like I spoke too soon. After doing even more searching I found this info: File > New Project > Visual C# > Web > Previous Versions
    Then I can see the previous dialog options for Site, Razor, etc...

  • Matthew Fleck
    Matthew Fleck Year ago

    I love your videos and find that I come back to them when I need something new; like now. My problem is that I do not have the menu option to Add New Website only Add Existing Website. I cannot find any references to how to add this option. Any ideas? Thanks.

  • Strahinja Čolić

    I really hope you're making some money on RU-clip with your tutorials because what you do is literally a charity work. You are awesome!

  • worldcrafter
    worldcrafter Year ago

    thank you for making this as straightforward as possible. you are an incredible teacher.

  • Árpád G. Bondor
    Árpád G. Bondor 2 years ago

    HTTP Error 500.19 - Internal Server Error - HRESULT: 0x80070005
    Solution is here: support.microsoft.com/en-us/help/942055/-http-error-500.19-error-when-you-open-an-iis-7.0-webpage

    • Mujtaba
      Mujtaba 2 years ago

      @Arpad G. Bondor cool.

    • Árpád G. Bondor
      Árpád G. Bondor 2 years ago +1

      I had to add read and execute permission to the computername\IIS_IUSRS user on the project folder.
      I posted a link to the solution :).

    • Mujtaba
      Mujtaba 2 years ago

      select the applicable .net framework version in application pool. e.g. if ur workingon .net framework 4 then u must select that from app pool while creating the directory in IIS.. if ur framework version is not showing up then u will have to register it manually using command prompt

  • Rabia Dawood
    Rabia Dawood 2 years ago

    why you teacher not come to lowest level and then teach??? i dont know how will i do my project...

  • Hammad Shah
    Hammad Shah 2 years ago +1

    This is very helpful. Thanks for providing such tutorials. Can you please elaborate; how to host a WCF Rest service in IIS?

  • Nadia Hristova
    Nadia Hristova 3 years ago

    Thank you :)

  • LebanonJihad
    LebanonJihad 3 years ago

    keep the good work up

  • shadowtm
    shadowtm 4 years ago +1

    To all people getting HTTP Error 500.19 - Internal Server Error :
    I fixed mine by right clicking the entire sollution folder=>properties=>security and adding user group called IIS_IUSRS with all entitlements.
    I hope it solves your problems aswell :)

    • Aaqib Dar
      Aaqib Dar Year ago

      Do we need to click the entire solution folder with in .net framework, i mean i did the same but didn't find the security option

    • Tanuj Nayanam
      Tanuj Nayanam Year ago

      Thank you so much. It worked for me.

    • Preeti Agrawal
      Preeti Agrawal Year ago

      Thanks this worked for me too

  • Jesús Velázquez
    Jesús Velázquez 4 years ago +1

    I just landed here and it looks like a gold mine to me i'd like to share with my co workers but they don't understand english very well is there any spanish caption initiative (because i 'd like to start one) Regards.

  • Алексей Баркалов

    Same problem with HTTP Error 500.19 - Internal Server Error.
    Does anybody has a solution?

    • omar isaid
      omar isaid 7 months ago

      I think this tutorial can give hand www.c-sharpcorner.com/article/hosting-wcf-service-on-iis/ , I am using Windows 10 , VS 2017 , IIS 10 , and I got same error

    • Friendstwist
      Friendstwist Year ago

      Thank you Worked For me!!!!

    • Anton Koposov
      Anton Koposov 2 years ago

      I fix that on my Windows 10:
      1.Go to Control Panel - Programs and Features - Turn Windows features on or off.
      2.Select .NET Framework 4.6 Advanced Services - WCF Services
      3.Check HTTP Activation.
      4.OK done.

  • Mohammed Dawood Ansari
    Mohammed Dawood Ansari 4 years ago +1

    It seems it has been changed totally by VS 2013, I followed all the steps I have svc file available in my project as well by it contains Interface code of the service instead of Service Host directive shown in this video 2:24

  • pavan kumar M
    pavan kumar M 4 years ago +1

    I got an error. Can you please help me to resolve the issue. Below is the error details.
    The document was understood, but it could not be processed.
    - The WSDL document contains links that could not be resolved.
    - There was an error downloading 'pavan-pc/HelloService/HelloService.svc?xsd=xsd0'.
    - The underlying connection was closed: An unexpected error occurred on a receive.

  • Miguel Perez
    Miguel Perez 4 years ago +5

    I got an error: HTTP Error 500.19 - Internal Server Error, Error Code 0x80070005
    Config Error Cannot read configuration file due to insufficient permissions. how can solve this, and msdn its not helping me thank you

    • Daniel Cadena
      Daniel Cadena 11 months ago +1

      Thank you..

    • Anton Koposov
      Anton Koposov 2 years ago +1

      I fix that on my Windows 10:
      1.Go to Control Panel - Programs and Features - Turn Windows features on or off.
      2.Select .NET Framework 4.6 Advanced Services - WCF Services
      3.Check HTTP Activation.
      4.OK done.

  • Kevin Tshepo
    Kevin Tshepo 5 years ago

    I get an error message when trying to open the browser - HTTP Error 500.19 - Internal Server Error
    The requested page cannot be accessed because the related configuration data for the page is invalid

    • Resulov Ciraq
      Resulov Ciraq 7 months ago

      1.Go to Control Panel - Programs and Features - Turn Windows features on or off.

      2.Select .NET Framework 4.6 Advanced Services - WCF Services

      3.Check HTTP Activation.

    • Алексей Баркалов
      Алексей Баркалов 4 years ago +1

      @Charles Kangai What do you mean? There is no problem to run service from VS. This problem is when click Browse service from IIS Console.

    • Charles Kangai
      Charles Kangai 4 years ago

      Make sure to have the ASP.NET file open when you click the green button within Visual Studio to open the browser.

  • swarna sudheer kumar
    swarna sudheer kumar 5 years ago

    concept is crystal clear

  • Thaizer
    Thaizer 5 years ago

    Thank you so much for this channel.

  • Alphaa Interior Designs

    HOSTMELIVE - Flat 25% off on hosting at HostGator
    GETMELIVENOW - 1Cent for 1st minth hosting

  • Lei Yang
    Lei Yang 5 years ago

    Hi Venkat
    Previous in Part 3 , when you host web service in console application, you specify the metadata exchange endpoint, is it required also to specify the metadata exchange endpoint here?
    in the web.config file, the endpoint address is localhost:8080 as the base address, if deploy the web service to IIS, can i get access that web service through localhost:8080/HelloService url ? since we can access that using localhost/ Virtual directory / servicename.svc, why do we still need to specify endpoint here ?
    Thanks for that video, it is a great help

  • AutomaticDancer
    AutomaticDancer 5 years ago

    Can you please provide full source code for these examples? Following your instructions, I can see the service and add the reference in the client, however all operations on the service fail with timeout exceptions. Do you know why this could be?

  • Saagar Soni
    Saagar Soni 5 years ago +1

    thnx a lot sir

  • S Ramsay
    S Ramsay 5 years ago

    Hi Venkat, What is the best way to create a service in which many different applications can access it like php, asp.net, java, etc?

  • Iasmini Gomes
    Iasmini Gomes 5 years ago +6

    I liked all the videos very much. You are an excellent teacher, explains very well and detailed.

  • Said Hassan
    Said Hassan 5 years ago

    Thanks a lot

  • KND
    KND 5 years ago

    Thanks