I'd like to detect, on the server side using C# only, whether a Latitude/Longitude based coordinate is within an area (polygon) made up of Latitude/Longitude based points. I believe the right way to do this is raycasting, but maybe there is already a C# implementation out there as it's not trivial?
Also, I understand that SQL Server has some geometry function such as STIntersects
but in order to use that I need both SQL Server 2008 running and every check would involve a database connection which is undesirable.
Since a sphere is a locally diffeomorphic to the plane, you can use any algorithm that works on the cartesian plane, e.g. this SO question. You'll only have to do work translating coordinates if your polygon includes a pole. Depending on your use case, maybe you can reject those inputs.
I putzed around on the internet for a bit and found this link.
The example is written in C, but looks like it could very easily be adapted to work with C# and Long/Lat coordinates. You would need to keep in mind the crossover lines though (NS/EW), and add code to compensate where necessary, either that or make a decimal conversion of the LatLong values before running the function (West and South are represented with values < 0).