I've tested a little more, and found that the problem isn't only with the C# code.
I removed the call to the webservice, and just let my function return true all the time. I recompiled, and this time it appeared that there was no problems when registering. However, when I tried to compile in C++, it kept claiming that the namespace for my C# doesn't exist...