この JavaScript コードを実行すると、「0x800a1391 - JavaScript ランタイム エラー: 'InputService' は未定義です」と表示されます。
私は試してみましたが、欠けているものを理解できないようです...
Web.Config ファイル (Web サービス部分のみ):
  <system.serviceModel>
    <behaviors>
      <endpointBehaviors>
        <behavior name="CommonEndPointBehavior">
          <enableWebScript/>
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
    <services>
      <service name="InputService">
        <endpoint name="" address="" behaviorConfiguration="CommonEndPointBehavior" binding="webHttpBinding" contract="InputService" bindingConfiguration="webBinding" />
      </service>
    </services>
    <bindings>
      <webHttpBinding>
        <binding name="webBinding">
          <!--<security mode="Transport">-->
          <security mode="None"/>
        </binding>
      </webHttpBinding>
    </bindings>
  </system.serviceModel>
サービス:
[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class InputService
{
[OperationContract]
public string EditSiteElement(int siteid, string name, string url, string description, int siteorder, bool active)
{
    return Input.EditSiteElement(siteid, name, url, description, siteorder, active);
}
}
Web フォームの参照:
    scriptManagerProxy.Services.Add(new ServiceReference("~/User/Input.svc"));
    scriptManagerProxy.Scripts.Add(new ScriptReference("~/User/Input.js"));
JavaScript ファイル:
//When edit button is clicked on row.
function EditSiteElement(siteid) {
    InputService.GetSiteIdInfo(siteid, function (result) {
        var stuff = result.split('¤');
        $('[id$=TextBox_name]').val(stuff[0]);
        $('[id$=TextBox_link]').val(stuff[1]);
        $('[id$=TextBox_description]').val(stuff[2]);
        $('[id$=CheckBox_active]').prop('checked', (stuff[3] == 'True'));
        $('[id$=TextBox_order]').val(stuff[4]);
        //Open the dialog
        $("[id$=panel_Input]").dialog('open');
        SiteIdForSave = siteid;
    });
}