Hi Robert , the code looks good and the same code is working in our live environments (Test and Prod) and compiles without any issue.

Since the routine has REST WebService endpoints and due to company's policy I am not able to post the code but thanks for your concern.

As Colin mentioned, it must be the file corruption, will try reinstalling the dev environment again.

Hi @Colin Brough,

Did you guys manage to resolve this issue? 
I was having the same issue while compiling few local server classes (LF) that extends %CSP.REST class and if I remove the "Extends  %CSP.REST" from the classes, they would compile successfully but the RESP API would give error.

  • Tried reinstalling the cache thinking it would flush out the issue but still stuck in the same one.
  • Tried changing the end of line sequence from VS Code but could not save it.

I would appreciate if you could share how you have resolved this issue.

While using JOB command, I think it was timeout on the Postman and it was still running in the server filling up my logs rapidly until I restarted the Cache server but that could be because of the code issue.

But the problem for me was, even though user sends multiple requests simultaneously the API endpoint will process them one by one and the first request needs to be responded before processing the second. Since, JOB runs in the background, I was not able to reply the response data for each request. 

Similarly, while implementing Work Queue Manager, I don't have the list of requests and cannot collect them in one place and process one by one with response back to each request.

 Or I may be complicating things here and identifying the request from the same user and waiting until the previous request completes would just be a perfect solution for me?

Hi,

Sounds Good! We had thought of this, but due to some of our resources encrypted, using them without password may not be feasible.

I think, I was not very clear in my question but have updated it.

So, there is one web application that uses (should use) primary(SERVER1) server only and when it fails over other(SERVER2) server will become primary and consumed by the web application. And same thing happens at night time when the primary(SERVER2 at this moment) server stops and taken over by other server (SERVER1) again. And this continues every month.

why do you want to stop httpd?

My plan was to enable the httpd.service for primary server, so if the httpd service stops other than during the patching then I want it to restart again.

So, if I could run the command for other server from primary server then I could also disable the service and perform few more other tasks.

My main concern was, If there anyway I can utilize the $ZF(-100) command.

Hi @Sylvain Guilbaud,

The class CSS.CSP.Login inherits almost the same methods from %CSP.Login class and it's only the Styles that has been modified.
 

