George Kosmidis

Microsoft MVP | Speaks of Azure & .NET | Founder of Munich .NET
Building tomorrow @
slalom
slalom

C#: Getting a user IP behind a proxy (HTTP_X_FORWARDED_FOR)

Did you know that HTTP_X_FORWARDED_FOR can return multiple IPs? According to http://en.wikipedia.org/wiki/X-Forwarded-For the format is:

X-Forwarded-For: client, proxy1, proxy2

Modified 3 years ago

My next events!

Online
Online event
Microsoft MVP - George Kosmidis

SQL Server: How to simulate DROP TRIGGER IF EXISTS

I usually store triggers, store procedures, functions, queries etc in sql files in an SVN repository. I then use a simple app I wrote, that just opens each file and executes it. The problem of course is CREATE and ALTER. I can’t use CREATE because the same trigger might already be there. On the other hand I couldn’t use ALTER because some triggers might be new.

Modified 1 year and 1 month ago
Azure Architecture Icons - SVGs, PNGs and draw.io libraries
SQL Server: Using .NET assemblies (SQLCLR)

SQL Server: Using .NET assemblies (SQLCLR)

SQLCLR is a technology for hosting of the .NET CLR engine inside SQL Server. Adding an assembly can be a lifesaver sometimes, since the limitations of coding in TSQL stored procedures, triggers or functions are a lot and profound.

Modified 2 years and 6 months ago

SQL Server: Weird behavior with CONTAINSTABLE, ISABOUT and weighted terms

I came across the following weird behavior in an ISABOUT query in SQL SERVER, that involves the weight keyword and the final rank of the results. I want to describe this behavior here, just in case someone has a good explanation for it!

Modified 1 year and 1 month ago