473,672 Members | 2,754 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Logging into a network via C#

I'm currently writing a time tracking app to replace the one we've had
on our intranet for quite some time. I'd like to set this up to
communicate with a server side asp page using xml data transfer to get
access to the database. The only problem I can see myself having while
coding this is that the current asp page requires a network login (a
network login prompt shows up when the users access the page). How can
I do this in C# windows app? Below is the line where I extract the
login information from the IIS server's required login:

====code====
'Get employee data
Dim sLogonId
testLogon = Request("xLogon Id")
if testLogon <> "" Then

sLogonId = Request("xLogon Id")
Else
'Dim sLogonId

sLogonId = Request.ServerV ariables("AUTH_ USER")
End if
====/code====

then I get information from the database using this login id (we store
the login id in the database):

====code====
sSql = "Select EmpId, FName, LName From Employees Where Status = 'A' and
NTLogon = '" & sLogonId & "'"
rs.Open sSql, cn, 1, 3
if Err.Number <> 0 Then HandleError("Fa iled to retrieve employee
information")

if rs.eof then
HandleError("Ac cess is denied because your account information
could not be authenticated." )
Else
====/code====

Obviously the last part can be done pretty easily, i'm just using the
sLogonId that I get from the server in one of these two lines:
sLogonId = Request("xLogon Id")
or
sLogonId = Request.ServerV ariables("AUTH_ USER")

I didn't write the asp code... someone in some other company wrote it
for us long ago. I just need to know how to reproduce this login
information in a C# windows app program... basically how do I log into a
network and get the login id (which is something like this:
WORKGROUPNAME\u sername
Nov 17 '05 #1
0 1078

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

Similar topics

3
1817
by: Daniel Lichtenberger | last post by:
Hi, I'm looking for a logging module to be used in a mod_python-powered website. Python 2.3's logging package seems like a good fit, however I'm not sure if it's completely safe to use it under high load. The library documentation states that it's thread-safe, but what about several forked apache processes running different (sub-)interpreters, logging to the same file? Other suggestions for logging (I really don't need most of...
2
1549
by: Chumma Dede | last post by:
Hi, I need to code a DLL in .NET which logs the response times for our asp.net multi-tier application. The problem is we need to log the timestamps at multiple stages in a process lifecycle roundtrip without too much overhead. We have two webservers which are load balanced and the back end tiers include Biztalk and several remoting components all of which should ideally use this same dll for logging timestamps in a central location in...
3
2062
by: Udi | last post by:
Hi All, I'm developping an application that has a very strong logging requirement - we should be able to log up to 5000 messages per second, most of them are reletively small -(16 - 30 Words) while few of them might get to 1Kb in size. The data is binary (numbers) that should be converted to text of course. I'm affraid of a "logging-bottleneck" in my app.
2
2192
by: Gary | last post by:
I'm getting strange results with a web application I have written.. the program is ASP.NET 1.1.4322 running on IIS (2003 server). The server has two network cards, one goes out to the Internet and one feeds the private side of the network. When logging in from the private network I have no problem, the login works perfectly. When logging in from outside your network, after login I don't get my app- only a blank page. However if I use...
3
1604
by: seb | last post by:
Hi, I am writing to a file some basic information using the logging module. It is working but in the log file some line are printed several time. I had put some print debugging messages in the logging function (so they appear on the consile) and they are called once only. Obviously there is some understantding of the logging module that I am missing. My simple logging program (see below) is called by several processes. In this way I...
3
5396
by: nicholas.petrella | last post by:
I am currently trying to use the python logging system as a core enterprise level logging solution for our development and production environments. The rotating file handler seems to be what I am looking for as I want the ability to have control over the number and size of log files that are written out for each of our tools. I have noticed a few problems with this handler and wanted to post here to get your impressions and possibly...
6
5683
by: Vyacheslav Maslov | last post by:
Hi all! I have many many many python unit test, which are used for testing some remote web service. The most important issue here is logging of test execution process and result. I strongly need following: 1. start/end timestamp for each test case (most important) 2. immediate report about exceptions (stacktrace) 3. it will be nice to use logging module for output
2
1957
by: Vinay Sajip | last post by:
Some users of the logging package have raised an issue regarding the difficulty of passing additional contextual information when logging. For example, the developer of a networked application may want to log, in addition to specifics related to to the network service being provided, information about the IP address of the remote machine and the username of the person logged into and using the service. Python 2.4 introduced an 'extra'...
4
1617
by: samwyse | last post by:
In the Python 2.5 Library Reference, section 14.5.3 (Logging to multiple destinations), an example is given of logging to both a file and the console. This is done by using logging.basicConfig() to configure a log file, and then calling logging.getLogger('').addHandler(console) to add the console. However, in section 14.5.4 (Sending and receiving logging events across a network), a call is made to rootLogger.addHandler(socketHandler),...
6
7578
by: Larry Bates | last post by:
Every time I look at the logging module (up until now) I've given up and continue to use my home-grown logger that I've been using for years. I'm not giving up this time ;-) I find that I REALLY need to be able to monitor LOTS of running programs/processes and thought it would be nice to have them use SocketHandler logging and then I would write TCPServer to accept the log messages for real-time monitoring. I Googled (is that now a...
0
8504
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8419
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8946
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8644
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7477
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6260
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5720
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4243
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.