Start Page in Boylan release of SoftPro Select

Discussions related to SoftPro Select Server development.

Moderator: Phil Barton

Post Reply
joe.mag
Posts: 108
Joined: Thu Aug 04, 2011 3:11 pm

Start Page in Boylan release of SoftPro Select

Post by joe.mag » Mon Sep 26, 2011 9:06 am

Unless I am totally missing the obvious it appears that the StartPage.htm is no longer the actual home of the start page that the SoftPro Select loads on start up. I search for StartPage.htm on my producton server but find no matches.

I would like to add my own content to the main pane of the default start page without having to fully reimplement the existng functionality of the other panes. How can I make a copy of the default start page so that I may do so?

Mark McKenna

Re: Start Page in Boylan release of SoftPro Select

Post by Mark McKenna » Mon Sep 26, 2011 3:29 pm

The content served up for the Start Page is embedded within one of the server assemblies on the mid-tier server. You can use a tool like Reflector to crack open SoftPro.Select.Server.dll and view the resource content directly, including the Default.htm markup document.

joe.mag
Posts: 108
Joined: Thu Aug 04, 2011 3:11 pm

Re: Start Page in Boylan release of SoftPro Select

Post by joe.mag » Tue Sep 27, 2011 10:21 am

Thanks, Mark--it's just as you said. In "C:\Program Files\Common Files\SoftPro\Select Server\Instances\spssvr" the SoftPro.Select.Server.dll file contains the resources for the full start page. All files can be extracted to the same folder using Refector.

Here's the next issue--there are references to "windows.external.XYZ" in the javascript in Default.htm to perform all the "active content" functionality (XYZ obviously being replaced by a method or object name). I assume the objects that are invoked (e.g. "window.external.OpenDocument(moniker);") must be registered with the contained browser control in order for the javascript code to know about them. While I guess I would have expected the SoftPro Select application to take care of this it appears it doesn't since when I load my exact duplicate of the default web page (with just the title altered to make it clear it's my page) all the active content appears to be disabled and all I get are the four default panes with progress ring animated gifs.

So what am I missing to get things like fillRecentOrders and starttips working?

Mark McKenna

Re: Start Page in Boylan release of SoftPro Select

Post by Mark McKenna » Tue Sep 27, 2011 11:49 am

Just to clarify, you've set up your own Start Page content and have changed the StartPageUrl reference in the application config file to point to it instead of our default page, and are viewing the content inside the Select shell environment?

joe.mag
Posts: 108
Joined: Thu Aug 04, 2011 3:11 pm

Re: Start Page in Boylan release of SoftPro Select

Post by joe.mag » Thu Sep 29, 2011 12:09 pm

Mark,

* Yes, I have extracted the resources as you suggested and have saved them into a folder that I've then exposed via IIS Manager as a virtual directory. I've tweaked the StartPage title to be something custom and recognizable.

* I have updated the default Select.exe.config file to specify this line (without the LT and GT prefix/suffix): add key="StartPageUrl" value="http://UGTIRAL01SSQL01/SoftProStartPage/Default.htm" /

* I run an instance of SoftPro Select that IS NOT using the /rootsuffix of EXP (i.e. so using the primary produciton hive)

* I confirm that my custom title appears as the tab name of the start page in SoftPro Select (see uploaded attachment)

* The loading animated GIFs never stop their spinning. I see no errors in the Application event log on the server. I don't see anything that stands out in terms of HTTP status codes in the web logs for the server hosting the custom start page.

* I added alert() calls in the Default.htm and hooked up my own window.onerror error handler and it looks like all the objects that are requested are coming back "undefined" and lots of errors fire when methods are called or properties are queried on these objects.

Let me know what else I can provide and thanks,

Joe
Attachments
Custom Start Page.jpg
Custom Start Page.jpg (52 KiB) Viewed 918 times

Mark McKenna

Re: Start Page in Boylan release of SoftPro Select

Post by Mark McKenna » Fri Sep 30, 2011 2:14 pm

Joe, I can't reproduce this here. I went ahead and followed the same steps - I saved every resource file from that assembly using Reflector into a new directory and set up a new IIS virtual directory using that local path. I did use the IIS host on my local machine. I then set my config file to reference that new virtual site using (in my case) : http://localhost/StartPageTest. My (new) start page worked just fine.

As for the object invocation, the browser's scripting object is programmatically assigned to our service object exposed by the IEnvICE interface inside the shell, when the start page browser is created.

You might try wiping out that virtual directory and starting again, but this time don't modify any of the content at all. Just save every resource file from the assembly directly into a folder and set up a new virtual directory against that new folder. Update your config to reference that new URL and restart Select. To help narrow it down further, you might also try referencing a virtual directory in the IIS host on the same machine that you are running the Select client from, thereby using localhost as your machine name.

joe.mag
Posts: 108
Joined: Thu Aug 04, 2011 3:11 pm

Re: Start Page in Boylan release of SoftPro Select

Post by joe.mag » Tue Oct 04, 2011 8:19 am

Mark,

HOLD THE PRESSES

Please don't ask me what changed but now my page, as hosted on the server, works fine. Hello? Apparently I've completely lost my mind so please disregard this entire post!

BUT BEFORE THAT HAPPENED THIS WAS MY REPLY (I'll leave it in the thread just because I typed it all!):

Based on your response I copied the contents of the start page folder from my server to my client and set up the needed IIS virtual directory. The start page behaves correctly in this scenario. Just to be clear--the page worked with my modifications in the javascript still in place but largely commented out.

That's good to know about the IEnvICE interface. So let me think through this aloud and maybe you can point out the error in my logic:

1) SoftPro hooks in the IEnvICE interface so that the javascript executing in the embedded web browser control has access to the objects it needs.
2) Since all of this code is executing on the client the objects are instantiated on the client and would talk to the database through any connection strings used by the rest of the application. Since the application works one would assume these objects would work as well.
3) Further, since all of this is happening within the session established by the currently logged in user SoftPro Select, the browser control, and the javascript are all executing within that security context.
4) Any time IIS is involved and there is a problem I immediately assume it's some kind of security issue. The fact that things work on the localhost seems to maybe contribute evidence to this. But here's the rub: everything should be running on the client--the server is merely serving up the the HTML/javascript text to the client. The server (at least as far as IIS is concerned) isn't running any objects so it seems this would be a "fail early" situation--no HTML at all or full functionality.

Post Reply