[Mono-list] Web Service Extensions in mono 1.9.1

Danny dgortonii at gmail.com
Tue Oct 28 02:33:21 EDT 2008


Firstly, I hope this is the right list.  If not please redirect me as 
needed.

I've been searching on the mono site and the 'Tubes in general for a 
couple of days now and can't seem to nail down anything definitive about 
how to get web service extensions working on Ubuntu Linux 8.04.  I've 
seen some posts stating that it's not available on Ubuntu, and others 
stating that it should be in mono 1.9.1, which is what I have.  I 
suspect I'm not knowledgeable enough about it to use the right key words 
- the obvious ones don't help much.

Specifically, I'm trying to consume a web service from JavaScript (using 
Dojo if it matters).  I have it working on Windows under IIS.  When I 
move it to mod_mono under Apache2 on Linux it fails with:

Failed to load httpHandler type 
`System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, 
Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35'

So System.Web.Extensions.dll obviously isn't there, and I could not 
locate it (any version of it) on the machine.

After not being able find any info on that assembly I tried copying the 
one from Windows over to my the web service bin, without much hope, and 
it actually worked, a little.  It would process an HTTPGET request, but 
fails on an HTTPPOST with a NullReferenceException originating down in
WebServiceData:

System.NullReferenceException: Object reference not set to an instance 
of an object
   at System.Web.Script.Services.WebServiceData.GetWebServiceData 
(System.Web.HttpContext context, System.String virtualPath, Boolean 
failIfNoData, Boolean pageMethods) [0x00000]
   at System.Web.Script.Services.WebServiceData.GetWebServiceData 
(System.Web.HttpContext context, System.String virtualPath) [0x00000]
   at System.Web.Script.Services.RestHandler.CreateHandler 
(System.Web.HttpContext context) [0x00000]
   at System.Web.Script.Services.RestHandlerFactory.GetHandler 
(System.Web.HttpContext context, System.String requestType, 
System.String url, System.String pathTranslated) [0x00000]
   at System.Web.Script.Services.ScriptHandlerFactory.GetHandler 
(System.Web.HttpContext context, System.String requestType, 
System.String url, System.String pathTranslated) [0x00000]
   at System.Web.HttpApplication.GetHandler (System.Web.HttpContext 
context, System.String url) [0x00000]
   at System.Web.HttpApplication+<>c__CompilerGenerated2.MoveNext () 
[0x00000]

I reflected that assembly and it looks like the only obvious thing that 
might cause this is a null context.  Not sure what might cause that.

It could very well be my web service configuration and/or implementation 
- at this point I'm not sure what to think.  I hacked the thing together 
from bits and pieces of info I found here and there.  I am very familiar 
with web services both server-side and client/proxy, but I'm fairly new 
to mono, mostly I just write apps on Windows and move them to Linux and 
they work (which rocks BTW), and I've never written a web service client 
in JavaScript before.  So I have too many unknowns to be able to deduce 
the solution on my own - but most things point to my mono setup.

However, I know it COULD work, and the current prototype I have on 
Windows kind of proves that.  Can anyone suggest how I might get this 
functionality working in this config?   I need to know if it SHOULD work 
before proceeding further because I must deploy to Linux and will have 
to tackle client-side data updates some other way if it's not possible. 
  More info on specific config settings, et al will be provided ASAP and 
as necessary.

Thanks in advance,
Danny


More information about the Mono-list mailing list