.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

The service cannot be started. This service has no endpoint defined....But it has!?!

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :ASP.Net
Hi Foks,I'm following this tutorial on how to create RESTful services in WCF:http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.htmlI would like to test the created service using the WCF Default Test Client, but when I run the application (F5) the service does not start and I get this message:"The service cannot be started. This service has no endpoint defined. Please add at least one endpoint for the service in config file and try again."However I do have endpoints defined for this service..I also have two other services running in the same application, which work fine:This is the relevant portion of my app.config:<behaviors>              <serviceBehaviors>                        <behavior name="WCF_Lib_Default.Service1Behavior">                   <serviceMetadata httpGetEnabled="True"/>                   <serviceDebug includeExceptionDetailInFaults="False" />             &nbs

View Complete Post

More Related Resource Links

How to set and map a Method in the Service file with endpoint elements and binding elements

Hi all, I have created a service file like OSService.svc in that i have two methods like one is FileUpload and FileDownload for e.g :- [WebInvoke(UriTemplate = "/fileupload/{fileName}" , Method = "POST" )]         [OperationContract]         void FileUpload(string fileName, Stream fileContents); same as Filedownload also. People you may know these methods are inside the interface of service file what you are using i'e i have created a interface as IOSService.cs. So, what i need now is i want to write separate endpoint for FileUpload and Filedownload.Because i want to set separate value for receiveTimeout  and openTimeout for the Fileupload and FileDownload process in binding section in the web.config file itself. The below code was i'm using right now but still i'm not able to the set separate value of endpoint elements in the bindings. EndPoint Section:- <endpoint name = "endPoint1"  address  = "localhost:8000/OSService.svc/" bindingConfiguration = "TransactionalTCP"   binding  = "netTcpBinding"          contract = "IOSService"/> Binding Section:-  <binding name = "TransactionalTCP"  transactionFlow = "true"   /&

SSMS 2008 - Shows Service Status as Stopped Though Service is started

Hi, I have a SQL Server 2008 - Active/Passive Cluster. The issue I am facing here is that, when I do a Failover from Node A to Node B, All the Cluster Services come online and the SQL Services are running (checked using the SQL Configuration Manager and Services console). However when I open the management studio, The Service status Indicator shows a Red Block mark against the ServerName and the SQL Server Agent. When I try connecting to the server remotely from another server, the status is displayed correctly in the SSMS(i.e the green sign with the arrow) .  This issue happens when I locally login to the server and connect using ssms. I am an Admin on both the boxes and even the service account with which the services run also has admin privileges. Any pointers? Thanks,

Get the error 'The Workstation service has not been started' when trying to create a new content d

I am running SharePoint on a standalone machine, and the workstation service is up and running. Restarting the service makes no difference. Rebooting the machine hasn't helped either. No errors are being written to the event log.

Calling one endpoint from another endpoint in the same service

Hi, I have a WCF service host Im hosting in IIS that defines a few services and one of those services has a number of endpoints. The endpoints that belong to the same service are there to let me specify different contracts and they all use the same binding and behaviour. For the most part it works fine until a specific situation occurs: The service gets stuck when one of the endpoints tries to make a call to another endpoint in the same service. Consider the following example: <service behaviorConfiguration="GeneralServiceBehavior" name="Base"> <endpoint address="/Addresses" binding="wsHttpBinding" bindingConfiguration="wsHttpBindingConfig" contract="CommonObjects.IAddresss" /> <endpoint address="/Attachments" binding="wsHttpBinding" bindingConfiguration="wsHttpBindingConfig" contract="CommonObjects.IAttachments" /> </service> In the example above if a call is made from IAttachments implementor back to this service to access the IAddress endpoint I get stuck in what seems to be a deadlock until I get a timeout on the calling thread and then I see the call come through to the IAddress endpoint, but at that point its already too late as the channel is closed. I have looked at the InstanceContext and ConcurrencyMode. This particular servic

Incorrect hostname in EndPoint location in WSDL for a service with multiple bindings and with multip

