Hi,
I want to give a domain name(DNS) to my application which have public ip address. How can i give this in asp.net 3.5 using c#.
plz help me..
Domain name
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Soft CornerRank #1,221 · 1.5K reputationPosted Feb 9, 2011, 10:47 PM EST
1) System.Security.Principal.WindowsPrincipal p = System.Threading.Thread.CurrentPrincipal as System.Security.Principal.WindowsPrincipal;string strName = p.Identity.Name;
[ OR ]2)string strName = HttpContext.Current.User.Identity.Name.ToString();[ OR ]
3) string strName = Request.ServerVariables["AUTH_USER"]; //Finding with namestring strName = Request.ServerVariables[5]; //Finding with indexIn Above 3 Cases returnin string contains DomainName\WinNTLoggedUserName
(for Ex: Microsoft\Bill.Gates. Here Microsoft is domain Bill.Gates is Logger User Name )
Using string operations seperate the DomainName and UserName