Why does ServerVariable[“REMOTE_ADDR”] returns the server IP?
I have the following code:
I have the following code:
Question #1
Is there any built-in utility or helper to parse HttpContext.Current.User.Identity.Name, e.g. domainuser to get separately domain name if exists and user?
I want to be able to get the size of one of the local directories using C#. I’m trying to avoid the following (pseudo like code), although in the worst case scenario I will have to settle for this:
I’m busy trying to create two regular expressions to filter the id from youtube and vimeo video’s. I’ve already got the following expressions;
I want to get a MIME Content-Type from a given extension (preferably without accessing the physical file). I have seen some questions about this and the methods described to perform this can be resumed in:
I have inherited a poorly written web application that seems to have errors when it tries to read in an xml document stored in the database that has an “&” in it. For example there will be a tag with the contents: “Prepaid & Charge”. Is there some secret simple thing to do to have it not get an error parsing that character, or am I missing something obvious?
I would like to read the contents of a CSV file and create a dataset.
I am trying like this:
I am using Webmatrix.data’s Database entity to create a database connection, however it doesnt like my connection string. I am running it from MVC ASP.net.
I have an ASP.NET MVC4 project which compiles fine in VS2010. For deployment purposes I run a Nant script which attempts to precompile the website using aspnet_compiler.exe but I keep running into an assembly reference issue with System.Web.WebPage