Tuesday, January 13, 2015

Prevent K2 SmartForms from automatic sign-in

If you build an application using K2 SmartForms and using its runtime URL to browse the application, by default K2 SmartForms will automatically log in using current Windows user credential.

Sometimes we want to prevent this default behavior occurs and users must enter their credential manually to log in to K2 SmartForms application. To do this, we have to alter K2 SmartForms configuration in IIS.

Open IIS in K2 SmartForms server, choose Runtime website, then select Authentication.

image

Click Forms Authenticaiton and click Edit.

image

a dialog window will be opened. Observe the Login URL field, change its content to ~/Login.aspx. By default the login URL field content is _trust/Login.aspx

Click OK to save configuration. Recycle the application pool that K2 SmartForms is using, then try to browse the runtime URL, a login page will be appeared.

image

You can log in using domain credential to log in to K2 SmartForms Runtime environment.