I would like to move the following piece of code from a c# aspx.cs file into a stand alone class.cs file.
string getIP = Request.ServerVariables[\"HTTP_X_FORWARD
The reason it doesn't work is because you cannot access server variables in a class library project.
You should avoid attempting to make this act like a web class and instead pass the information you need to the class object via a normal parameter.