Reuse WebServices through SubWeb

Topics: Web Client Software Factory
Oct 21, 2009 at 3:22 AM


I'm trying to reuse WebServices through SubWeb projects generated with the Business Module recipe. The webservices should be able to be called from JavaScript by using the usual ScriptManager reference. The webservices then use normal foundational modules through dependency injection.

So, the idea is to reuse the WebServices by creating a SubWeb Business Module in a separate shared folder, say:


Then any other WCSF WebApp should be able to include the SharedWebServices.csproj as a subweb and have the webservices available for use.

Is this even possible? Right now, every time I run the hosting WebApp, the WebServices from SharedWebServices.csproj are not recognized (say http://localhost/SharedWebServices/WebService1.asmx). My suspicion is that this is because the folder is not physically under the hosting WebApp root folder.

Is there a workaround for this?

The other two options that I'm considering are these:

- Make copies of the SharedWebServices on each one of the hosting web apps. However, this will create a maintenance nightmare that I would like to avoid.

- Make WebReference calls to the WebServices from SharedWebServices through simple proxy webservices that delegate to the SharedWebServices. However, in this case I would prefer to avoid creating the proxy web services and more important I would prefer not to incur in the extra network call that comes with the WebReference.

Hector Meneses