Answered by:
Accessing to website remote in C# on the private company network with VPN connection

Question
-
User1151703306 posted
Hello there, I need your help
I have published a new ASP NET C# web site on the private company network.
This new web site works on a windows server 2012 server and this is the authentication method for access to web site :
public void Authentication() { string username = Page.User.Identity.Name.ToLower(); string[] strUsername = username.Split('\\'); if (strUsername.Length > 0) { username = strUsername[strUsername.Length - 1]; } }
But I have problem to accessing when I'm connected from my house using VPN connection, because the website not validate my access as if not identify the variable :
string username = Page.User.Identity.Name.ToLower();
The access on the private company network is with server proxy, the access on the VPN connection don't use server proxy.
The administrator of private company network says it's not a network problem.
I have tried in windows server 2012 server setting IIS property Authentication without success.
I verified that when I connect with VPN the user recognized by Page.User.Identity.Name.ToLower(); is always "administrator"
I have tried with ASP Classic webpage and :
- If I connected on the private company network the output is :
AUTH_USER: Domain\Username LOGON_USER: Domain\Username REMOTE_USER: Domain\Username
2. If I connected with VPN the output is :
AUTH_USER: ServerName\administrator LOGON_USER: ServerName\administrator REMOTE_USER: ServerName\administrator
How to do resolve this ?
Tuesday, August 27, 2019 10:13 AM
Answers
-
User-837065880 posted
Do you use the windows authentication ?
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, August 28, 2019 7:38 AM -
User1151703306 posted
Do you use the windows authentication ?
Yes, enabled Windows authentication and Basic authentication
Disabled Anonymous, Digest, ASP NET impersonation and Forms authentication
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, August 28, 2019 8:08 AM
All replies
-
User-837065880 posted
Do you use the windows authentication ?
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, August 28, 2019 7:38 AM -
User1151703306 posted
Do you use the windows authentication ?
Yes, enabled Windows authentication and Basic authentication
Disabled Anonymous, Digest, ASP NET impersonation and Forms authentication
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, August 28, 2019 8:08 AM