Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Forum
Deploying asp.net application in IIS6.0 with Forms authentication mode
November 21, 2011
I am getting user name by using the following code:
txtName.Text = Environment.UserName;
I have deployed the code in IIS and while running the application then i am getting
user name as "NETWORK SERVICE" in the textbox instead of logged user name.
And I am using the FORMS authentication mode. (this is mandatory)
Thanks in advance.
Posted Date: November 22, 2011 Points: 20
sorry friend. I dindt get you. Why you call Environment.UserName? If you need windows logged user name you can use the following code
string strName = HttpContext.Current.User.Identity.Name.ToString();
Check this url :
To post reply
Related Questions Related Questions
C#.NET - Sample N Tier Windows Forms Application
deploying asp.net application
Close others forms in windows application
Is there any way to set mixed mode authentication of SQL
How to implement form authentication in our web application?
Diploying asp.net application in IIS6.0
How to create a control in windows application also how could add in the Tool box itself
Windows application Form Focus in C#.NET
what is a console application?
Difference Between console application and windows application?
Latest Forum Questions From The Same Category
How do i get payment status in redirect page using bitpay?
Login with Facebook and Save details in database
Login with facebook account in my website
How to make a nested datalist control?
What class does Icon derive from?
What are the validation controls?
What''s the difference between an interface and abstract class?
How to read Unicode form PDF File and Save into DataBase ?
How to identify the color format of eps/tiff using c#?
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more
Quick Links For Forum Categories:
Hall of Fame
Terms of Service
Tell A Friend