WCF App Needs to be “Kick-started” by Cohabiting Web App
I'm dealing with a rather bizarre problem here and looking to see if anyone could offer a tip.
The Problem: When I try to consume the service from my local C# app, it fails when accessing the database. The DataMapper throws an exception saying it can't connect to the DB. But hold on a second! If I go into my browser and fire up the Silverlight app and then try my local C# app again, it works.
My initial thought was that there was some authentication issues (service uses Windows authentication, but database connection uses SQL Server authentication through a connection string), but I'm not sure this explains why starting the Silerlight app makes the rest of the stack operational. I've included some more data below about the environment in which I'm working.
Physical Architecture: On our app server (Windows Server 2003), we have a Silverlight app and a WCF service upon which the Silverlight app relies running in the same virtual directory (both IIS-hosted). The IIS application is configured to use Windows Authentication for service access. The backend is a SQL Server instance on a separate db server. On my development box, I'm working on an app that needs to consume the aforementioned WCF service.
Toolset: Silverlight 3, SQL 2005, WCF (.net 3.5), SQL 2005, IIS 6, IBatis DataMapper
Change all applications to use SQL connection while connecting to db. If it's helped so the problem with connection .
Try to change timeout time in connection string