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.
public interface IServerStatus
DataTable GetServerStatusDetails();
Build the WCF project in release mode, and make sure you have no errors.
Create a local folder in your file system under C:\, and name it wcfServicehost .
Make a folder called bin .
Copy the WcfDataProvider.dll file to the bin folder.
Make sure Network service and iis_iUsrs users have read & execute permissions
on the root folder.
Create a file named VisioWcfServices.svc under the wcfServicehost folder, and add
the following text:
<% @ServiceHost Service="WcfDataProvider.ServerStatus" %>
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"?>
<service behaviorConfiguration="WcfDataProvider.ServerStatusBehavior"
<endpoint address="" binding="basicHttpBinding"
contract="WcfDataProvider.IServerStatus" />
Search JabSto ::

Custom Search