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 - Configuring Services with Endpoints

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

Follow the Discussion

  • 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
  • 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.
  • 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.
  • 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.
  • Here is a quick tutorial on how to get your certificate store working for WCF:

    http://www.codeplex.com/WCFSecurity/Wiki/View.aspx?title=How%20To%20-%20Create%20and%20Install%20Temporary%20Certificates%20in%20WCF%20for%20Message%20Security%20During%20Development


    It worked for me.
  • GWGW
    It's the endpoint wizard.  If you create the endpoints manually, the certificate references are not created.
  • 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?
  • 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.
  • 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! 
  • 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

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

  • 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

  • Aaronatarikg Hardcore

    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.

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

  • 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

     

  • 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

  • , 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

  • PrakyPraky

    hi there is no download link for this video.

  • brentbrent

    download link is missing for this video

  • AsafAsaf

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

  • VipinVipin

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

  • PriyankPriyank

    Thanks Asaf, your workaround worked prefectly for me

  • MattMatt

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

  • sandesh daddisandesh daddi

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

  • robrob


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

  • SebSeb

    why so many broken videos on this site? :(

  • JralJral

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

  • JralJral

    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.

  • mohammadmohammad

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

  • 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)?

  • Notes:

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

     

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

  • 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 RawatVineet Rawat

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

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.