Start Page in Boylan release of SoftPro Select

Discussions related to SoftPro Select Server development.

Moderator: Phil Barton

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

Start Page in Boylan release of SoftPro Select

Post by joe.mag »

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 »

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: 122
Joined: Thu Aug 04, 2011 3:11 pm

Re: Start Page in Boylan release of SoftPro Select

Post by joe.mag »

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 »

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: 122
Joined: Thu Aug 04, 2011 3:11 pm

Re: Start Page in Boylan release of SoftPro Select

Post by joe.mag »

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 3895 times
Mark McKenna

Re: Start Page in Boylan release of SoftPro Select

Post by Mark McKenna »

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: 122
Joined: Thu Aug 04, 2011 3:11 pm

Re: Start Page in Boylan release of SoftPro Select

Post by joe.mag »

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.
joe.mag
Posts: 122
Joined: Thu Aug 04, 2011 3:11 pm

Re: Start Page in Boylan release of SoftPro Select

Post by joe.mag »

We just upgraded from 4.2 to 4.3 and the use of OpenDocument appears to be broken. We used to be able to provide javascript on our start page of the form window.external.OpenDocument('<substitute order GUID here>'); to enable users to directly open an order. This is now broken with the upgrade -- I'm getting "undefined" when I try to perform the OpenDocument.

I thought I'd re-run the Reflector on the upgraded DLLs that embed the native start page to copy any changes in the javascript protocol but can't find the DLL that would contain that information. Any assistance would be greatly appreciated.
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Start Page in Boylan release of SoftPro Select

Post by BobRichards »

The required parameter is a fully qualified URI object. You need to pass a string matching the following format where {order guid} is the guid you previously used to identify the order.

Code: Select all

sp-select://./ordertracking/order?id={order guid}
Bob Richards, Senior Software Developer, SoftPro
joe.mag
Posts: 122
Joined: Thu Aug 04, 2011 3:11 pm

Re: Start Page in Boylan release of SoftPro Select

Post by joe.mag »

Bob, thanks for the quick reply. And my apologies--that was a pretty horrible case of copy-paste error, I overwrote the url completely!

We're actually using the very URL you specified.

For example:

sp-select://./ordertracking/order?id=11111111-2222-3333-444444444444

So I think we're doing what we're supposed to.

Sorry for the confusion and for wasting your time!
Post Reply