FILE WebService.svc.vb
Public Class WebService
Implements IWebService
Public Function Greetings(ByVal name As String) As String Implements IWebService.Greetings
Return "Greetings, dear " & name
End Function
End Class
FILE IWebService.vb
Imports System
Imports System.ServiceModel
<ServiceContract()>
Public Interface IWebService
<OperationContract()>
Function SendReport(ByVal name As String) As String
</Interface>
FILE Web.config
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="WebService">
<endpoint address="WebService" binding="basicHttpBinding" contract="IWebService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<!--
To browse web app root directory during debugging, set the value below to true.
Set to false before deployment to avoid disclosing web app folder information.
-->
<directoryBrowse enabled="true"/>
</system.webServer>
</configuration>
FILE WebService.svc
<%@ ServiceHost Language="VB" Debug="true" Service="WebService.WebService" CodeBehind="WebService.svc.vb" %>
I am currently hosting this service remotely in IIS 7(.5 possibly) and now I wish to integrate it into a web application. The web application is built using jquery and adheres to standard HTML5 guidelines. Numerous examples exist demonstrating the consumption of a WCF Service with javascript or AJAX. Therefore, I am seeking guidance on implementing code that accomplishes this, alongside necessary modifications to my web.config file (or any other adjustments required by the service) to enable this type of integration.