IWeb Core connector

May 31, 2008 at 4:56 AM
Edited May 31, 2008 at 4:58 AM
All the functions in the IWeb core connector Windows application works if I use it without checking the "Encripted Password" checkbox. But when I check this checkbox it is not working. If click the button "Get Version" in the basic tab, it returns "Converting from string "" to type Integer is not valid". If I click the "Portals On Server" button, it returns "index was outside the bounds of the array" and put it in front of the "Get Version" button. All other tabs doesn't return anything.
What I am trying here is to understand how to use encripted password method to send/retrive data to/from DNN web portal using a Windows Forms application. Is this a bug or am I ding something wrong ?

May 31, 2008 at 5:12 AM
You will want to make sure you set the encryption key. Also you want a small simple key. Try setting it to: mykey.
May 31, 2008 at 7:16 AM
Thanks, It worked. Is that means this encryption key is the public Key ? Or do we need to encrypt this key as well in a live site ?
May 31, 2008 at 12:38 PM
Edited May 31, 2008 at 2:34 PM
Yes you have to give the key to the client that will be comminicating with the site.
Aug 6, 2008 at 9:35 PM
Thank you for your effort in this project.

I have installed both IWebCSharp and IWebCore on my development machine. When I start IWebCore, use a local host address, one of my login ids and passwords, and 'mykey' as the encryption key, I am able to run GetVersion and PortalsOnServer successfully only if I have the EncryptedPassword un-checked. As soon as I select it and run GetVersion, I receive a 'Input string was not in a correct format' message. If I run PortalsOnServer I get an 'Index was outside the bounds of the array' message. Is it that the encryption only works once IWeb is installed on the webserver ? I am running DNN 4.5.3. I see the feedback you provided to dush above, but I am already using 'mykey' as the key. Thanks in advance for any help.
Aug 6, 2008 at 11:10 PM
Can you install just IWeb or IWebCSharp and confirm the behavior?
Aug 7, 2008 at 2:25 PM
Edited Aug 7, 2008 at 4:35 PM
My apolgies, but I only now noticed that I was supposed to add the key to the IWeb configuration module. But I removed and re-installed the WebCSharp only. Once I added 'mykey' as the key to both client and IWeb configuration,  it worked. However, if I change the key to anything else, it fails with the same messages I posted before, and the following if I click the CheckVersion button:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.FormatException: Input string was not in a correct format.
   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
   at IWeb_Core_Connector.IWebVersion.CheckVersion(Int32 VersionToCheck)
   at IWeb_Core_Connector.IWeb_Form.btnCheckVersion_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
    Assembly Version:
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    Assembly Version:
    Win32 Version:
    CodeBase: file:///I:/Program%20Files/IWeb/IWebCSharpClient/IWeb_Core_Connector.exe
    Assembly Version:
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/
    Assembly Version:
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/
    Assembly Version:
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/
    Assembly Version:
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Web.Services/
    Assembly Version:
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/
    Assembly Version:
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/
    Assembly Version:
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/
    Assembly Version:
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Web/

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging

For example:

    <system.windows.forms jitDebugging="true" />

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


Also, is there some sample code of how to call the webservice once it is up and running?

Thanks for your patience,

Aug 7, 2008 at 6:40 PM
I just noticed that as long as the client uses 'mykey', it doesn't matter what key is configured on the IWebCSharp mode in order for it to work. I tested in on my live site.

Aug 7, 2008 at 11:31 PM
If you can provide an exact situation that we can reproduce that would be helpful. Thanks.
Aug 8, 2008 at 3:17 PM
I am reallty not sure how else I can describe the situation beside with what I have already posted. I have a DNN 4.5.3 portal running on my local machine, I have added IWebCSharp and the client, when I run the client with http://localhost/myportalname , a superuser and password, Encryption box checked, and 'mykey' in both the client and in IWebCSharp configuration, it works.

I just noticed the problem... if I update the key in the CSharp configuration settings, the update button does not actually change the value in the database. I have to edit the value in the db directly.
Aug 8, 2008 at 6:16 PM
Good now we probably have the cause for the error. IWebCSharp is not updating the security key in the Settings. I will create a Task to look at it. It may take a month or so to get this fixed. Thank you for your help.