Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

endpoint.tv Screencast - Hosting WCF Services in IIS

Download

Right click “Save as…”

  • WMV (WMV Video)
Welcome to the latest video in the weekly WF/WCF Screencast series.

In this short video, CSD MVP Aaron Skonnard from PluralSight guides the viewer through how to host your WCF Service in IIS. We will start with the simple WCF service that we created in the first screencast, hosting it as an ASP.NET svc file. Aaron then demonstrates adding a couple endpoints (for greater detail, see the screencast on creating WCF endpoints) and accessing the service. Once we have our WCF service hosted in ASP.NET, we add it as an application to IIS for consumption.

For additional information on WCF, please check out the WCF Dev Center on MSDN and the .NET Endpoint team blog. For more information on classes offered by Aaron and the PluralSight folks, check out their catalog of instructor led courses and new online courses that cover a variety of Microsoft technologies, ranging from .NET v3.5 to WSS to BizTalk server.

Follow the Discussion

  • Thanks for a great back to basics webcast, i have just doing my first WCF project and this covered most of the things I had to find on the web, thanks again, keep up the great work.

  • Fine. now i have learnt to create and using services from previous and this tutorial...

    But In this tutorial also you have taught to add values and get values by using WebClientTest tool...

    I would like to know how to do such operations in programmatic way like;

    --------
    I want my website to add some strings to COMMENTS and SUBMITTER when I click a button on my web page

    After that I want to receive those data into my c# desktop application  by the get() method in the service running under IIS

    I know I should create a Channel for this, but I'm new to WCF and my mind is totally blank about this....

    So is there any guy whos willing to help me? I have googled alot for such a tut, but i was unable to find...So please help me
  • Hi Yaasir,

    I'll preface this with saying that I'm not a WCF technical guru by any stretch of the imagination. Smiley So the statements below are made from my prior [somewhat limited] experience with this particular technology. That being said...

    The screencast here uses the WCF Client Test tool because it's focus is primarily on the creation and hosting of the service, not on the client consumption of the service (a full-trip tutorial would probably go about an hour or so - we're trying to keep these a bit more digestable). What I believe you would want to do is to take this screencast's walkthrough of service hosting in IIS, and create the client to consume those services; while this doesn't help you right now, we will be posting a screencast 'Creating your First WCF Client' in about three weeks, after the first four WF screencasts complete.

    To answer, your question, though, I believe what you're really looking for is the "How to: Create a Basic Web-Style Service" tutorial, which covers hosting of WCF in IIS (also covered here), but also covers how to create the ASP.NET web client to interact with that service. For the second part (consuming the service from a desktop application), you can refer to the 'WCF Client Overview' section of the documentation (there's also a general "How to: Create a WCF Client" tutorial, but I - personally - got lost in all the source code when I had tried using it).

    I think that those tutorials hit on your questions, and may help frame the general 'how do I create consumers of that web service' question...if you want to move beyond the documentation, there are a variety of code samples and online hands-on labs that my help you out as well - the WCF overview labs up there are pretty old (they work from the 3.0 tooling), and we're building new HOLs now, and hoping to have new ones up within the next couple months.

    As one last point, if you're new to WCF - these screencasts are great for explaining HOW to do something, but I would highly checking out Ron Jacob's Endpoint.tv screencast covering "You're First WCF Service" on the WHY you do these things.

    Does this help?
    Cliff

  • One last item - I also came across a Channel 9 screencast on consuming WCF services in a WPF client. It's for VS2005, so some things have changed since then, but it may help give you a visual walkthrough on how someone would wire up a client to the service.
  • Greg JonesRavenRip Hold on technology.. I'm coming!!!
    If this is your first application in IIS then you may need to map .svc to IIS

  • Thanks RR.  I was getting a 403 error and didn't know why.  Mapping .svc to IIS did the trick.
  • Sagarsagarjv Sagar
    Excellent series with simple example for WCF beginers..

    Thanks a ton!
  • VaVa

    I get this message when I try to invoke the service using wcftestclient. It works well with Visual Studio development server.

    I have set up my wcf service exactly as shown in the video. I am on xp and using IIS 5.1.

    There was no endpoint listening at http://<Fully Qualified Machine Name>/evalSite/Eval.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

    Please suggest.

  • VaVa

    Sad

  • Hi,

    Plz help me with IIS. whenever I am trying to host my application in IIS I am getting error. even I used the same steps in this video but I created virtual directory instead in IIS. I culd not find new application option in IIS.

  • Aaronatarikg Hardcore

    Actually it's been going good.  I've learnt more things as a beginner. Thanks.

  • At the point when I run the wcftestclient utility I get the following error:

     

    "Failed to invoke the service. Possible causes: The service is offline or inaccessible; the client-side configuration does not match the proxy; the existing proxy is invalid. Refer to the stack trace for more detail. You can try to recover by starting a new proxy, restoring to default configuration, or refreshing the service."

     

    I did everything EXACTLY the same up to this point? What could be happening???

  • Hi,

    How does SOAP see the parameter of the method SubmitEval. In this case, the parameter is a class. But how can I use the WSDL to consume from a JavaApplication and use this Parameter?

     

     

  • excellent, simple and very useful 

  • brentbrent

    the download link is missing for this video

  • RudraRudra

    Very nice article . Helps in understanding the setup part very nicely

  • MGNMGN

    hi
    i am unable to download the file.[Hosting WCF Services in IIS]
    Give some idea
     

  • rajeshrajesh

    can we programatically configure endpoints if the service being hosted in iis
     

  • babakbabak

    the download link is missing for this video and last video !!!?

  • SasyregakSasyregak

    @babak:Right click on WMV hyperlink and do save target as...you can download it.

  • Sandesh DaddiSandesh Daddi

    A very short and sweet and digestible screen cast
    thanks,
    Sandesh Daddi
    www.sanshark.com

  • triangulitotriangulito

    I'm having a problem in which when I try to configure the web.config file it doesn't recognize the service that's in the dll file. Is there anyway to map it or force it to recognize it?

  • stvnstvn

    Nice clean tutorial. Helping me out a bunch.The only thing I don't get is what happens with the endpoints in the app.config of the service library? Are they still needed there or can you remove them and just use the endpoints created in the web.config of the web app? 
    thanks.

  • stvnstvn

    @triangulito: did you reference the library project from your web project ?
    (right click on project > Add reference > reference the service library dll)

  • DavidDavid

    Error: Cannot import wsdl:binding
    Look here if you are getting the above error:
    http://geekswithblogs.net/higgins/archive/2008/02/15/119593.aspx

  • Debasish DasDebasish Das

    Hello Everyone ,
    I am a new bee in WCF. Can anybody plz help me, how to host in IIS 5.1, as i am using XP SP3. I tried to host it like as normal ASP.NET application by creating virtual directory, but its not working.

    it gives me the following error while i browse the .svc file.

    //*************************************
    Server Application Unavailable

    The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.

    Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.

    //*****************************

    every thing working fine but in this screen cast, the WCF service is Hosted in IIS7.

    Please help me out of this problem.

  • chaitanyachaitanya


    Error Summary
    HTTP Error 500.19 - Internal Server Error

    The requested page cannot be accessed because the related configuration data for the page is invalid.


    Detailed Error Information



    Module

    IIS Web Core



    Notification

    BeginRequest



    Handler

    Not yet determined



    Error Code

    0x80070005



    Config Error

    Cannot read configuration file due to insufficient permissions



    Config File

    \\?\C:\Users\Chaitanya\Documents\Visual Studio 2010\Projects\EvalServiceSite\web.config





    Requested URL

    http://localhost:80/evalservicesite/eval.svc



    Physical Path

    C:\Users\Chaitanya\Documents\Visual Studio 2010\Projects\EvalServiceSite\eval.svc



    Logon Method

    Not yet determined



    Logon User

    Not yet determined




    Config Source -1:
    0:


    Links and More Information This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
    View more information »

  • damodardamodar

    Excellent Article!!!

    Saved lot of my time ... Keep it up

    Thanks again

    Damodar
    co-foudner
    www.icrglabs.com

  • vishalvishal

    I am not able to download or view this tutorial after 1.12 minutes...
    can any one give me this video....

  • JasonJason

    chaitanya, I experienced the problem. My solution was to add the website to c:\inetpub\wwwroot\EvalServiceSite instead of the default location of VisualStudio\Websites\EvalServiceSite. I hope this helps even though it was 4 months ago.

  • LuisLuis

    I have the same problem of vishal, I cant download or see this video. It stops downloading at 1.1MB

    Also when playing at 1.12 minutes.


    Its not the only one video with problem, many of the WCF videos have the same problem.

  • AlexAlex

    Thanks for the video

  • ErocEroc

    i got the same problem as triangulito, and i have add the reference and modify the svc mapping the EvalService,so what's wrong?

  • ErocEroc

    i got the same problem as triangulito, and i have add the reference and modify the svc mapping the EvalService,so what's wrong?

  • FredFred

    The errors in these tutorials are getting old. I click on "Edit WCF Configuration" and the endpoint window pops up but has no reference to my service. I've reference the dll in the EvalServiceLibrary.

    This was after troubleshooting the X509 Cert error and the port error in the last video tutorial

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.