Cannot find WCF service link namespace

I have a local WCF service in my solution that I refer to. However, my controller class cannot get the service namespace? Traditionally, I would like to use svcUtil to write a wrapper class, but since it is internal, I could just add a “Service Reference”, touch the namespace, and then just call my service (ie var service = new QServiceReference.MyClass ();)

I can’t show the pictures, so here for my solution,

Solution -> Services Folder -> QService Folder QService Project -> Web Folder -> Zipporah.Queuing.Web (project) -> Services References -> QServiceReference -> Controllers Folder -> KioskProcessController 

My class (KioskProcessController) looks like this:

 using System.Web.Mvc; using Zipporah.Queuing.Web.QServiceReference; (ITS THIS NAMESPACE REFERENCE THAT DOES NOT WORK) namespace Zipporah.Queuing.Web.Controllers { public class KioskProcessController : ZipController { public ActionResult Index() { return View(); } public ViewResult Queue() { return View(); } public ViewResult PreAppointment() { return View(); } } } 

Sorry if this structure is not clear (as already mentioned, I can not post photos)

Any tips or thoughts would be most appreciated?

+4
source share
1 answer

The namespace created for your WCF client may be different from what you are using . In the Solution Explorer window, when you select the Service References folder, you can enable the Show All Files button, and then go to the Reference.cs file, as shown in the screenshot below:

enter image description here

Then, in the Reference.cs file, you can find the actual generated namespace with the Add Service Reference dialog box, which you can use in another file with the using statement.

+18
source

All Articles