473,382 Members | 1,431 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,382 software developers and data experts.

Logon Server

Hi,

I have created an application that works from scheduled tasks and uses the
System.Environment.GetEnvironmentVariable("LOGONSE RVER") to identify which
server should be used form SMTP and Files, this works fine when a user is
logged in or the pc is logged in and locked.

However when the PC is not logged on the LOGONSERVER is a server on our
network but not the desired one. The schelduled task is set to "Run As" the
same user as above.

Can anyone shed any light on this or should i use something other than the
logonserver.

Thanks for any help

Steve Lloyd.
Nov 20 '05 #1
1 3319
Steve,
If you are using Active Directory you can get the FQDN of the DC you are
connected to by using the following snippet. Make sure you reference
System.DirectoryServices and use an Imports System.DirectoryServices.

Dim Root As New DirectoryEntry("LDAP://RootDSE")
Dim LogonServer As String = Root.Properties("DNSHostName").Value
"Steve Lloyd" <Re*************@laxeyRemovepartners.com> wrote in message
news:O9**************@TK2MSFTNGP11.phx.gbl...
Hi,

I have created an application that works from scheduled tasks and uses the
System.Environment.GetEnvironmentVariable("LOGONSE RVER") to identify which
server should be used form SMTP and Files, this works fine when a user is
logged in or the pc is logged in and locked.

However when the PC is not logged on the LOGONSERVER is a server on our
network but not the desired one. The schelduled task is set to "Run As"
the
same user as above.

Can anyone shed any light on this or should i use something other than the
logonserver.

Thanks for any help

Steve Lloyd.

Nov 20 '05 #2

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

Similar topics

1
by: cwnewbe1 | last post by:
I would like to be able to add environment symbols to the Microsoft XP registry. I tried the example in the Python Cookbook by Orielly by running the script locally and it worked fine. Although I...
1
by: James | last post by:
Hello group: I guessing there is no way to create an OLEDB linked table in Access to SQL Server, am I correct? Basically, I've currently migrated one of my Access database tables to SQL Server,...
0
by: google | last post by:
My Crystal reports are being supplied the logon credentials via a C# code class that recursively loops through all the tables present in the reports and applies the login credentials (Servername,...
3
by: Gary K | last post by:
After a bit a trouble getting VS to create a project on a different web server (I forgot to apply the 'fix'), I get the following error when trying to debug my web application. Error while...
1
by: John Dalberg | last post by:
Running Crystal Reports with the hotfixes and patches & VS 2003. I created a CR report on my development server which has SQL Server. The report runs fine inside Visual Studio. When I switched...
10
by: et | last post by:
I have an asp.net program that uses a connection string, using integrated security to connect to a sql database. It runs fine on one server, but the other server gives me the error that "Login...
0
by: bonita | last post by:
I come across the error "CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed." After I move my asp.net code from the development platform (XP professional) to the production web...
0
by: robpimentel | last post by:
Hi, I've been using DB2 for about 1 week, so please bear with me. DB2 Connect Enterprise Edition v8.1 FixPack 5 Windows Server 2003 Standard Edition SP1 Here is an error that continues to...
6
by: Manuel | last post by:
Hi, Using the PIA "Microsoft Outlook 11 Object Library". I've noticed that the Logon method of the NameSpace Object is simply ignored. My Outlook 2003 is full updated. For example if I...
1
by: cactuscrust | last post by:
I'm running IIS6 Windows2003, and as you'll see very quickly.. I'm pretty new to this stuff. Lately I've been getting bombarded with login attempts.... sometimes several in the same second, and it...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.