0 votes
by (120 points)

Hi,
I am using trial version "RebexHttps-2017R2-Trial.exe" in my .Net CF v 2.0 to connect to webservice. Even before my app loads getting an error message "Could not load type 'Rebex.Net.HttpRequestCreator' from assembly 'Rebex.Http, Version=1.0.6291.0, Culture=neutral, PublicKeyToken=1C4638788972655D'."

Could you please help me to resolve this.

Thanks in advance.

by (120 points)
Thanks, for now I can't upgrade to CF3.5, let me check the alternative if any.

1 Answer

0 votes
by (70.2k points)

If "Could not load type ..." exception arise, your project doesn't reference the correct assemblies well. To solve the problem, follow these general steps:

  • Remove all previous references to Rebex assemblies from your project
  • Install "RebexHttps-2017R2-Trial.exe" into separate folder
  • Add reference to assemblies from directory netcf-2.0
  • In case of Rebex HTTP you have to reference:

    • Rebex.Common.dll
    • Rebex.Networking.dll
    • Rebex.Http.dll
  • Rebuild your project

If the above doesn't help, please install sample codes (installed by default). Choose any sample and try to run it. If it is not working, please let us know (it seems there is problem in installation).

by (120 points)
Thanks for the quicker response. I tried the necessary steps as suggested, no luck.

Also tried the sample under "vs2008-netcf-2.0\Https", copied this to my device (Pidion device), seeing the same error
"Could not load type 'Rebex.Net.HttpRequestCreator' from assembly 'Rebex.Http, Version=1.0.6291.0, Culture=neutral, PublicKeyToken=1C4638788972655D'."

Is there an earlier version I can use, basically I want to try this and make sure our company can go for licensed version or not.

Thanks
by (70.2k points)
Normally, you deploy the application to device (not copy). Can you please zip all files you copied to your device and send it to support@rebex.net - we will try it here to reproduce the issue.

We have no issues when running sample codes from the installation package. So there must be some difference.

If you open the sample solution and hit F5 (Run), are you able to run the sample in CF Emulator?
by (120 points)
I did copied the DLL and EXE to my device and app got loaded.

How can I attach the sample code I tried?
by (70.2k points)
On this forum, you cannot attach files. Please send it by mail to support@rebex.net.

Have you been able to run the sample in emulator? Just run from Visual Studio by hitting F5.
by (120 points)
Even it fails while running through Emulator, seeing message "There is no enough disk space". So that I tried copying all the DLL and EXE to my device and ran the executable in device.

Sent an separate mails with attachment.
by (70.2k points)
The ZIP file you have sent us contains some System.***.dll which are not necessary for running the sample. Also *.pdb and *.xml files are not necessary.  If you don't deploy these, you should fix "There is no enough disk space".

However, we were able to run the sample application (from sent file) without any problems on CF 2.0 and CF 3.5 emulators and CF 3.5 device. So the problem has to be related to your device somehow.

Actually, Microsoft already finished support for CF 2.0 (see overview table at http://www.rebex.net/kb/framework-support/default.aspx).
Have you think about upgrading to CF 3.5? Maybe it will solve the issue.
by (120 points)
Hi Lukas,
Now that I am able to run my App in Windows CE device and working fine. I did a cab build in our build machine, the cab installed in my device and seeing the below error
======================================================================
Message: Rebex Webservice exception: System.ArgumentException: HelloWorld Web Service method name is not valid.
at System.Web.Services.Protocols.SoapReflector.FindMethod()
at System.Web.Services.Protocols.SoapReflector.getSoapMethod()
at System.Web.Services.Protocols.SoapMessageSerializer.GetSoapMethod()
at System.Web.Services.Protocols.SoapHttpClientProtocol.doInvoke()
======================================================================

Same in debug mode works fine. My infra team suggests to ensure as a cab Rebex components are working fine.

Please let me know how to proceed with this.

Thanks
by (70.2k points)
Hello, it doesn't seem that the error came from Rebex code. It seems it comes from system code.

I Googled for the exception message "Web Service method name is not valid." and I have found a lot of different reasons of this error:

Bad url (.wsdl instead .asmx) - http://www.tek-tips.com/viewthread.cfm?qid=507721

.NET version - https://social.msdn.microsoft.com/Forums/en-US/258d12f6-2f90-4f37-90f7-33306400a111/web-service-method-name-is-not-valid?forum=asmxandxml

Formatting - http://stackoverflow.com/questions/25152929/service-method-name-is-not-valid-from-hosted-server

Missing [Web Method] - https://bytes.com/topic/net/answers/461063-web-service-method-name-not-valid

To ensure it is not related to Rebex, run the Web service without using Rebex as transport layer (probably you have to use plain HTTP).
by (120 points)
Hi,
Tried the same no luck, seeing the same error. But am able to reach web service used by our company, but it is not TLS 1.2 enabled.
by (70.2k points)
I don't understand your comment well. Did you try to run your app without using Rebex HTTP as transport layer?

If you try to run your app without Rebex HTTP, are you able to reach web service used by your company (without TLS1.2)?

And if you try to run your app without Rebex HTTP, are you able to reach your web service (the one which is currently reporting "Web Service method name is not valid.") (without TLS1.2)?
by (120 points)
I tried running my app without Rebex working fine, even with Rebex able to connect to my company web service (without TLS 1.2)

I created a test web service and my app is not able to connect to it, so I feel issue is not with Rebex, let me try to fix that.

Thanks for your immediate response and links.
...