IWeb Core connector

May 31, 2008 at 5:56 AM
Edited May 31, 2008 at 5: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 ?

Thanks
Dush
Coordinator
May 31, 2008 at 6: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 8: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 ?
 
Coordinator
May 31, 2008 at 1:38 PM
Edited May 31, 2008 at 3:34 PM
Yes you have to give the key to the client that will be comminicating with the site.
Aug 6, 2008 at 10: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.
Coordinator
Aug 7, 2008 at 12:10 AM
Can you install just IWeb or IWebCSharp and confirm the behavior?
Aug 7, 2008 at 3:25 PM
Edited Aug 7, 2008 at 5: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 **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
IWeb_Core_Connector
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.0.0
    CodeBase: file:///I:/Program%20Files/IWeb/IWebCSharpClient/IWeb_Core_Connector.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Web.Services
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Web.Services/2.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
hzlfdjli
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Web
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------

************** 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
enabled.

For example:

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

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,

Frank
Aug 7, 2008 at 7: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.


Coordinator
Aug 8, 2008 at 12:31 AM
If you can provide an exact situation that we can reproduce that would be helpful. Thanks.
Aug 8, 2008 at 4: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.
Coordinator
Aug 8, 2008 at 7: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.