When using the PDF Converter SmartObject method, “Create PDF from URL”, if the form name contains special characters (German letters with umlaut, e.g. ä) this will most likely be exposed within the runtime URL as well.
Once the PDF method is executed the following error shows:
Server Error A potentially dangerous Request
The full error that can be seen here is the following:
Server Error A potentially dangerous Request.Path value was detected from the client (%). (http 500 error) Refresh Page?
This is a known issue and will be addressed within a future release of K2.
To get around this it would be best to create a secondary runtime site as per this article:
Further details for setting this up for this particular instance in relation to the PDF issue can be found below:
How to Create a Secondary SmartForm Runtime Site
1. Create a secondary SmartForms Runtime Site:
2. Copy the SF runtime site to the K2 install folder so that there are 2 copies of the SF runtime site. You can follow the guidelines within the document above.
3. Rename the copy to something like "K2 SmartForms Runtime PDF"
4. Update the security settings on the entire folder and subfolders, to have full control for users:
-K2 IIS App pool user
-K2 Service account user
5. Open IIS and on the K2 main site, right click and "Add Application" and point it to this folder we created earlier "K2 SmartForms Runtime PDF". For example: https://help.k2.com/onlinehelp/k2five/icg/5.2/Content/Configure/SF/001.png
6. Make the Alias "Runtime PDF".
7. App Pool should be the same as your other SF Runtime site.
8. Press OK to save.
9.Open the new folder and update the Web.config file and set:
-Find ConnectAsAppPool and set value to be true
-Find under Authorization: deny users="?" and comment it out like this <!--<deny users="?" />-->
-Also under Authorization: uncomment <!--<allow users="*"/>--> so it looks like this <allow users="*"/>
10. Save the changes to the Web.config.
11.Open the original SF Runtime Site Folder and backup then edit that Web.Config:
Find "Forms.Controls.SaveAsPDF.BaseURL" and set it to value="http://[Base URL]/Runtime PDF/"/> and uncomment it.