Click here to Skip to main content
15,891,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello every body

i have developed a wcf app using .net framework 4.0,
i have not problem with it and it is working without error in my local machine.
but i changed the machine and deploye it in a server that has rooted IIS (with public IP).

public interface IOssServices
    {
        [OperationContract]
        [WebGet(UriTemplate = "GetPlates",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        IList<string> GetPlates();
        [OperationContract]
        [WebGet(UriTemplate = "GetTasks",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        OssResponeMessage GetTasks();
        [OperationContract]
        [WebInvoke(Method = "POST",
            UriTemplate = "Login",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        OssResponeMessage Login(OssRequestMessage request);
        [OperationContract]
        [WebInvoke(Method = "POST",
            UriTemplate = "GetTaskDetail",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        OssResponeMessage GetTaskDetail(OssRequestMessage request);
    }


calling each of this operations and my local pc will not face error but in server and by an ip gives me error except the
GetPlates
operation. i mean that only this operation works fine either in my pc or server.

this is my web.config

XML
<system.serviceModel>
    <behaviors>
      <endpointBehaviors>
        <behavior name="httpBehavior">
          <webHttp />
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior name="">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    <services>

      <service name="JooyaServices.OssServices">
        <endpoint address=""
                     behaviorConfiguration="httpBehavior"
                     binding="webHttpBinding"
                     contract="JooyaServices.IOssServices" />
      </service>

      <service name="JooyaServices.TrackingServices">
        <endpoint address=""
                     behaviorConfiguration="httpBehavior"
                     binding="webHttpBinding"
                     contract="JooyaServices.ITrackingServices" />
      </service>
    </services>
  </system.serviceModel>



calling the method causes error in iis and this is the event log output:

WebHost failed to process a request.
 Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/39508813
 Exception: System.Web.HttpException (0x80004005): There was no channel actively listening at 'http://OssServer.local:16025/OssServices.svc/GetTasks'. This is often caused by an incorrect address URI. Ensure that the address to which the message is sent matches an address on which a service is listening. ---> 
System.ServiceModel.EndpointNotFoundException: There was no channel actively listening at 'http://OssServer.local:16025/OssServices.svc/GetTasks'. This is often caused by an incorrect address URI. Ensure that the address to which the message is sent matches an address on which a service is listening.
   at System.ServiceModel.Activation.HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result)
   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest()
   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest()
   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)
 Process Name: w3wp
 Process ID: 7560


anybody know why this happend and how can i use my services ?
tanx in advance.
sorry for weak english.
Posted
Updated 9-Nov-11 23:46pm
v2
Comments
RaisKazi 10-Nov-11 5:47am    
It's strange your one GET method "GetPlates" is working and other "GetTasks" throwing error(Not considering POST methods for now).

Can you post by what URL you are accessing your GET method "GetPlates".

1 solution

You have given web.config file. Can you please give both client side config and server side web.config files? If you are defining end points in the config file then the address of client should match with address of your server.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900