[Mono-aspnet-list] Needing a little help to get started hosting WCF on Mono 2.6.4 with Apache

Jan van der watt janvanderwatt at gmail.com
Tue Jul 13 23:34:54 EDT 2010


I've completed the calculator exampled of Getting Started with WCF
guide<http://msdn.microsoft.com/en-us/library/ms734712.aspx>on MSDN
and would now like to try this on Mono to benefit from the new
binary serialisation of DataSets which is, to my knowledge, not available
over SOAP of the old .NET remoting - which is actually my REAL issue.

I've read various lists and discussions and it seems that WCF should be
possible - I am obviously just missing something in the fundamentals.
However, there doesn't seem to be a simple guide to getting started with
hosting your first WCF service on Mono.

I've read:
- *Mono Olive: Introducing Windows Communication Foundation*
- http://mono-project.com/WCF
- http://noamlampert.blogspot.com/search/label/Mono

I am running openSuse 11.1 with Mono 2.6.4, Apache .

This is not a pre-compiled app and I have heaps of other aspx pages (in the
same application) that all work as expected.

Everything goes well until I try to use the "calculator.svc" service simply
by browing to it http://mytestserver/Calculator.svc, when I get the SOURCE
CODE in the file, instead of the service.

I've posted the following (and they are basically the files you get when you
start a new WFC service project in VS 2010):

web.config: http://pastebin.com/eu4RK5wV
ICalculator.cs: http://pastebin.com/dqycTgaU
Calculator.svc: http://pastebin.com/N5PpmpKJ
Calculator.svc.cs: http://pastebin.com/cXcuJw0X

If I try hosting it through XSP2, I get the error below - an indication that
there may be a namespace issue (but this example does work on .NET):

*Type WcfService.Calculator not found.*

*Description: *HTTP 500. Error processing request.

*Stack Trace:*

System.Web.HttpException: Type *WcfService.Calculator* not found.
  at System.ServiceModel.Channels.SvcHttpHandlerFactory.GetTypeFromBinAndConfig
(System.String typeName) [0x00000] in <filename unknown>:0
  at System.ServiceModel.Channels.SvcHttpHandlerFactory.LoadTypeFromSvc
(System.String path, System.String url, System.Web.HttpContext
context) [0x00000] in <filename unknown>:0
  at System.ServiceModel.Channels.SvcHttpHandlerFactory.GetHandler
(System.Web.HttpContext context, System.String requestType,
System.String url, System.String pathTranslated) [0x00000] in
<filename unknown>:0
  at System.Web.HttpApplication.GetHandler (System.Web.HttpContext
context, System.String url, Boolean ignoreContextHandler) [0x00000] in
<filename unknown>:0
  at System.Web.HttpApplication.GetHandler (System.Web.HttpContext
context, System.String url) [0x00000] in <filename unknown>:0
  at System.Web.HttpApplication+<Pipeline>c__Iterator2.MoveNext ()
[0x00000] in <filename unknown>:0

*Version information: *Mono Runtime Version: 2.6.4 (tarball Thu May 6
18:38:09 UTC 2010); ASP.NET Version: 2.0.50727.1433

So, any pointers/opinions will be welcome.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-aspnet-list/attachments/20100714/84333b3e/attachment-0001.html 

More information about the Mono-aspnet-list mailing list