Troubleshooting Silverlight 4.0 and WCF Deployment problems
There’s plenty to read on the internet how to manually troubleshoot deployment issues.
However, none try to automate this. Here’s a little troubleshooting script. It worked for me (up to a point). Feel free to extend this if you encounter further issues.
(Update: also have a look at WCF issues that only my hoster could address)
/* Alter to suit */
static String SERVICE_URL = "http://tempuri.org/Cosmo-Web-AuthenticationService.svc";
/* ================== TEST =========================== */
/* Test to see if System.ServiceModel.DomainServices.EntityFramework.dll is present */
Object tmpEF =
new System.ServiceModel.DomainServices.EntityFramework.LinqToEntitiesDomainServiceDescriptionProviderAttribute();
/* Test to see if System.ServiceModel.DomainServices.Server.dll is present */
public class TestService: System.ServiceModel.DomainServices.Server.DomainService
{
}
///* Test to see if System.ServiceModel.DomainServices.Hosting.dll is present */
//public class TestHost : System.ServiceModel.DomainServices.Hosting.DomainServiceHost
//{
// public TestHost(Type domainService, String uri)
// : base(domainService, new Uri[]{new Uri(uri)})
// {
// }
//}
public class User : System.ServiceModel.DomainServices.Server.ApplicationServices.UserBase
{
}
public class UserAuthenticationService :
System.ServiceModel.DomainServices.Server.ApplicationServices.AuthenticationBase
{
}
/* Test to see if System.ComponentModel.DataAnnotations.dll is present */
Object tmpAnnotation = new System.ComponentModel.DataAnnotations.KeyAttribute();
/* Test to see if System.ServiceModel.DomainServices.Server.dll is present */
Object tmpService = new TestService();
//* Test to see if System.ServiceModel.DomainServices.Hosting.dll is present */
System.ServiceModel.DomainServices.Hosting.DomainServiceHost tmpHost =
new System.ServiceModel.DomainServices.Hosting.DomainServiceHost(
typeof(UserAuthenticationService),
new Uri[] {new Uri(SERVICE_URL)});
Ensure that HTTP SVC handler has been configured in IIS, or this web.config setting will fix it
If the problem is in WCF itself, disable the multipleSiteBindingsEnabled and use the trace viewer.
<!-- serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" / --> after fixing that, I was able to find my problem with the trace viewer...
About this entry
You’re currently reading “ Troubleshooting Silverlight 4.0 and WCF Deployment problems ,” an entry on Chui's Counterpoint
- Published:
- 7.5.10 / 3pm
- Category:
- .Net, Web Services, WPF
No comments
Jump to comment form | comments rss [?] | trackback uri [?]