We have a WCF web service that is exposed through multiple bindings.  The site is  accessed through multiple IP Addresses/Hostnames (internet/intranet).  Some of the bindings use http transport while others use https transport. The web application is configured to use .NET 4.0 with multipleSiteBindingsEnabled="true" so that we shouldn't have problems with multiple ip addresses/hostnames. What we see is that when the WSDL is accessed using a http based URL (external), the hostnames in the endpoint addresses for http transport based bindings in WSDL are correct (ie, they use the hostname header from the request) while the hostnames in the endpoint addresses for https transport based bindings in the WSDL are incorrect (ie, they do not use the hostname header in the request - they seem to use the hostname from the first available binding in IIS for that scheme and end up with the local machine names/ip addresses in the URL).   We could work around by setting the external hostname/ip in the first binding in IIS for the respective scheme, but then WSDLs accessed from intranet clients would have wrong URLS now. This happens the other way around as well, ie, when the WSDL is accessed using https, the https based addresses are fine, but http addresses in the WSDL are not correct. It looks like hostname header is used only for WSDL endpoint addre

WCF : How to prevent an endpoint from being published in the service WSDL?

Suppose I have a WCF service which has 2 endpoints A and B. I want to enable mex/wsdl on this service but my requirement is that B should not be published in the WSDL. So to say B is only for internal purpose and clients should never be aware of it. Is there a way (most probably somehow using IWsdlExporterExtension), to remove this endpoint B from being published in the metadata?

Can't Add Service Reference in VS 2010 to a net.tcp endpoint

I've got a service running (well, it doesn't crash), but when I try to add a Service Reference to it, I keep getting Metadata contains a reference that cannot be resolved: 'net.tcp://localhost:55555/mex'. Metadata contains a reference that cannot be resolved: 'net.tcp://localhost:55555/mex'. If the service is defined in the current solution, try building the solution and adding the service reference again. The pertinent parts of my config file are:   <netTcpBinding> <binding name="ReliableDuplexBinding" closeTimeout="00:00:10" openTimeout="00:00:10" receiveTimeout="00:00:30" sendTimeout="00:00:15" maxBufferPoolSize="1048576" maxBufferSize="262144" maxReceivedMessageSize="262144"> <readerQuotas maxDepth="33" maxStringContentLength="100000" maxArrayLength="131072" maxBytesPerRead="262144" maxNameTableCharCount="54000" /> <reliableSession inactivityTimeout="05:00:00" enabled="true" /> <security mode="None"> <transport> <extendedProtectionPolicy policyEnforcement="Never" /> </transport> </security> </binding> </netTcpBinding> <behaviors> <serviceBehaviors> <behavior nam

WCF TCP-IP End Point Error : The message could not be dispatched because the service at the endpoint

"The message could not be dispatched because the service at the endpoint address 'net.tcp://' is unavailable for the protocol of the address." This is the Exception I am getting when I am trying to access my WCF Service with 'TCP-IP' end point. My Service Web.Config file is as follows. <system.serviceModel>     <bindings>       <webHttpBinding>         <binding name="JsonWebBinding">           <security mode="TransportCredentialOnly">             <transport clientCredentialType="Windows"></transport>           </security>         </binding>       </webHttpBinding>     </bindings>     <services>       <service behaviorConfiguration="SampleBehaviour" name="SeP.Library.ServiceLibrary.TerritoryMgt">         <endpoint address="" behaviorConfiguration="jsonEndPointBehaviour" binding="webHttpBinding" bindingConfiguration="JsonWebBinding"                &nbs

How to ignore SQLAgent$SBSMonitoring service from being reported 'not started' as this is a featur


On MS SBS 2003 Server Performance Report the SQLAgent$SBSMonitoring service is reported as "auto-started services not running". This is a feature, just as with Microsoft .NET Framework NGEN v4.0.30319_X86 in this thread.

How do I ignore this service in the way the .NET Framework NGEN service is ignored through web.config? I suppose it's something like adding this line to the web.config:

<add key="SERVICES_TO_IGNORE" value="SysmonLog;clr_optimization_v4.0.30319_32"/>

...but with the right reference to the SQLAgent$SBSMONITORING service. The example above is for the .NET Framework NGEN service.

Kind regards,
G from NL

RESTful WCF Service endpoint not being found by client


