That’s a fun title, eh? Let’s see if the keywords improve on it.
Keywords: Service SVC is undefined, SVC 404 Not Found, AJAX WCF JQuery, SVC file 404.3, SVC in browser, Windows Server 2008 and WCF, IIS7
No, guess not.
I finally began my trip down JQuery Road, thinking it will be a useful tool in conjunction with WCF for some cool Sueetie v.Next functionality. I spent hours trying to connect JQuery with a WCF .SVC service on my Sueetie development site, so hopefully sharing my solution will help someone else.
The problem was compounded by the fact that while investigating Rick Strahl’s excellent JQuery sample solution using the Visual Studio Web Server, JQuery and WCFs worked perfectly. So I became sidetracked thinking it was an IIS7 binding issue to http://sueetie on my standalone Windows 2008 Server.
I banged my head against a "’SueetieService’ is Underfined" error for the longest time.
Then, thanks to Fiddler 2, I discovered that I was getting a 404 when trying to browse the .SVC file, as in http://sueetie/SueetieService.SVC. Again, I could browse .SVCs in Rick Strahl’s project using the Visual Studio Web Server just fine.
It turned out that my solution was adding WCF Activation in Windows Server 2008’s Features for .NET Framework 3.0 as shown below.
Afterward, browsing to http://sueetie/SueetieService.svc worked successfully.
For completeness sake, here is my working <system.serviceModel /> web.config area.
<behavior name="SueetieServiceAspNetAjaxBehavior" >
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpGetEnabled="true" />
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
There! Hopefully that will save someone else a few hours a head-banging finding their way into the light with JQuery and WCF.