Is there any way to retrieve username from this
http://username@myapplication.com
type of address in ASP.NET MVC (optionally in ASP.NET) from current request?
Is there any way to retrieve username from this
http://username@myapplication.com
type of address in ASP.NET MVC (optionally in ASP.NET) from current request?
If that's the guaranteed string you might try something like:
string myString = "http://[email protected]";
if(myString.Contains("@"))
{
return myString.Split('@')[0].Replace("http://","");
}