Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 626467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:25:20+00:00 2026-05-13T19:25:20+00:00

We use ADP for employee information. I had to create a small app that

  • 0

We use ADP for employee information. I had to create a small app that called some web services that ADP has to pull employee information. The app is fairly procedural..not really object orientated in a sense. Basically I go through some web services to pull general information, work information, employee status, etc.

I have most of this data writing out to a text file as a log so I can ensure that everything is working correctly. Finally got it all done, and it works perfect on my local machine. Thought I’d just copy the entire structure onto a server and use windows scheduler to schedule the exe to run nightly (once a day). When it tries to run the app it looks like it is dying when it calls the first web service. The task scheduler log says:

""ADP.job" (ADP.exe)
    Started 2/11/2010 2:14:34 PM
"ADP.job" (ADP.exe)
    Finished 2/11/2010 2:14:38 PM
    Result: The task completed with an exit code of (e0434f4d)."

So I checked the event viewer and it says this:

EventType clr20r3, P1 adp.exe, P2 1.0.0.0, P3 4b745bb9, P4 adp, P5 1.0.0.0, P6 4b745bb9, P7 289, P8 2d, P9 system.io.filenotfoundexception, P10 NIL.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

I put in some console.writelines to see where it is failing…

Here is a simple example of main:

 static void Main(string[] args)
        {
            OpenTextFile();

            Console.WriteLine("About to process employee work information...");
            tw.WriteLine("About to process employee work information...");
            //work info service
            EmpWorkInfo();
         }

And inside of opentextfile:

  public static void OpenTextFile()
        {
            //used to log data
            String sLogName;
            Console.WriteLine("Inside of opentextfile");
            if (Directory.Exists(logPath))
            {
                //directory exists
            }
            else
            {
                Directory.CreateDirectory(logPath);
            }
            Console.WriteLine("Inside of opentextfile2");
            sLogName = "log_" + DateTime.Today.ToString("MM_dd_yyyy") + ".txt";
            tw = new StreamWriter(logPath + sLogName);
        }

I see all the console.writelines on the server but as soon as it hits this line from main:

EmpWorkInfo();

Thats when all hell breaks lose (basically it doesn’t work). The EmpWorkInfo() is simply a function to get work related information from a web service (as I said this works locally).

static void EmpWorkInfo()
{
    Console.Writeline("THIS NEVER PRINTS!!!");
    SQLClass s=null;
    // Create the web service proxy client.
    GetEmployeeWorkInfoService oService = new GetEmployeeWorkInfoService();
    oService.Timeout = Int32.MaxValue;
    // Serialize the UsernameToken into XML.
    // Create the UsernameToken as defined in the WS-I secure profile.
    UsernameToken oUsernameToken = new UsernameToken(USERNAME, SECRET);

    System.Xml.XmlElement oSecurityHeaderXml =
    oUsernameToken.GetXml(new System.Xml.XmlDocument());

    ADP.GetEmployeeWorkInfoWebService.SecurityHeaderType oSecurityHeader = new ADP.GetEmployeeWorkInfoWebService.SecurityHeaderType();
    oSecurityHeader.Any = new System.Xml.XmlElement[] { oSecurityHeaderXml };
    oService.Security = oSecurityHeader;

    GetEmployeeWorkInfoRequestFilter oFilter = new GetEmployeeWorkInfoRequestFilter();

    //filter by thyssenkrupp company
    oFilter.Companies = new String[] { COMPANY_IDENTIFIER };

    GetEmployeeWorkInfoRequest oRequest = new GetEmployeeWorkInfoRequest();
    oRequest.Filter = oFilter;

    try
    {
        EmployeeWorkInfoType[] arPersonalInfo = oService.GetEmployeeWorkInfo(oRequest);
        try
        {
            s = new SQLClass();
        }
        catch (Exception e)
        {
            throw new System.Exception(e.Message.ToString());
        }

        for (int i = 0; i < arPersonalInfo.Length; i++)
        {

            String stID = arPersonalInfo[i].EmployeeKey.Identifier.EmployeeId;  //employee number
            String stEmailAddress = arPersonalInfo[i].WorkInfo.EmailAddress;    //employee email address (work)
            String stFax = arPersonalInfo[i].WorkInfo.Fax;                      //employee fax number
            DateTime dtHireDate = arPersonalInfo[i].WorkInfo.OriginalHireDate;

            String stPhone = arPersonalInfo[i].WorkInfo.Phone;                  //employee phone number
            String stWireless = arPersonalInfo[i].WorkInfo.Wireless;            //employee wireless number
            tw.WriteLine("Processing ID:" + stID + " Email Work: " + stEmailAddress + " Fax Work: " + stFax + " Hire Date: " + dtHireDate + " Phone Work: " + stPhone + " Wireless Work: " + stWireless + ".");
            Console.WriteLine("Processing ID:" + stID + " Email Work: " + stEmailAddress + " Fax Work: " + stFax + " Hire Date: " + dtHireDate + " Phone Work: " + stPhone + " Wireless Work: " + stWireless + ".");
            s.SetSQLCommand("dbo.ADP_uiEmployeeWorkInfo");
            s.AddSQLCmdParameter("@EmployeeNumber", System.Data.SqlDbType.VarChar, stID);
            s.AddSQLCmdParameter("@EmailAddress", System.Data.SqlDbType.VarChar, stEmailAddress);
            s.AddSQLCmdParameter("@Fax", System.Data.SqlDbType.VarChar, stFax);
            s.AddSQLCmdParameter("@HireDate", System.Data.SqlDbType.DateTime, dtHireDate);
            s.AddSQLCmdParameter("@Telephone", System.Data.SqlDbType.VarChar, stPhone);
            s.AddSQLCmdParameter("@Mobile", System.Data.SqlDbType.VarChar, stWireless);
            s.SQLExecuteNonQuery();                   

            Console.WriteLine("Processed ID:" + stID + " Email Work: " + stEmailAddress + " Fax Work: " + stFax + " Hire Date: " + dtHireDate + " Phone Work: " + stPhone + " Wireless Work: " + stWireless + ".");
            Console.WriteLine(Environment.NewLine);
        }
        s.CloseSQLDB();
        s.Dispose();
    }
    //catch any exception from adp side.
    catch (Exception e)
    {
        throw new System.Exception(e.Message.ToString());
    }
}

This functions code is irrelevant (its ugly but do not let that bother you, the code works…). My issue is I cannot even get to the first console.writeline of that function. Is there anything special I need to do when it comes to working with webservices?

Edit

Logpath is defined as simply a static string outside of main:

private static string logPath = Environment.CurrentDirectory + "\\log\\";
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T19:25:21+00:00Added an answer on May 13, 2026 at 7:25 pm

    Found out I need the Microsoft.Web.Services3 dll installed on the server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using ReportViewer to create some reports to my web application and I want
We have a 12-year-old Ms Access app that we use for our core inventory
I am developing an app where i need to use some maths special characters
I am trying to program a simple employee registry and I want to use
Use case: I find a piece of code that I do not understand at
use this code, in the Preferences activity, to know when the reset preference has
use case example I have a servlet that is receiving login requests. If a
I have created a Windows Forms application in C# that will make use of
I have some buttons that get disabled when adding a user. What I need
I have an ASP.NET dropdownlist called #ddlDateRange that contains several items. Possible values in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.