Web Application "Log on Unsuccessful" with RPServiceClient Error



When Logging into the web application, user provides the correct password but message "Log on unsuccessful" always show up. 

When viewing the error in Application Module Diagnostic shows :
RPServiceClient encountered a Communication Exception: There was no endpoint listening at https://spmserver/SecurityTokenService/Services/SecurityTokenService.svc/username that could accept the message.
This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

Product Line
SPM 7.x
PME 7.x

Web Application login.

There are several possible causes for the Web Applications failed login attempt. Below are some common causes of the login failure.
The SQL 
Ionedsd user account does not have the correct permissions, lack of available memory, or a RPServiceClient / SecurityTokenService error.  

The exception was on https://spmserver/SecurityTokenService/Services/SecurityTokenService.svc/username. The "/username" at the end of the url is incorrect. By default the service url is https://localhost/SecurityTokenService/Services/SecurityTokenService.svc.

Note: FA210240, should be applied first. If error persists, try following below. 

1. Open IIS Manager
2. Open Default Web Site\SecurityTokenService and switch it to Content view.
3. In the Services folder, browse the SecurityTokenService.svc in IE. (right click and click Browse)
4. On the IE window, if everything works properly, it should say "You have created a service".
5. Do the same for RPservice. Browse RPService.svc in IE and it should also say "You have created a service"

If step 5 failed, please go to ION Enterprise/application directory and share RPServices with Everyone.