Method can not be reflected / There was an error reflecting method

Today I received an update from a customer of a url in order to execute the methods of a project, just the address changed from http to https. In this project we use a class in C # generated by wsdl.exe. I generated again to the new url and added to the project.

So far so good, but when I run the project could not pass the instantiation of the proxy class that I generated and gave me the following error: “Method can not be reflected.”

After googling and seeing some posts, I have concluded that the types that were being passed in the parameters of each method were not valid with what was supposed to receive. For example, the parameter was of type System.DateTime, but received the method parameter of type string, so it would not work.

I went through the proxy class looking for anything that might have these types (which was not string) and replaced it for string.
In this case was simple.

Code exemple:

What I had when generated the proxy class:

[System.Xml.Serialization.XmlElementAttribute(System.DateTime)] out string timeParameter,

What I had to do:

[System.Xml.Serialization.XmlElementAttribute()] out string timeParameter,
Advertisements

Creating Virtual Machines

So, the other day I was creating a Virtual Machine (VM) Windows Server 2008 R2 with SP1, then installed SQL Server 2008 R2 so I could get MS Dynamics CRM 2013 on the machine. First had to add the roles, so the installation would work without problems. The roles I added were: IIS, File System and had to run dcpromo.exe to add a domain to the server because CRM installation needs it.

When I was installing the SQL Server I’ve put all of the services with the same user (Network Service) and the installation went ok, but after I had to change it to the user is was logged on, because the SQL Agent wasn’t working and was saying that couldn’t start running. After the change it started to work. Had some problems on the Reporting Service too, so had to change it to Local System and started to work fine.

I’m going to install MS Dynamics NAV 2009 (or maybe 2013) on this machine and Jet Data Manager v12.7.0.

I’m thinking of doing a VM with Windows Server 2012 and SQL Server 2012 R2 too (CRM 2013, NAV 2013), that way I’ll have a VM with the late versions of softwares available.

Any questions or help, write on the comments that I’ll try to help.