No ratings

Unable to load K2 sites and Smartforms


Unable to load K2 sites and Smartforms




In the network trace, it is noticed that http 500 errors are thrown for requests for scripts and css resources.


Enabling Failed Request Tracing for http 500 produced the following trace:




Opening the requests that produce a http 500 response code on a browser showed the following page:




Based on the above screenshot, it is noticed that the "Access-Control-Allow-Origin" header was already included in the response. It seems the application by default has already included that header in the response for scripts and css resources. In this case, the same header is not required to be added manually in the web.config file.


If that header is added in the web.config, it becomes an error because the application is trying to add the same header twice.

Below is a Microsoft documentation that describes a similar scenario, checkout the section under 0x800700b7



Please do this on both the Designer and Runtime folder. 


Designer Folder: [K2 install drive]\K2\K2 Smartforms Designer


Runtime Folder: [K2 install drive]\K2\K2 Smartforms Runtime


  1.  Go to the Smartforms Runtime folder
  2.  Create a backup of the web.config file
  3.  Edit the web.config file
  4.  look for the <customHeaders> section
  5.  Remove/comment out the line below

    <add name="Access-Control-Allow-Origin" value="*" />

  6.  Save the web.config
  7.  Do the same for the web.config found in the Smartforms designer folder
  8.  Once done do an IISRESET and K2 Service restart
  9.  Clear the web browser cache 
Labels: (1)
Version history
Last update:
a week ago
Updated by: