How-To and Fixes
Problem: Missing references and NuGet issues when setting up dev environment.
...
Description:
A Course Provider is unable to connect with the PCOC web service due to a password reset on the course provider's web service account. If the password change is initiated via the PCOC Admin Site, the new password will not work and intervention by DSD-Marine will be needed.
Solution:
Although not a permanent fix, a temporary fix is described in TFS 14219.
Problem: Server error when student attempts exam
Description:
When attempting to take the exam an error page is shown on the transport Canada site.
When visiting: https://wwwapps.tc.gc.ca/Saf-Sec-Sur/4/pcocds-sbdccep/to/p1000.aspx?lang=0&token=79efa39d-585a-4d12-bf95-c1c3773475a0
The following error is returned in the browser:
Server Error in '/Saf-Sec-Sur/4/pcocds-sbdccep/to' Application.
There is no row at position 0. (IndexOutOfRangeException)
Solution:
Although a more permanent fix to this solution is described in TFS 12606 (not yet released to prod), the quick fix is to create a new token for the candidates and send the test online URL back to the Course Provider so that they may pass this along to their candidate. Further details can be found in TFS 14125.To fix the issue (or to reset a Course Provider's password without causing any downtime):
Find the service user account in the TC008_USER table. To do this, you'll need the USER_ID or USER_EMAIL_TXT associated with the account:
select * from TC008_USER where USER_ID = 'KALKOS';
or
select * from TC008_USER where USER_EMAIL_TXT = 'tc@kalkomey.com'
TC008_USER_ID = 525
Update the USER_PASSWORD_TXT to any secure password:
update tc008_user set user_password_txt = 'Jkfds03-fefja' where tc008_user_id = 525;
Now we need to make sure that this password won't expire and that there is no lockout on the account:
update tc008_user set date_expiry_password_dte = null, date_lockout_account_dte = null where tc008_user_id=525;
Send updated password to the course provider and have them confirm that access is restored to the PCOC web service.
ref#TFS 14219
Problem: Server error when student attempts exam
Description:
When attempting to take the exam an error page is shown on the transport Canada site.
When visiting: https://wwwapps.tc.gc.ca/Saf-Sec-Sur/4/pcocds-sbdccep/to/p1000.aspx?lang=0&token=79efa39d-585a-4d12-bf95-c1c3773475a0
The following error is returned in the browser:
Server Error in '/Saf-Sec-Sur/4/pcocds-sbdccep/to' Application.
There is no row at position 0. (IndexOutOfRangeException)
Solution:
Although a more permanent fix to this solution is described in TFS 12606 (not yet released to prod), the quick fix is to create a new token for the candidates and send the test online URL back to the Course Provider so that they may pass this along to their candidate. Further details can be found in TFS 14125.
Quick Fix:
1. Delete the old token if it exists. You can search for token using the following query:
PCOCDSP:
SELECT *
from LM109_EXAM_GRP_TOKEN
WHERE EXAM_GRP_token_id = '79efa39d585a4d12bf95c1c3773475a0';
2. Generate a new token for the user.
1. Open the latest copy of the PCOCService solution (located in the $/PCOCDS-SBDCCEP/PCOCSERVICE/ repository). Solution name is "PCOCService.sln".
2. Right-click on the CPWebSiteEmulator project and set as start-up project.
3. Make sure that the project is set to Debug and x86 to allow you to step through the token creation process as needed.
4. Under the CPWebSiteEmulator project, find the WSProduction.aspx page. Right-click and set as starting page.
5. In the btnAuthorize_Click function, set the request.UserName and request.Password values according to the Course Provider for which you're generating a token
6. Update the GetOperator function with the candidate's information (either exists in the database or must be provided by the Course Provider).
7. Run the CPWebSiteEmulator. When the web page loads up, click the "OK - Production" radio button and then click the Authorize button. Once the process is done, a URL will be generated on the web page (e.g. https://wwwapps.tc.gc.ca/Saf-Sec-Sur/4/pcocds-sbdccep/to/p1000.aspx?lang=0&token=68ee8a40-31dd-4616-a474-2995211c0f6f5).
8. Click the link to make sure that the URL is valid. Send this link back to the Course Provider.
3. Send the token to Course Provider.
ref#TFS 14125
More Permanent Fix:
DT dtOp = operatorInfoBL.GetOperatorsFromPCOCTOOperatorForTokenVerify(operatorFailedCheck);
if (dtOp != null)
{
if (dtOp?.Tables[0]?.Rows.Count > 0)
{
// Use the most current record only
DataRow currentTokenInfo = dtOp.Tables[0].Rows[0];
// D. Lafleur
// Set value from web.config for first part of exam url.
currentTokenInfo.SetField(12, ConfigurationManager.AppSettings.Get("PCOCTOUrl"));
// Make sure the status code is defined
if (Enum.IsDefined(typeof(enmResultStatusType), DBGetInt(currentTokenInfo, DBObjects.Feilds.LM109_EXAM_GRP_TOKEN.RESULT_STATUS_TYPE_CD)))
{
SeTokenAndMessages(request, retVal, currentTokenInfo, organizationId);
}
else
{
// This really shouldn't happen, but add it just in case data is missing
// Log that an invalid code exists in the database
retVal.ServiceMessages.Add(new ServiceMessageObj("Invalid Status", "There is an invalid or missing code for the current token"));
retVal.TestUrl = string.Empty;
return retVal;
}
}
else
{
// We do not have any tokens at this point so create a new one
ProcessSuccessfullAuthorization(request, retVal, organizationId);
}
}
else
{
// We do not have any tokens at this point so create a new one
ProcessSuccessfullAuthorization(request, retVal, organizationId);
}
ref#TFS 12606
Problem: Student requested to change the test language for final PCOC test
...