endpoint.tv

endpoint.tv Screencast - Configuring Services with Endpoints

Download this episode

Description

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 configure your WCF Service with endpoints. This screencast uses the service you created last week to -a- introduce you to WCF adapters, bindings, and contracts, and -b- shows you how to use the WCF Service Configuration Editor to modify these endpoints and add new endpoints.

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.

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • buffcessna
      Aaron,

      I did this screencast and am getting a weird error when I try to run this.

      System.InvalidOperationException: Cannot load the X.509 certificate identity specified in the configuration.
         at System.ServiceModel.Description.ConfigLoader.LoadIdentity(IdentityElement element)
         at System.ServiceModel.Description.ConfigLoader.LoadServiceDescription(ServiceHostBase host, ServiceDescription description, ServiceElement serviceElement, Action`1 addBaseAddress)
         at System.ServiceModel.ServiceHostBase.LoadConfigurationSectionInternal(ConfigLoader configLoader, ServiceDescription description, ServiceElement serviceSection)
         at System.ServiceModel.ServiceHostBase.LoadConfigurationSectionInternal(ConfigLoader configLoader, ServiceDescription description, String configurationName)
         at System.ServiceModel.ServiceHostBase.ApplyConfiguration()
         at System.ServiceModel.ServiceHostBase.InitializeDescription(UriSchemeKeyedCollection baseAddresses)
         at System.ServiceModel.ServiceHost.InitializeDescription(Type serviceType, UriSchemeKeyedCollection baseAddresses)
         at System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses)
         at Microsoft.Tools.SvcHost.ServiceHostHelper.CreateServiceHost(Type type, ServiceKind kind)
         at Microsoft.Tools.SvcHost.ServiceHostHelper.OpenService(ServiceInfo info)

      Don't know what the deal is.  Any help to this noob would be greatly appreciated.

      Shane
    • cliff.​simpkins
      I think I've actually seen this before (I'm more a WF person than WCF) - check your binding; it sounds like you're using WsHttp, which will try to layer on WS-Security. Try changing that to a non-WS setting, or check the other binding options to see if it's specifying the use of a x509 cert in it somewhere.
    • ArnoudBM
      Same here. I fixed it by removing the <certificateReference> elements. (The original example from the first screencast didn't have it)

      But in this screencast, Aaron has in fact these settings in the app.config, so still not sure how his example works.
    • .NetRebel
      I have found something similar. Seems each time I create a named pipes endpoint, I get the above <certificateRefernce> elements auto included in the app.config. Deleting seems to address the issue.
    • sreekanthv
    • GW
      It's the endpoint wizard.  If you create the endpoints manually, the certificate references are not created.
    • scenicohio
      I  am new to WCF... I am getting the same error in my service... Tried deleting the endpoints configured thru the wizard, didnot work.

      Any Ideas how to make it work?
    • haridasabha​vana
      I got the same problem.
      The Visual Studi inserts an identity element autmatically after each binding
      Just comment this identity node and it will start working again.
    • Csabi
      Hi!

      When i try to create named pipe endpoint, i'm getting the following error: "Invalid URI: The hostname could not be parsed.". When i'm writing net.tcp instead of net.pipe, there is no error.

      Any ideas?
      Thx! 
    • breramon

      Open the app config wizard and see the WCF endpoint of the screen identify the dns locahost like this, if you put here solved, bye

    • crazy.NET

      Hi I am not able to play these videos when I am playing second time. plz help me

    • crazy.NET

      when I am trying to change the base address and add the tcpnet , piped end points my service is not working when I debug it it says error

    • atarikg

      Thanks for posting this video. It's quite instructive and informative.

       

      Could you post more advanced videos about WCF ? Because even they are good, people may need advanced ones to create advanced applications.

       

      Thanks.

    • Omair Khan

      Hi,

      i am new one on WCF.

      i am getting problem with this, whenever i go to app.config, then go to edit, and create another end point, on net name pipebinding

      when i enter the address:

      net.pipe://localhost:8888/evalservice

      it says that it is invalid addresss. now what i have to write here? as it says, that this address is invalid.

      the same address in my host address place. which i have wrote above. now what i have to do??

      please let me know thanks.

    • droid007

      Hi,

          I had the same problem. I got the solution from

      http://blogs.msdn.com/paulwh/archive/2007/05/04/addressaccessdeniedexception-http-could-not-register-url-http-8080.aspx

       

      The tool worked wonderfully. Thanks paul.

       

      Hope that helps

       

    • droid007

      Hi,

            I had the same problem. Please read this blog for the solution and the tool.

            Thanks Paul.

       

      http://blogs.msdn.com/paulwh/archive/2007/05/04/addressaccessdeniedexception-http-could-not-register-url-http-8080.aspx

       

      Hope that helps

       

      Thanks

      suresh

    • Nageshpeddi​nti

      , buffcessna wrote

      Aaron,

      I did this screencast and am getting a weird error when I try to run this.

      System.InvalidOperationException: Cannot load the X.509 certificate identity specified in the configuration.
         at System.ServiceModel.Description.ConfigLoader.LoadIdentity(IdentityElement element)
         at System.ServiceModel.Description.ConfigLoader.LoadServiceDescription(ServiceHostBase host, ServiceDescription description, ServiceElement serviceElement, Action`1 addBaseAddress)
         at System.ServiceModel.ServiceHostBase.LoadConfigurationSectionInternal(ConfigLoader configLoader, ServiceDescription description, ServiceElement serviceSection)
         at System.ServiceModel.ServiceHostBase.LoadConfigurationSectionInternal(ConfigLoader configLoader, ServiceDescription description, String configurationName)
         at System.ServiceModel.ServiceHostBase.ApplyConfiguration()
         at System.ServiceModel.ServiceHostBase.InitializeDescription(UriSchemeKeyedCollection baseAddresses)
         at System.ServiceModel.ServiceHost.InitializeDescription(Type serviceType, UriSchemeKeyedCollection baseAddresses)
         at System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses)
         at Microsoft.Tools.SvcHost.ServiceHostHelper.CreateServiceHost(Type type, ServiceKind kind)
         at Microsoft.Tools.SvcHost.ServiceHostHelper.OpenService(ServiceInfo info)

      Don't know what the deal is.  Any help to this noob would be greatly appreciated.

      Shane

      how can i download this video

    • Praky

      hi there is no download link for this video.

    • brent

      download link is missing for this video

    • Asaf

      Hi Guys,
      about the "System.InvalidOperationException: Cannot load the X.509 certificate"...
      just add an identity with a dns name under each of your endpoints:
      <identity>
         <dns value="localhost" />
      </identity>
      works just fine...
       

    • Vipin

      just add <dns value="localhost" /> in identity.

    • Priyank

      Thanks Asaf, your workaround worked prefectly for me

    • Matt

      The link to download for:
      endpoint.tv Screencast - Configuring Services with Endpoints
       
      Is missing.

    • sandesh daddi

      Now I really understood about the Instance context....
      Thank you Aaron
       
      Thanks, Sandesh Daddi, www.sanshark.com
       

    • rob


       Just make sure the first three endpoints are defined just like (below)

      <
      endpoint address="ws" binding="wsHttpBinding" contract="EvalServiceLibrary2.IEvalService "listenUriMode="Explicit" >
      <identity>
      <dns value="localhost"/><certificateReference storeName="My" storeLocation="LocalMachine"x509FindType="FindBySubjectDistinguishedName" />
      </identity>
      </endpoint >
       
      ***Note: This help is only based on this tutorial. "Please Test before deploying."
      Not responsible for losses or damages....

    • Seb

      why so many broken videos on this site? :(

    • Jral

      @buffcessna: To fix the "" exception, you need to add the tag into the tags. Here is my list of endpoints after fixing them up:
                                                                                                                                                                                                                                                                                                                                      
       

    • Jral

      Apologies, my above post is completley useless because all the code was stripped out...Vipin nailed it above...adding the tag into is the fix.

    • mohammad

       hi, icant download this file please help me . thank's

    • PatAtWork

      Why does the speaker use 'localhost' in his TCP and named pipe endpoints? Is this a requirement, or could they just as easily drop that part of the name (especially if the service is only running on the local computer)?

    • PatAtWork

      Notes:

      "TCP and named pipes are really only good when you have WCF on both ends."

       

    • CyrusDowney

      I ran into the "System.InvalidOperationException: Cannot load the X.509 certificate identity specified in the configuration." error as well.  At that point I added the <dns value="localhost"/> to any identity section that was missing it.

      I then got another error.  The erro was:

      "Please try changing the HTTP port to 8732 or running as Administrator.
      System.ServiceModel.AddressAccessDeniedException: HTTP could not register URL http://+:8080/evalservice/. Your process does not have access rights to this namespace"

      I tried changing the port.  Running as administrator fixed the issue, but I did not like that solution.  There was a link in the message that I followed.  "http://msdn.microsoft.com/en-us/library/ms733768.aspx"

      I ran the netsh program and ran this command to fix my problem.

      http add urlacl url=http://+:8080/evalservice/ user=DOMAIN\username.

      NOTE: to delete the urlacl, netsh, will need to be ran as administrator.

    • fr33

      It works great, except that <CertificateRefference> that makes u doubt yourself, if you skip some steps ... Thanks for the feedback, now is to keep looking these tuts Big Smile

    • Vineet Rawat

      The video is very effective. Thanks for making content this simple and convey the point

    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.