endpoint.tv Screencast - Self-hosting WCF Services

Sign in to queue

The Discussion

  • User profile image
    Just after the 7:00 mark in the video the presenter runs into an unhandled exception. He stops the video to fix it, but we have no idea what he did. It looks like the instance of the service is still running and grabbing port 8080 first. How does he fix this?
  • User profile image
    I noticed it too. I think the error was because there are endpoints with the same Port number in the other solution. Its just a guess.
    Aaron didn't do anything, and as said he just hit Ctrl+f5. I did the same and it didn't throw up any exception. But an explanation from Aaron on the cause of this would be great.
  • User profile image
    Thanks for posting.
    I'm sure you are right about the Port number. I know there is a way to have multiple endpoints on the same port number. For this demo you are correct, he just 'ignored' the error by hitting ctrl+f5. I thought there might have been some more simple that I was missing.
  • User profile image
    Hi Aaron,
     The videos are simply superb !  It would be really nice if you could explain how to fix the error when you tried to launch the service using F5.
  • User profile image

    Hi Everyone!

    You can find Solution of the problem with explanation of its originin in the article

    Preventing the WCF Service Host from launching in Visual Studio 2008

    at Rick Rainey's Blog

    at http://blogs.msdn.com/rickrain/archive/2008/02/14/Preventing-the-WCF-Service-Host-from-launching-in-Visual-Studio-2008.aspx

    Good luck!


  • User profile image

    hi can any body help me in this video as I am not able to add the the reference name in my code that " using evalserviceLibrary" even I added the refernce to the application. so I am getting exception in the line

    servicehost host = new servicehost(typeof(evalservice);


    please help me

  • User profile image

    By default the WcfServieLibrary project you have will run it's own WCF host when any project in the solution starts.  To disable it, right click on the Wcf project, select properties, select the tab "Wcf Options", and then uncheck "Start WCF Service Host ...."  Save the change and try again.


  • User profile image

    Hi! I am new in WCf and this videos have helped me a lot. But a have a problem, i created my own service doing everything showed in this video series and everything work properly in a console application. But when i do the same in a window form application i get a time out exception when execute client.submitPlayer(object1);.
    I even tried running the wcftextclient and everything worked properly is only from
    my window application
    Does any body can help me? any idea wil be wellcome
    this is my code:
    host.Open();        Console.WriteLine("The Service is up and running with the following endpoints: ");        foreach (ServiceEndpoint se in host.Description.Endpoints)            Console.WriteLine(se.Address.ToString());        Console.WriteLine("Press <Enter> to add a new object... ");        Console.ReadLine();        myServiceClient client = new myServiceClient();        myInfoService object1 = new myInfoService();        myInfoService object2 = new myInfoService();        object1.id = Guid.NewGuid().ToString();        object1.player = "MyPlayer";        object1.comments = "This come from host application";        object1.XMLPlayerInfo = "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\r\n<PLAYER_INFO>\r\n  <ID>1</ID>\r\n  <PLAYER></PLAYER>\r\n  <ADDRESS>http://localhost:5000/myservice/ws</ADDRESS>\r\n  <AUTOMATION_SYSTEM>1</AUTOMATION_SYSTEM>\r\n  <POJECTION_SYSTEM>2</POJECTION_SYSTEM>\r\n  <SEND_PULSE_INTERVAL>0</SEND_PULSE_INTERVAL>\r\n  <AUTOMATION_TYPE>2</AUTOMATION_TYPE>\r\n  <TYPE_CONNECTION>RS-232</TYPE_CONNECTION>\r\n  <CURRENT_PLAYLIST_ID>5327</CURRENT_PLAYLIST_ID>\r\n  <PLAYLIST_AVAILABLE>True</PLAYLIST_AVAILABLE>\r\n  <SHOWTIME_INFO_AVAILABLE>True</SHOWTIME_INFO_AVAILABLE>\r\n  <GENERAL_LOAD_DATA_ERROR>False</GENERAL_LOAD_DATA_ERROR>\r\n  <PLAYER_INFO_AVAILABLE>True</PLAYER_INFO_AVAILABLE>\r\n  <IP_ADDRESS_PROJECTOR></IP_ADDRESS_PROJECTOR>\r\n  <PORT_PROJECTOR>7000</PORT_PROJECTOR>\r\n  <ENABLED>True</ENABLED>\r\n</PLAYER_INFO>";        client.submitPlayer(object1);        Console.WriteLine("object added successfully!!!");        Console.WriteLine("Press <Enter> to show the object... ");        Console.ReadLine();        object2 = client.GetPlayer();        Console.WriteLine(object2.id);        Console.WriteLine(object2.player);        Console.WriteLine(object2.comments);        Console.WriteLine(object2.XMLPlayerInfo);        Console.ReadLine();        host.Close();
    this is the exception tha i get:
    ex.Message = "This request operation sent to net.tcp://localhost:8888/playerservice
    did not receive a reply within the configured timeout (00:01:00).  
    The time allotted to this operation may have been a portion of a longer timeout.
    This may be because the service is st...

  • User profile image
    John Doe

    It would be great if you post your videos to download in other formats than wmv. thanks.

  • User profile image
    Sumesh KT

    Thanks , the presentation is great!!

  • User profile image

    Hai All,
    I have tried to download this series of video's(Windows Communication Foundation Screencasts). I have downloaded some of the video's. Most of the video's are not download. This is give error message as "Media failure. try reloading the page or visiting the main site for assistance".
    I have reloaded those pages which pages got error, it still no use.
    Any one guide me to download all the video's in this series. Do the needful ASAP..

  • User profile image
    Gustavo Garcia

    If it can help someone... I need to put a attribute to every endpoints setted in this screencast. Here is some info:
    By the way, Great screencasts!!!

Add Your 2 Cents