Class CSS.CSP.Login Extends %CSP.Login
{

Parameters....

// This method represents both the methods (OnPage() and OnLoginPage()) from %CSP.Login class
ClassMethod OnPage() As %Status
{
    // text strings
    Set ConfigName = $P($zu(86),"*",2)
    // get key, lookup in localization global
    Set tLang = $$$SessionLanguage
    Set tTitle = $$FormatText^%occMessages($$$GetSysMessage(tLang,..#DOMAIN,"logintitle","Login %1"),ConfigName)
    Set tPrompt = $$$GetSysMessage(tLang,..#DOMAIN,"loginenter","Please login")
    Set tUserName = $$$GetSysMessage(tLang,..#DOMAIN,"loginusername","User Name")
    Set tPassword = $$$GetSysMessage(tLang,..#DOMAIN,"loginpassword","Password")
    Set tLogin = $$$GetSysMessage(tLang,..#DOMAIN,"login","LOGIN")
    &html<<html><head>
          <title></title>>

    Do ..DrawHEAD()

&html<<script language="javascript" type="text/javascript">
function Validate()
{
    /* Login validation */
    var ok = true;
    if ( IsTextNull('CompanyCode') )
    {
        document.getElementById('CompanyCodeErrorMsg').innerHTML="<br>Company Code is required";
        ok = false;
    }
    else
        document.getElementById('CompanyCodeErrorMsg').innerHTML="";

    if ( IsTextNull('UserName') )
    {
        document.getElementById('UserNameErrorMsg').innerHTML="<br>User name is required";
        ok = false;
    }
    else
        document.getElementById('UserNameErrorMsg').innerHTML="";

    if ( IsTextNull('CachePassword') )
    {
        document.getElementById('CachePasswordErrorMsg').innerHTML="<br>Password is required";
        ok = false;
    }
    else
        document.getElementById('CachePasswordErrorMsg').innerHTML="";

    return ok;
}
    </script>>

    &html< </head>
        <body  style="margin-left:0; margin-top:0; margin-width:0 margin-height:0;" >
    >

    Do ..DrawTitle(tTitle)

    // Show standard login form
    &html<<div style="position: absolute; top:50%; left: 50%; transform:translate(-50%,-50%);">
            <form name="Login" method="post" action="#($ZConvert($G(%request.Data("Error:FullURL",1)),"O","HTML"))#" onsubmit="return Validate();">
        >

    &html<<table class="entryTable" align="center">
        <tr>
            <td colspan="3">
                <div class="loginCaption" style="padding-bottom: 5px;" align="center">#(tPrompt)#:</div>
            </td>
        </tr>
        <tr>
            <td class="loginCaption" nowrap>Company:</td>
            <td colspan="2">
                <input type="text" size="40" name="CompanyCode" id="CompanyCode">&nbsp;<span class="errorText" id="CompanyCodeErrorMsg"></span>
            </td>
        </tr>
        <tr>
            <td class="loginCaption" nowrap>#(tUserName)#:</td>
            <td colspan="2">
                <input type="text" size="40" name="UserName" id="UserName">&nbsp;<span class="errorText" id="UserNameErrorMsg"></span>
            </td>
        </tr>
        <tr>
            <td class="loginCaption" nowrap>#(tPassword)#:</td>
            <td colspan="2">
                <input type="password" size="25" name="CachePassword" id="CachePassword">&nbsp;<span class="errorText" id="CachePasswordErrorMsg"></span>
            </td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td><input type="submit" name="CacheLogin" value="#(tLogin)#" class="button"></td>
        </tr>
    >

    // test for error
    Set tMsg = $Get(%request.Data("Error:ErrorCode",1))

    If ((tMsg'="")&&($SYSTEM.Status.GetErrorCodes(tMsg)'[$$$ERRORCODE($$$RequireAuthentication))) {
        &html<<tr><td><center>>
        Do ShowError^%apiCSP(tMsg)
        &html<</center></td></tr>>
    }

    &html<</td></tr><tr><td style="height:180px;"><br/></td></tr></table></body></html>>

    Quit $$$OK
}

And IBA.CSP.Page uses only the OnPreHTTP from %CSP.Page and gets called only if the login is successful. Whenever the login is unsuccessful the CSS.CSP.Login page is loaded to render the Login page with error message. This happens as soon as I hit the login button and the input validation is done in server side by the Cache standard methods itself, so I needed to access those methods to modify the data as per my need before the Cache does.

Class IBA.CSP.Page Extends %CSP.Page
{

ClassMethod OnPreHTTP() As %Boolean [ ServerOnly = 1 ]
{
	/* If unknown user redirect to Login page */
	if ($username = "UnknownUser" ) {
		if ( %request.PageName '= "PasswordChange.csp" ) && ( %request.PageName '= "CSS.CSP.Login.cls" ) {
			set %response.Redirect = "login page"
			quit 0
		}
	} else {
		if (%session.Get("User") '= $username)  {
			//check if user active and redirect to appropriate page

		} else {
			set %session.EndSession=1
			set %response.Redirect = "logout"
			quit 0
		}

	}

}

I have implemented other solution but it would be clean to use the available features, so any suggestion would be highly appreciated.

Many Thanks!

Actually, I have been locking the users in different table when Invalid login limits exceeds and release the lock after 15 minutes with correct credentials.

I was just trying to make use of the existing features easily but it seems bit difficult.

If we had some property in security.users to enable the disabled account after certain time period it would have solved my problem.

Your suggestion sounds good and less messy. I will give it a try if I could not find proper solution.

Thanks @Vitaliy Serdtsev