Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3937612
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:05:21+00:00 2026-05-20T00:05:21+00:00

I am trying to setup an ASPX page to call a WCF servcie thorugh

  • 0

I am trying to setup an ASPX page to call a WCF servcie thorugh a ScriptManager. For some reason when I call the “SpinStitch.Services.Chat.IChatter.CreateChatSession” method of the servcie I get this error “The server method ‘CreateChatSession’ failed.’ I had a breakpoint set on the CreateChatSession method in the server, but it never gets that far. I am not sure what I have setup wrong. I have looked at 100 samples of how to set this up and they all look about the same. Jsut noe the <%=ChatSessionObject %>
property is coming from the ASPX code behind and is creating a JSON serialized object. Any thoughts?

Interface:
using System.ServiceModel;
using System.ServiceModel.Web;
namespace SpinStitch.Services.Chat
{
    [ServiceContract(Namespace = "SpinStitch.Services.Chat")]
    public interface IChatter
    {

        [OperationContract]
        bool CreateChatSession(Domain.Objects.ChatSession chat);

    }

}

Service:
using System.ServiceModel.Activation;
using SpinStitch.Domain.Adapters;

namespace SpinStitch.Services.Chat
{
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class Chatter : IChatter
    {

        public bool CreateChatSession(Domain.Objects.ChatSession chat)
        {
            return ChatSessionAdapter.CreateChatSession(chat) > 0;
        }
    }

}

Web.Config of hosted service:
<system.serviceModel>

    <behaviors>
      <endpointBehaviors>
        <behavior name="ChatBehaviorConfig">
          <enableWebScript/>         
        </behavior>

      </endpointBehaviors>
            <serviceBehaviors>
                        <behavior name="ChatBehavior">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>

        </behavior>

            </serviceBehaviors>
        </behaviors>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true">
    </serviceHostingEnvironment>

    <services>

      <service behaviorConfiguration="ChatBehavior" name="SpinStitch.Services.Chat.Chatter">
        <endpoint address="http://servicesdev.spinstitch.com/Chat.svc" binding="webHttpBinding" behaviorConfiguration="ChatBehaviorConfig"  bindingConfiguration="" name="Chat" contract="SpinStitch.Services.Chat.IChatter" />
      </service>
        </services>
    </system.serviceModel>

Web Config of Ajax App:
<system.serviceModel>
    <bindings>
      <customBinding>
        <binding name="Chat">
          <textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
            messageVersion="Soap12" writeEncoding="utf-8">
            <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
              maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          </textMessageEncoding>
        </binding>
      </customBinding>
          </bindings>
    <client>
           <endpoint binding="customBinding" bindingConfiguration="Chat"
        contract="ServicesDevChat.IChatter" name="Chat" />
    </client>
  </system.serviceModel>


ASPX:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="AnonymousUser.aspx.vb" Inherits="TestArea_ChatTest_AnonymousUser" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<script language="javascript" type="text/javascript">
function pageLoad() {
    var chatSession = <%=ChatSessionObject %>
    SpinStitch.Services.Chat.IChatter.CreateChatSession(chatSession, OnRetrieveLoadData, failed)
}

function OnRetrieveLoadData(recordInserted) {
    alert(recordInserted)
}

function failed(sender, e) {
    alert(sender._message);
}
</script>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        <Services>
            <asp:ServiceReference Path="http://servicesdev.spinstitch.com/chat.svc" />
        </Services>

        </asp:ScriptManager>



    </div>
    </form>
</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T00:05:22+00:00Added an answer on May 20, 2026 at 12:05 am

    This failed becuase the service was running in a separate domain. Under .Net 3.5 you could not cross domains. Thanks to everyone for looking!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to setup some validation on the add to cart button for the dropdown
Im trying to setup my asp.net mvc page like the following image: The header
I'm trying to setup some friendly URLs on a SharePoint website. I know that
Here's my setup. I'm using .NET: I have a Main.aspx lets call it. That
Trying to setup a CodeIgniter based project for local development (LAMP stack), and once
Trying to setup and get going with the RestKit library for a cocoa project
I'm trying to setup a private beta for a site that I'm working on.
I am trying to setup a shared authentication system on a build server. We
I'm trying to setup a continuous integration build on TFS 2008. In the project
I am trying to setup SSRS 2008 on Windows Server 2008. It seems to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.