Microsoft Office Tutorials and References
In Depth Information
Listing 2-4. WCF Service Library Interface Class
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.Data;
namespace WcfDataProvider
{
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the
// interface name "IServerStatus" in both the code and config file together.
[ServiceContract]
public interface IServerStatus
{
[OperationContract]
DataTable GetServerStatusDetails();
}
}
10.
Build the WCF project in release mode, and make sure you have no errors.
11.
Create a local folder in your file system under C:\, and name it wcfServicehost .
12.
Make a folder called bin .
13.
Copy the WcfDataProvider.dll file to the bin folder.
14.
Make sure Network service and iis_iUsrs users have read & execute permissions
on the root folder.
15.
Create a file named VisioWcfServices.svc under the wcfServicehost folder, and add
the following text:
<% @ServiceHost Service="WcfDataProvider.ServerStatus" %>
16.
Create a Web.config file in the same folder, and copy the code from Listing 2-5 to it.
Listing 2-5. WCF Data Provider Web.config File Settings
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<services>
<service behaviorConfiguration="WcfDataProvider.ServerStatusBehavior"
name="WcfDataProvider.ServerStatus">
<endpoint address="" binding="basicHttpBinding"
contract="WcfDataProvider.IServerStatus" />
 
Search JabSto ::




Custom Search