Monday, September 18, 2017

Kentico behind Reverse proxy

The website I am developing using Kentico EMS is running on a server behind a reverse proxy'ing firewall. This firewall takes care of the SSL communications (called SSL Offloading). This means that the proxy handles the SSL, and Kentico only sees HTTP requests.

Because requests in Kentico are always coming from the firewall and all request are always HTTP this causes several problems for Kentico:
  1. Functionalities like IP Banning and GeoLocation for our contacts are not working because Kentico only sees the proxy servers IP Address.
  2. Because Kentico only receives HTTP requests, all links created by Kentico will will be http links. This causes additional redirects when clients request images or files from Kentico (which will be redirected to https again). Also browsers may complain about 'mixed content'
  3. Because all requests in Kentico arrive non-SSL, setting the 'Requires SSL' option on a page to 'Yes' causes a redirect loop.

Friday, January 20, 2012

Displaying EditableRegion content in transformations

For a website we are developig using Kentico CMS we wanted to show summaries of subpages of the current page. Along with the name of the document, there should be the introduction tekst from the page. The introduction is entered on the subpage in an editable region.

The menu control uses transformations to show title, date etc. With the following code snippet, any editable region field can be retrieved in the transformation.

Wednesday, April 26, 2006

@@identity

Today we ran into a problem with @@identity returning the wrong value for the newly created row.
I found that using @@identity will return the identity column of the LAST inderted row for the current session. On our table we had a trigger that will craete rows in another table, and @@identity would return the identity value of that second table.

The fix for this is to use SCOPE_IDENTITY() function.
SCOPE_IDENTITY(), like @@IDENTITY, will return the last identity value created in the current session, but it will also limit it to your current scope as well. In other words, it will return the last identity value that you explicitly created, rather than any identity that was created by a trigger or a user defined function.


see: http://www.dotnetjunkies.com/Article/86F0988E-FED4-414F-BA2E-D01D953C11BE.dcik9