Problems using IWebCSharp with Client Connector

Oct 30, 2008 at 8:02 PM
I'm having issues using/connecting to DNN from the IWeb Core Connector (downloaded source).

I downloaded and installed the IWebCSharp module into my web (http://localhost/buck48).

I downloaded the IWeb_Core_Connector_CS sample, compiled and ran. I had to change the hardcoded reference to the webservice. You had /IWeb/ and it needs to be /IWebCSharp/.

I then recompile the C# client, I change the URL/Website...change the username and password. I then click any of the buttons (Check Version, Get Version, Portals On Server) and nothing works. I either get errors or warnings that say "Input string was not in a correct format."

Does anyone have any ideas on how to resolve this and get it working? I followed all directions from website on installing the module in DNN, the client, etc.
Coordinator
Oct 30, 2008 at 8:58 PM
Try using the client that comes with the DNN IWebCSharp module. There is a link to download it after you install IWebCSharp and place it on a page. This is the one that we tested when we do a release.
Oct 30, 2008 at 9:05 PM
I did. I downloaded the client and try running it. Nothing happens.
Coordinator
Oct 30, 2008 at 9:21 PM
I'm sorry this has been so frustrating for you. I cannot reproduce the error. Last thing I would try is to simply create your own client and connect to the web methods.
Oct 31, 2008 at 1:31 PM
Thanks. That's exactly what I did after going through the sample connector client. I created my extended web methods in the webservice, then created a small client. I got the same error as if I just ran the sample code I downloaded.

I'm thinking there is something not right in my DNN, maybe a config setting or the website/service isn't setup correct. I'm not sure which.

I downloaded the VB version of IWeb and installed its client. When I click on the "Check Version", I get "the IWeb version on the server is too low" message. Thoughts?
Coordinator
Oct 31, 2008 at 1:46 PM
When you click on the link next to "This website implements this web service:", do the methods show up? Note you can't call the methods from the web page because you can't pass the Authendication header using the web page.
Oct 31, 2008 at 1:51 PM
Yes when I browse to the local webservice http://localhost/buck48/DesktopModules/IWebCSharp/webservice.asmx I get a listing of the methods, including the new ones I added.

Coordinator
Oct 31, 2008 at 4:43 PM
I'm sorry I am stumped :(
Oct 31, 2008 at 6:03 PM
Same here. If I send you my changes/source...would you mind having a look? Perhaps I've done something that's not possible in the DNN world, or perhaps it will work on your DNN, which means mine is pooped some how.

Let me know if your interested.
Coordinator
Oct 31, 2008 at 8:57 PM
Can you describe what changes you have done. It would be hard for me to find the time in the next 30 days to look extensively and really study something.
Nov 6, 2008 at 9:12 PM
Ok I've been able to get the IWeb to work (not IWebCSharp, which I was originally working with. I'll try it again later on).

So now that it's working, including the connector (I can create users and get user information), I've been able to extend it to support CreateUser2, UpdateUser2 and DeleteUser2. The Update and Delete are just methods exposing the UserController methods. I created a new enhanced CreateUser2 to do some extra special things, which is working.

I'm now running into a situation in which I want to Update and Delete users...but they don't exist in DNN. The GetUser function fails when it tries to find a user that doesn't exist.

Any thoughts?

Thanks
Callon
Coordinator
Nov 6, 2008 at 11:39 PM
You just need to add simple error checking in the web methods. We did not fully flesh out the example web methods.
Nov 7, 2008 at 6:31 PM
Ok I've added some error checking to the GetUser method and I can now check if the user is present.

Using IWeb I'm able to expose the CreateUser, UpdateUser and DeleteUser methods from UserController. Add user works as expected, it was part of the IWeb...but the Update and Delete methods I exposed...don't work.

I'm not sure if certain security functionality is missing or what. The DeleteUser executes and returns a true that it deleted the user, but after browsing the DB the user is still present.

The UpdateUser fails inside DNN. From my debugging, I can't seem to find out why...it just says object null reference when it tries to do the following from the AspNetMembershipProvider.vb:

Dim objMembershipUser As AspNetSecurity.MembershipUser
objMembershipUser = AspNetSecurity.Membership.GetUser(user.Username)

I don;t know if you can help or suggest anything or point me to someone or a site, but from what I can tell...exposing DNN functionality via webservices is a hit and miss. DNN seems to be an excessively multi-layered black box and trying to do anything results in who knows what. DNN doesn;t seem to be friendly to anything other than websites running inside the portal.



 

Coordinator
Nov 7, 2008 at 6:52 PM
It's not the web services that is the problem it is the fact that DotNetNuke may require you to call a method such as "update" or "refresh" to persist the changes. It is dooable but I did not have the time to figure it out when I made the methods.