Things to know about Milestones Professional and ASP

Things to know about using Milestones Professional from Server-side ASP scripts under IIS on Windows Servers:
   
1 On your IIS Server, make sure that you are running the latest version of Milestones Professional.
2 On your IIS Server, make sure that Milestones Professional is installed on your server with a valid Serial Number and Program Key for All Users. Using the Trial Version from ASP scripts will be difficult due to the dialog boxes that appear when saving files and printing. An All Users install is important because the IIS user that the IIS service uses is a different user than the one used for installing the software.
3 On your IIS Server, make sure that Milestones is properly registered to handle .mla files. You should be able to double-click on an MLA file and cause Milestones to start and open the file. If not, then locate and run the rereg.exe program in the ...\milestones\system folder. This program will ensure that Milestones Professional is registered as the handler for all MLA files. This is important when making a GetObject call from a script.
4 On your IIS Server, set Milestones to run a new instance for each invocation from Automation. This is done by checking the "Run as Multiple Instances for COM/Automation" checkbox in the Tools/Options menu, General tab. This needs to done to prevent one automation session from interfering with another. Since Milestones is a Multiple Document Interface (MDI) application, by default just one instance will attempt to serve all automation interfaces. There can be problems with this when running on a server since any one automation session could causes a problem or delay that would affect all sessions. There is no reason to attempt to run Milestones Professional as a service and it is not recommended that you do so.
5 Remember that any JPEG files that Milestones creates that you intend to view via an HTML img command must be accessible from your web site. Our examples show that when you pass the .jpg filename to Milestones you use the actual path/filename of the folder/file on your server (which should be a folder accessible to your web site) and when you refer to this .jpg file from your HTML img command you use the http://... designation for the same file. Be sure that the IUSR_computer_name ID has whatever access is required to the folder you use to hold any files that are saved from the script.
6 Be aware that during your testing you may be leaving "dangling" miles.exe processes running on your server. You should terminate these using a process viewer tool such as Process Explorer (http://www.microsoft.com/technet/sysinternals/ProcessesAndThreads/ProcessExplorer.mspx).     
7 If you are using Windows Server 2003 R2 (which has more restrictive default security) you may need to enter the Component Services screen (Start | Programs | Administrative Tools | Component Services | My Computer | DCOM Config | Milestones Professional Schedule | Properties. In the Properties box under Launch and Activation, select Customize, and add the local machines Internet Guest Account, which is usually "IUSR_computer_name" and gave it Local Launch and Local Activation privileges.
8 Under IIS Web Service Extensions make sure the Active Server Pages is set to Allowed. The default setting is usually Prohibited.
 
Things to know about using Milestones Professional from Server-side ASP.NET scripts under IIS on Windows Servers. (Thanks very much to Deepa Swamy of DDEi for figuring this out.)
   
1 Enter the Component Services screen (Start | Programs | Administrative Tools | Component Services | My Computer | DCOM Config | Milestones Professional Schedule | Properties. In the Properties box under Launch and Activation, select Customize, and add the local machines Internet Guest Account ( "IUSR_computer_name" )and Network Service account; and give them Local Launch and Local Activation privileges.
2 Double check that in the Web Server (Start | Run | Type inetmgr) under Web Server Extensions, ASP.NET is allowed, by default it is prohibited.
3 Add <identity impersonate="true"> under <system.web> section in the applications's Web.Config file and restart IIS. (http://msdn2.microsoft.com/en-us/library/aa302377.aspx).
4 Run rereg.exe from C:\Program Files\KIDASA\Milestones Professional 2006\System.
5 Give Read/Write permissions to IUSR_computer_name account, to the folders where the image (gantt chart) file will be stored.
6 Run filemon.exe to check for any 'ACCESS DENIED' errors and fix them by giving the necessary permissions. ( http://www.microsoft.com/technet/sysinternals/utilities/filemon.mspx ).
7 If problems still exist after all the above steps, then try creating a VBS script to create the Milestones object and execute it locally as an administrator to see if it's working.

ASP Code Examples

Click here to visit our main programmer's page.