I created a RESTful WCF service which I plan to call from a client app (a custom toolpart in a Sharepoint web part), but while I can access everything just fine from a browser the client throws this error:

EndpointNotFoundException: There was no endpoint listening at http://mymachine:3217/Services/CtmsService.svc that could accept the
message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
---> System.Net.WebException: The remote server returned an error: (404) Not Found.

My service's contract looks like this:

public interface ICtmsService
  [WebGet(UriTemplate = "/GetAllSites")]
  Dictionary<string, int?> GetAllSites();
...and the configuration looks like this: (which is more complicated due to needing dependency injection via Spring.NET to work)


WCF routing Service and ServiceSecurityContext in endpoint behavior


I'm trying to fetch the caller information in endpoint behavior applied for a routing service. The ServiceSecurityContext appears to be null.

How to fetch principal in endpoint behavior of routing service? I was able to fetch the thread principal in serviceAuthorization behavior of the same routing service.

Integrated windows authentication was used.

Determining the user running a cmd shell started from a web service


So I've got an application which must be accessed via only a single user via command line for licensing reasons. My solution was to make a web service running under that valid user which is called from my other applications which need to use this remote application. Seems simple and straightforward.


The interfacing method between client and server in this web service sends only two parameters, the path to the source file for the remote application to use and the destination to place the result after it is completed and returns a string as a result. The web service creates a new CMD process using ProcessStartInfo generated from the values of the parameters. I'm redirecting the input and output streams of this process so I can get the resulting output from the call to the application to determine success/failure back on the client side, so I have UseShellExecute set to false.


So remember, this web service is running under the account that has license permissions to this application. I confirmed this by adding Environment.UserName to the return string in the method which starts the process executing the command line.


However, when I test this it is acting like this isn't the proper user. I've quintuple checked that I am using the proper user and that the application behaves properly when I make the command li

WCF service JSON endpoint with certificate



I just spend some day trying to create a WCF service that expose a JSON service authentified with a certificate. I've try some example found on the web but didn't succeed. I need to use the JSON connection with a Java client. I use WCF because in the further client they will be windows clients too.

I presume that I've made some mistakes in my configuration file. Does someone has already make this kind of endpoint to communicate with a java client with succes ? I'm pretty sure it's possible.

Thx for any pointers

BC30002: Type 'service' is not defined.


I am having trouble instantiating proxy object for webservice


SVCObj As MyService = New MyService

Here is the checks i did to make sure everything is fine

my proxy dll is in /bin folder.

Also I tried an alternative by creating webReference and no luck either.

My webservice is created using 3.5 .NET Framework and the consumer is using 1.1 .NET framework.

Webservice on its own is working fine.


Thanks for your help! 

SharePoint Search Service is not getting started. Its showing Starting status in Central Administart



I am using SharePoint 2007 and I am trying to start SharePoint Search Service on my server throgh central Administrator.But its not getting started and its showing starting status there.

I think this service got stucked. Please let me know If you have any solution for this.



Rajavi B


2010 WCF Service App template not creating endpoint node


I have been learning WCF in .NET 3.5 and VS 2008 and Tuesday I started a new job and we are using VS 2010.  When I create a project in 2010 using the WCF Service Application template the IDE does not create a services/service/endpoint element in the app config (VS 2008 did, and then I would edit that element for the details that I wanted the endpoint to have.)

In the 2010 project I can accept all the defaults and it works fine, but I dont see how I can control/specify the details of the endpoint.  Maybe there is there guidance out there how to work with the new no-endpoint template?  Thanks

Details on what I do to get the default WCF Service Application template project working: I host it in IIS7, and call it from a Windows form (using its wsdl link to create a Service Reference in the Windows project, and then an instance of the service in the Form's code behind) and it all works fine.  The create-Service-Reference process creates a client/endpoint element that uses basicHttpBinding, and a bindings/basicHttpBinding element.


There was no endpoint listening at ... when trying to reference an WCF service?




Help pls, I’m trying to add a service reference to a WCF service hosted on a server.

This is the url I’m using to try and add the service reference

(when I type this url into internet explorer the xml comes through fine)


This is the configuration file


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend