[Mono-list] Error in web service method.

beniniva@csr.unibo.it beniniva@csr.unibo.it
Mon, 19 Jul 2004 14:25:58 +0200


This message is in MIME format.

---MOQ10902399580534b78d7dd1b03f8623b6c129501f4c
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit



Please help me!

This example of Web Service run with success on Windows with VisualStudio and
IIS, but when I try to run on Linux (FC2) with Mono (Beta1),I get this error :
"The remote server returned an error: (500) Internal Server Error.
Object reference not set to an instance of an object"


The method that gives problem is TestLogin......Why? Which is the correct
solution?

WebService code is :LoginService.asmx.cs


Thanks,

Valentina.
---MOQ10902399580534b78d7dd1b03f8623b6c129501f4c
Content-Type: text/x-csharp; name="LoginService.asmx.cs"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="LoginService.asmx.cs"

dXNpbmcgU3lzdGVtOw0KdXNpbmcgU3lzdGVtLkNvbGxlY3Rpb25zOw0KdXNpbmcgU3lzdGVtLkNv
bXBvbmVudE1vZGVsOw0KdXNpbmcgU3lzdGVtLkRhdGE7DQp1c2luZyBTeXN0ZW0uRGlhZ25vc3Rp
Y3M7DQp1c2luZyBTeXN0ZW0uV2ViOw0KdXNpbmcgU3lzdGVtLldlYi5TZXJ2aWNlczsNCnVzaW5n
IFN5c3RlbS5EYXRhLk9kYmM7DQoNCm5hbWVzcGFjZSBMb2dpblNlcnZpY2UNCnsNCgkvLy8gPHN1
bW1hcnk+DQoJLy8vIFN1bW1hcnkgZGVzY3JpcHRpb24gZm9yIFNlcnZpY2UxLg0KCS8vLyA8L3N1
bW1hcnk+DQoJcHVibGljIGNsYXNzIExvZ2luU2VydmljZSA6IFN5c3RlbS5XZWIuU2VydmljZXMu
V2ViU2VydmljZQ0KCXsNCgkJcHVibGljIExvZ2luU2VydmljZSgpDQoJCXsNCgkJCS8vQ09ERUdF
TjogVGhpcyBjYWxsIGlzIHJlcXVpcmVkIGJ5IHRoZSBBU1AuTkVUIFdlYiBTZXJ2aWNlcyBEZXNp
Z25lcg0KCQk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