Silverlight 2.0 Application Development with LINQ to SQL and a WCF Service - Troubleshooting configurations: continued
(Page 6 of 6 )
These troubleshooting configurations are continued from the previous section.
Silverlight application configurations:
Configure the Silverlight application (DemoSL.Web) to the same IIS root as the WCF service discussed above (and also with the same options). This is just to minimize errors during development. However, it could be totally different during deployment.
Make sure that MIME types are added as shown below

Make sure that you add “Service reference” to the WCF project in the current solution for better debugging capabilities.
Make sure that “ClientAccessPolicy.xml” is added to IIS root (usually, c:inetpubwwwroot) as follows:
<?xml version="1.0" encoding="utf-8" ?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="*">
<domain uri="*" />
</allow-from>
<grant-to>
<resource include-subpaths="true" path="/" />
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IEmpService" maxBufferSize="65536"
maxReceivedMessageSize="65536">
<security mode="None" />
</binding>
<binding name="BasicHttpBinding_IEmpService1" maxBufferSize="65536"
maxReceivedMessageSize="65536">
<security mode="None" />
</binding>
<binding name="BasicHttpBinding_IEmpService2" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost/DemoEmpService/EmpService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IEmpService"
contract="DemoSL.EmpService.IEmpService" name="BasicHttpBinding_IEmpService" />
<endpoint address="http://vwin2k3/DemoEmpService/EmpService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IEmpService2"
contract="EmpService.IEmpService" name="BasicHttpBinding_IEmpService1" />
</client>
</system.serviceModel>
</configuration>
In my upcoming articles, we will see more and more examples of Silverlight 2.0 development together with LINQ to SQL and WCF. I hope you enjoyed the article and any suggestions, bugs, errors, enhancements etc. are highly appreciated at http://jagchat.spaces.live.com
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |