Silverlight 2.0 Application Development with LINQ to SQL and a WCF Service - Troubleshooting configurations
(Page 5 of 6 )
The following are the important configurations which you need to remember for troubleshooting errors during execution. All of the following are customized according to the current application (and are different from the default configurations added by Visual Studio).
“LINQ to SQL” configuration to work with WCF Service:
The “Serialization mode” property of “DataContext” should be changed to “Unidirectional” (using "LINQ to SQL Designer”).
the “ObjectTrackingEnabled” property of the “DataContext” object (in your programming) must always be set to “false.”
WCF configurations:
Configure the WCF service to the local IIS (with both Integrated Security and Anonymous access options in security) using the IIS snap-in. Make sure that it is configured with ASP.NET 2.0 runtime.
Make sure that connection string information is properly included in your web.config.
Make sure that the debug is set to true in web.config as shown below:
<compilation debug="true" strict="false" explicit="true">
<system.serviceModel>
<services>
<service behaviorConfiguration="DemoEmpService.EmpServiceBehavior"
name="DemoEmpService.EmpService">
<endpoint address="" binding="basicHttpBinding" contract="DemoEmpService.IEmpService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="DemoEmpService.EmpServiceBehavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above 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="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
The endpoint with “basicHTTPBinding” is very important in the above configuration.
It is better to have “includeExceptionDetailInFaults” set to “true” during development (shown above).
The “Dns” value should be properly provided (shown above).
Troubleshooting configurations are continued in the next section.
Next: Troubleshooting configurations: continued >>
More Windows Scripting Articles
More By Jagadish Chaterjee