G
genzy
I'm facing the below problem.
With <deny users="?" />, the Windows Login ID is able to be obtained to
fill up the Windows IDSID text field automatically, but reading the
file info is failed.
Without <deny users="?" />, the Windows Login ID is not able to be
obtained, but reading the file info is successful.
Is there any way to make both working at the same time?
Thanks for advice.
Windows Logon ID - To get its value
CODE:
private string GetLogonUserIdsid()
{
string logonUserId = "";
string logonUser = Request.ServerVariables["LOGON_USER"];
if (!logonUser.Equals(""))
{
// ASCII Table - http://www.lookuptables.com/
// char '\' = 92
char[] splitter = {(char) 92};
string[] strTmp = logonUser.Split(splitter);
logonUserId = strTmp[1];
} // End if.
return logonUserId;
}
File Access - To check a file existence
CODE:
if (File.Exists(dir+file)) {
return true;
}
else {
return true;
}
web.config
CODE:
<authorization>
<!-- It will deny all unauthenticated or anonymous users. -->
<deny users="?" />
<!-- Allow all users -->
<allow users="*" />
<!-- Note -->
<!-- <allow users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
<deny users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
-->
</authorization>
With <deny users="?" />, the Windows Login ID is able to be obtained to
fill up the Windows IDSID text field automatically, but reading the
file info is failed.
Without <deny users="?" />, the Windows Login ID is not able to be
obtained, but reading the file info is successful.
Is there any way to make both working at the same time?
Thanks for advice.
Windows Logon ID - To get its value
CODE:
private string GetLogonUserIdsid()
{
string logonUserId = "";
string logonUser = Request.ServerVariables["LOGON_USER"];
if (!logonUser.Equals(""))
{
// ASCII Table - http://www.lookuptables.com/
// char '\' = 92
char[] splitter = {(char) 92};
string[] strTmp = logonUser.Split(splitter);
logonUserId = strTmp[1];
} // End if.
return logonUserId;
}
File Access - To check a file existence
CODE:
if (File.Exists(dir+file)) {
return true;
}
else {
return true;
}
web.config
CODE:
<authorization>
<!-- It will deny all unauthenticated or anonymous users. -->
<deny users="?" />
<!-- Allow all users -->
<allow users="*" />
<!-- Note -->
<!-- <allow users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
<deny users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
-->
</authorization>