Genericise URLs / variables?

Mar 4, 2009 at 1:55 PM
What you have here is exactly what I've been looking for at my university, only that I can't change the URL (or form variables) that your program points to.  Is there any chance that the variable values could be read in from a config file (and thus user-changeable)?  It would make your program suitable for any Jet system anywhere; it'd be brilliant.

If that's not possible, then are you able to point me in the direction of the HttpHandler source code?  I see your base .sln file shows that this HttpHandler is a project within it, but it's not in your repository.

Thanks in advance!
Coordinator
Mar 6, 2009 at 12:01 AM
I think that the best way to do this would be a drop-down where you can select which University you are at (which makes life easier for your\my non-technical counterparts)

If you can provide me with the following information, then I will add your university:
Name:
Internal Address which doesn't require Jet auth: (eg for Curtin it is http://www.curtin.edu.au)
Jet login page address: (eg https://jetib.curtin.edu.au/curtin/login/portal)
Popup info page: (eg https://jetib.curtin.edu.au/curtin/portal/popup_text_refresh)
The ip range of your university's network: (eg at Curtin, all ip's are 134.7.*)

NOTE: The popup info page is *not* the fancy page with the bar graph of usage, it is a plain-text page that specifies "Used this Session", "Used this month", "You currently have ??? remaining"
The easiest ways to find these pages is to try to convert the above Curtin URLs for your own University

Also, I'm likely to make the drop-down populate itself via a config file, such that it is easy to change
Mar 6, 2009 at 12:18 AM
Thanks for getting back to me.  Here's the details as necessary:

Name: James Cook University
Internal Address: http://www.jcu.edu.au
Jet login page address: https://jet.jcu.edu.au/jcu/portal/login
Popup info page: https://jet.jcu.edu.au/jcu/portal/popup_text_refresh
IP range:  137.219.*  (and also a 10.* network as well that is internal)

That should do it. 

If the drop-down and config file are possible, that sounds great and extremely useful.  Thank you in advance for your efforts.
Coordinator
Mar 9, 2009 at 7:44 AM
Okay,

I rebuilt the JetEngine backend, and it now supports different "Locations"

Let me know if it works ok
Mar 9, 2009 at 8:22 AM
Cheers for the efforts - looks like it's coming together.

One problem however: the exe (once installed) crashes upon launch for me.  I don't have much more for you than what I can pull from my debugger (MS VS 2005) (not C#, so that might be an issue).

Call stack
>    JetLoginTool.exe!JetLoginTool.JetEngine.toggleStartWithWindows() Line 332 + 0x7 bytes    C#
     JetLoginTool.exe!JetLoginTool.JetEngine.StartWithWindows.set(bool value = true) Line 266 + 0x8 bytes    C#
     JetLoginTool.exe!JetLoginTool.frmMain.chkStartWindows_CheckedChanged(object sender = {Text = "Start with Windows" CheckState = Checked}, System.EventArgs e = {System.EventArgs}) Line 332 + 0x21 bytes    C#
     [External Code]    
     JetLoginTool.exe!JetLoginTool.frmMain.frmMain() Line 40 + 0x27 bytes    C#
     JetLoginTool.exe!JetLoginTool.Program.Main() Line 17 + 0x13 bytes    C#

Exception thrown:
-        $exception    {"The system cannot find the file specified"}    System.Exception {System.ComponentModel.Win32Exception}
+        [System.ComponentModel.Win32Exception]    {"The system cannot find the file specified"}    System.ComponentModel.Win32Exception
+        Data    {System.Collections.ListDictionaryInternal}    System.Collections.IDictionary {System.Collections.ListDictionaryInternal}
        HelpLink    null    string
+        InnerException    null    System.Exception
        Message    "The system cannot find the file specified"    string
        Source    "System"    string
        StackTrace    "   at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)\r\n   at System.Diagnostics.Process.Start()\r\n   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)\r\n   at JetLoginTool.JetEngine.toggleStartWithWindows() in C:\\Users\\vidmes\\Documents\\SVN\\JetLoginTool\\trunk\\JetLoginTool\\JetEngine.cs:line 332\r\n   at JetLoginTool.JetEngine.set_StartWithWindows(Boolean value) in C:\\Users\\vidmes\\Documents\\SVN\\JetLoginTool\\trunk\\JetLoginTool\\JetEngine.cs:line 266\r\n   at JetLoginTool.frmMain.chkStartWindows_CheckedChanged(Object sender, EventArgs e) in C:\\Users\\vidmes\\Documents\\SVN\\JetLoginTool\\trunk\\JetLoginTool\\frmMain.cs:line 332\r\n   at System.Windows.Forms.CheckBox.OnCheckedChanged(EventArgs e)\r\n   at System.Windows.Forms.CheckBox.set_CheckState(CheckState value)\r\n   at System.Windows.Forms.CheckBox.set_Checked(Boolean value)\r\n   at JetLoginTool.frmMain..ctor() in C:\\Users\\vidmes\\Documents\\SVN\\JetLoginTool\\trunk\\JetLoginTool\\frmMain.cs:line 40\r\n   at JetLoginTool.Program.Main() in C:\\Users\\vidmes\\Documents\\SVN\\JetLoginTool\\trunk\\JetLoginTool\\Program.cs:line 17"    string
+        TargetSite    {Boolean StartWithShellExecuteEx(System.Diagnostics.ProcessStartInfo)}    System.Reflection.MethodBase {System.Reflection.RuntimeMethodInfo}

If there's any more info I can pull from my debugger, let me know.  Hopefully it helps - if you think it might be my problem, let me know any extra libraries etc you have installed (eg MS XML) and I can check if I have them.
Coordinator
Mar 9, 2009 at 12:40 PM
It appears to be working fine for me.

Can I get you  to check two things:
  • Does ChangeStartUp.exe exist in the installation folder?
  • Does the latest release fix the issue?
Mar 9, 2009 at 11:12 PM
ChangeStartUp.exe is definitely within the folder (from where the code appeared to die, it looked like where it accessed that exe had completed fine [going from memory since it was last night]).

Have tried again (this time at work) and this exception traceback *might* (or might not) be helpful:

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at JetLoginTool.JetEngine.set_LocationName (System.String value) [0x00000]
  at JetLoginTool.JetEngine.loadSettings () [0x00000]
  at JetLoginTool.JetEngine..ctor () [0x00000]
  at JetLoginTool.frmMain..ctor () [0x00000]
  at (wrapper remoting-invoke-with-check) JetLoginTool.frmMain:.ctor ()
  at JetLoginTool.Program.Main () [0x00000]

Might see if I can get a VS 2008 and try and compile it myself.  Might provide some clues as to what (if anything) is maybe missing on my system.


Coordinator
Mar 10, 2009 at 8:45 AM
Aha! I fixed the first bug

Turns out that running from startup causes it to look for its resources in Windows\System32 rather than the install directory.

As for the null reference, let me have a look...
Mar 10, 2009 at 8:57 AM
Looks good now.  Runs fine on my system, just need to test it against the actual Jet system when I get in tomorrow.  Will let you know how it goes - cheers again for all the effort, 'tis even more greatly appreciated since today.   Found out the firewall was changed so that if a machine isn't running the pop-up, it can't be connected to at all from the outside; your program should fix all that now.