Database Reference
In-Depth Information
Create a file named VisiowcfService.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 4-5 to it.
Listing 4-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" />
<host>
<baseAddresses>
<add baseAddress=" http://localhost:<portnumber>/
visiowcfservices.svc " />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WcfDataProvider.ServerStatusBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<connectionStrings>
<add name="VisioServicesConnectionString"
connectionString="Data Source=ServerName;Initial Catalog=Visi
oServices;Integrated Security=SSPI;User Id=uid;Password=pwd"
providerName="System.Data.SqlClient"/>
</connectionStrings>
</configuration>
After completing these steps, your folder structure and files should look similar to
those shown in Figure 4-62 .
 
Search WWH ::




Custom Search