В моей локальной системе все работает нормально. Проблема началась, когда я развернулся на сервере.Перепробовал много вещей не повезло.Мы будем благодарны за любую помощь.
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
<Services>
<asp:ServiceReference Path="~/Services/WebChatWCFService.svc" />
</Services>
</asp:ScriptManager>
WebChatWCFService.ClientRecieveMessage(vSno, TokenNo, UpdateMessageSuccessCallBack, UpdateMessageFaileCallBack);
Ошибка: WebChatWCFService не определено.
Это мой раздел веб-конфигурации:
<behaviors>
<endpointBehaviors>
<behavior name="WebChatWCFServiceAspNetAjaxBehavior">
<enableWebScript />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="Ileverage2k10.Services.WebChatWCFServiceAspNetAjaxBehavior">
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<services>
<service name="Ileverage2k10.Services.WebChatWCFService" behaviorConfiguration="Ileverage2k10.Services.WebChatWCFServiceAspNetAjaxBehavior">
<endpoint address="" behaviorConfiguration="WebChatWCFServiceAspNetAjaxBehavior" binding="webHttpBinding" contract="Ileverage2k10.Services.WebChatWCFService" />
</service>
</services>
В моем WCF: Пространство имен: Ileverage2k10.Services
[ServiceContract(Namespace = "",
SessionMode = SessionMode.Allowed)]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class WebChatWCFService
{
[OperationContract]
public List<DClientTempDataContract> ClientRecieveMessage(int vSno, int vTokenNo)
{
List<DClientTempDataContract> result = new List<DClientTempDataContract>();
List<dclienttemp> messageList =
LinqClinetFilter.ClientReceiveMessage(vSno, vTokenNo);
foreach (dclienttemp msg in messageList)
{
result.Add(new DClientTempDataContract(msg));
}
return result;
}
}