473,394 Members | 1,951 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Problem to get Windows Logon ID & read file at the same time

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>

Sep 27 '06 #1
0 1366

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Wescotte | last post by:
I'm writing a tiny php app that will log into our bank of america account and retrieve a file containing a list of checks that cleared the previous day. The problem I'm running into is when I...
7
by: Mullin Yu | last post by:
if i put the same code at the windows application or console, i can logon to the computer. but, if i put the same code at the windows service and start it, i still can't logon to the machine. ...
4
by: Ben Dewey | last post by:
Hey, I have only been playing with regular expressions for some time. I am working on some code that parses and object 560 event log. I have created two expressions the first one which works...
4
by: NWx | last post by:
Hi, I developed a small test app using ASP.NET. I left the vistual folder to be accessible only with windows integrated security. I try to access that app from another PC in my LAN. I don't have...
3
by: Milan Todorovic | last post by:
Hello, I need help. I have experience in ASP.NET programming, but this is my first dealing with Crystal Reports. I'm trying to make the most basic report purely for testing purposes: connect to...
5
by: IkBenHet | last post by:
Hello, I use this script to upload image files to a folder on a IIS6 server: ******************* START UPLOAD.ASPX FILE ********************** <%@ Page Language="VB" Debug="true" %>
0
by: Eddie B | last post by:
Hello all, I am writing an aspx (Visual Basic) logon app for a friend (he needs to be able to reset expired passwords, so the regular windows logon won't work). Everything is in the same domain...
17
by: UJ | last post by:
Is there any way for a windows service to start a windows program ? I have a service that will need to restart a windows app if it needs to. TIA - Jeff.
7
by: Ahmed Perlom | last post by:
Hi all, I am trying to start a windows application that has a GUI from a Windows service written in .NET 2.0. I have been searching on this for few days now with no avail. When using the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.