Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think this previous Stack Overflow question may help with your current question but not necessarily your problem.</p> <p><a href="https://stackoverflow.com/questions/4504301/error-cannot-import-wsdlport-with-svcutil">Error: Cannot import wsdl:port with svcutil</a></p> <p>You've created your WCF service and you've browsed to it in IIS so you're happy that it is working. The purpose of SVCUtil.exe is to generate classes that you can use in an application to interact with the service with compile time information on the contract members and methods.</p> <p>it performs the exact same function as adding a service reference in visual studio to consume the service.</p> <p>If your having trouble, i'd suggest just creating a simple console project in visual studio, adding a service reference and giving it the url of the service you've hosted in IIS. Then click "show all files" in the visual studio solution explorer and look at the reference.cs file it gives you. This will show you what information has been consumed from your service.</p> <p><strong>Edit</strong></p> <p>Hi Again, </p> <p>After going through all the comments below I'm starting to see more about your problem. I think you misunderstand what it is your doing when in fact you've already achieved what you want to achieve.</p> <p>The original project, the one you had with the WCF test client that worked did what you needed. It is a fully fledged WCF Service. All you needed to do was right click the solution in visual studio and publish it. If you then make sure that you make an IIS virtual directory point at your solution, through the publish wizard. Then when you run your project and then browse to that url, that will give you a service to consume for testing purposes.</p> <p>What you are doing at the moment, creating a WCF project, adding that DLL to a website project is fundamentally wrong: The example you followed, presumably this one : <a href="http://msdn.microsoft.com/en-us/library/ms733766.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ms733766.aspx</a> is about creating a WCF service in a web site project from scratch. Not about adding a pre-existing WCF project and hosting it.</p> <p>Your essentially trying to do one thing in two different ways together.</p> <p>Your current course of action is to either remove the DLL in your web project and then create the service there. Or host your current WCF service in IIS ( the project you downloaded from me or your original one)</p> <p>At this point you have a hosted service. Then usually you have an application to interact wtih it. This you found using svcutil and can be done in one of two ways:</p> <p>You create the console application and do "Add Service Reference" to the URL you have hosted in IIS.</p> <p>Or you use SVC Util.exe point it at the url which generates a class file you include in your console / application.</p> <p>I hope that clears things up about WCF and what stages to use various tools?</p> <p><strong>Edit 2</strong></p> <p>Just in case you don't get to the Chat:</p> <p>I still think theres something wrong with your original project. I'm not sure what you mean by the one with the DLL either? if that means your website project with the dll of the WCF project, then no not that one.</p> <p>I've taken the project I sent you earlier. I've hosed that in IIS so that when i browse to localhost/EvalService on my machine i get the standard</p> <p>"EvalService Service</p> <p>You have created a service.</p> <p>To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:"</p> <p>Once I had that set up i created a console application, "added service reference" in visual studio and it consumed teh service no problem.</p> <p>Try doing the above with the project I sent you and see how far you get.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload