Search code examples
iiscompact-frameworkwindows-ce

.NET Compact Framework 3.5 consuming .NET 4.0 Web Service


I'm using Visual Studio 2008 with target platform Windows CE using .NET Compact Framework 3.5 and trying to consume an ASP.NET WebService which is running on .NET 4.0

During the generation of the web reference I can see this method so I know it's picking it up no problem.

I've invoked the web method as follows:

PrintSvc.Default d = new Optiplan.ShopFloor.EmbeddedClient.PrintSvc.Default();
d.PrintBarTenderFile(printerName,
                                    printFileName,
                                    printerQuantity,
                                    "TEST",
                                    "",
                                    "",
                                    "",
                                    "",
                                    "",
                                    "",
                                    "",
                                    "",
                                    "TEAM",
                                    ""
                                    );

Which an web exception is occurs and you look at response which is an 404. There isn't anything I can see in the IIS logs and I can manually execute this via web browser so the parameters are correct.


Solution

  • After few hours of banging my head against an wall, I've found out that when the Windows CE device is connected to the USB Cradle it reverts all traffic to localhost and you need to set network in Windows Mobile Device Center.