Already authorized K2 SmartForms user getting "Not Authorized" error message when accessing form URL
kbt150912
PRODUCTIssue
K2 4.7 users could from time to time get a K2 SmartForms not authorized error message:
"Not Authorized You do not have permission to view the page that you have requested"
Symptoms
This error may appear when users try to use a URL which looks as follows:
https://%K2_SERVER%/Runtime/_trust/Login.aspx?ReturnUrl=/Runtime/Runtime/Form/%FORM_NAME%/
When an already authorized user hits the Login.aspx K2 page his authorization cookie gets deleted and the "K2 SmartForms not authorized" error is displayed. The URL mentioned above will only work without any errors when a user has not been authorized yet, while the normal runtime URL (e.g. "https://%K2_SERVER%/Runtime/Runtime/Form/%FORM_NAME%") will work fine all the time.
Resolution
In this scenario the wrong URL causes the error. If the user uses a URL with the following structure: "https://%K2_SERVER%/Runtime/_trust/Login.aspx?ReturnUrl=/Runtime/Runtime/Form/%FORM_NAME%/" it only works when the user has not received his authorization cookie yet (i.e. user accesses K2 for the very first time during the day or he just cleared browser cookies for the K2 domain).
To avoid receiving this error message you need to make sure that the normal runtime URL is being used to access forms (i.e. URL which has the following structure - https://%K2_SERVER%/Runtime/_trust/Login.aspx?ReturnUrl=/Runtime/Runtime/Form/%FORM_NAME%/