0 votes
by (120 points)

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 (69.8k 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)
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.

by (69.8k 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)
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 (69.8k 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.