How to view a ModScript log file without using remote desktop connection

ModScript, at least since version 11.3, added a new "Log" object with methods to allow sending text to a log file in the SBM "Application Engine\Log" directory.  To view these messages you need to start a "Remote Desktop Connection", aka "Remote Console" or RDP to the AE server and view the log file in the "Application Engine\log" directory.  Previously, this kind of logging was done using the "Ext.LogInfoMsg" call which sent the message to the AE server's Windows Application Event log.  To view these log messages, you also had to "remote" into the AE server, then use the Windows Event Viewer to view the Application Event log.  That level of access can make some clients or server administrators nervous.  In some conditions, the developer may not have any access to SBM servers.

Fortunately, there's a way to create a log that doesn't require any remote access to the AE server, outside of IIS.

Some basic "one time" setup is necessary to allow this capability. Have someone with "administrator" privileges on the SBM AE server do the following steps:

  1. "remote" into the SBM AE server
  2. "CD" to IIS's "inetpub\wwwroot" directory.
  3. Create a subdirectory under "inetpub\wwwroot" for the ModScript log files.  In this example the name of the subdir is "AE-Logs".
  4. Use the Microsoft Sys Internals "junction" tool "junction" to create a file junction from "inetpub\wwwroot\AE-Logs" that is targeted at a subdirectory (which the "junction" command will create) under the App Engine's "Log" directory.  In this example the name of the subdir under "Application Engine\Log" is called "inetpub_AE-logs".

junction  "C:\inetpub\wwwroot\AE-logs"   "F:\Program Files\Serena\SBM\Application Engine\Log\inetpub_AE-logs"

Now your ModScript can use the following calls to create a Log file in that new subdir.  Make sure that the name of the log file you create has a file extension that IIS will handle, like ".txt" or ".htm".  On my system, IIS will not handle a file with the ".log" extension.  I can probably change that by making changes to the IIS settings.

var my_IIS_log Log() ;
my_IIS_log.Message( LogLevelConstants.AVERAGE, "0 param call to my_IIS_log.Message" );
my_IIS_log.Message( LogLevelConstants.AVERAGE, "3 param call to my_IIS_log.Message : Reporting Level={0} : File={1} : IsOpen={2}" , my_IIS_log.GetReportingLevel() , my_IIS_log.GetFileName() , my_IIS_log.IsOpen() );


View the log in a browser:


Continue reading
403 Hits

Using Windows Authentication to Achieve Single Sign-On

Back to Single Sign-On again.  Today, we are not talking about Serena Single Sign-On so much, but having the user automatically authenticated using the user credentials logged on to the workstation.  I refer to this as auto-logon using Kerberos or NTLM credentials of the workstation user. 

The browser needs to be capable of auto-logon using the WWW-Authenticate header; it is the browser that makes auto-logon possible.  Chrome has this ability built in, and you can specify sites to do this auto-logon in Firefox.  Neither Firefox nor Chrome use the Security Zones that Internet Explorer uses. 

Recent Comments
David Berner
Is there a way to have the same passthough (kerberos) authentication also for webservices? I found an option on SBM system adminis... Read More
Thursday, 03 December 2015 11:11 AM
David Goodale
Web Services can authentication in 3 ways as defined in the web services API guide. 1. Argument 2. HTTP Basic 3. WS-Security All t... Read More
Thursday, 03 December 2015 5:05 PM
Continue reading
11186 Hits

How to Configure a Component and Application Process for IIS 7

b2ap3_thumbnail_nowdeployIt.pngThis post will cover how to create an example SDA component to deploy an ASP.NET application using the IIS 7 website we created in an earlier post.

The process of creating a website and deploying a web application will consist of two parts. The first is to create the website if it does not already exist and the second is to deploy an application.

Continue reading
7878 Hits

How to Configure a Website with IIS 7

b2ap3_thumbnail_justAutomateIt.pngThis post will cover how to automate the configuration of a website running with IIS 7 using Serena Deployment Automation (SDA).

Although the (manual) steps are quite easy, it can be tedious. And tedious steps become error prone; so just automate it.

Continue reading
6319 Hits

Recent Tweets