Code Errors

Posted on 2011-10-11
Last Modified: 2012-08-13
Hi I wonder If anyone could help me identify this error in the code on line 264. This is the error we get when we attempt to connect to an Intranet we had designed a few years ago by a chap who is no longer with us. I am afraid from a coding point of view i am a real novice


Could anyone please help

The server is not operational.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: The server is not operational.

Source Error:

Line 262:                  DirectorySearcher mySearcher = new DirectorySearcher(entry);
Line 263:                  mySearcher.Filter = "(&(objectClass=user)(samaccountname=" + currentUserID + "))";
Line 264:                  SearchResult resEnt = mySearcher.FindOne();
Line 265:                  try
Line 266:                  {

Source File: c:\dartsIntranet\dartsIntranetV2.1\App_Code\ACR.cs    Line: 264

Stack Trace:

[COMException (0x8007203a): The server is not operational.
   System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) +377678
   System.DirectoryServices.DirectoryEntry.Bind() +36
   System.DirectoryServices.DirectoryEntry.get_AdsObject() +31
   System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne) +78
   System.DirectoryServices.DirectorySearcher.FindOne() +47
   HudsonNash.AutomaticCrashRecognition.ACR.PullADUser() in c:\dartsIntranet\dartsIntranetV2.1\App_Code\ACR.cs:264
   HudsonNash.AutomaticCrashRecognition.ACR.StoreBug() in c:\dartsIntranet\dartsIntranetV2.1\App_Code\ACR.cs:182
   HudsonNash.AutomaticCrashRecognition.ACR.DoACR() in c:\dartsIntranet\dartsIntranetV2.1\App_Code\ACR.cs:87
   HudsonNash.AutomaticCrashRecognition.ACR..ctor(String e, Page sender) in c:\dartsIntranet\dartsIntranetV2.1\App_Code\ACR.cs:64
   StartPage.PullADUser() in c:\dartsIntranet\dartsIntranetV2.1\StartPage.aspx.cs:999
   StartPage.Page_Load(Object sender, EventArgs e) in c:\dartsIntranet\dartsIntranetV2.1\StartPage.aspx.cs:165
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


Question by:daly29
    LVL 12

    Accepted Solution

    It is a permission issue. Change your application pool identity from "Network Service" to a Domain account. Should work here.

    Check this discussion for more details:

    Author Comment

    Thanks For your reply. did what suggested and just got a white screen. Have reset and get original error using a network service
    LVL 12

    Expert Comment

    can  you try using a local system account?

    Author Comment

    That is not working either

    Author Closing Comment

    Thanks I thought I had closed this question. Whilst the answer did not directly resolve my issue it was a good pointer so thank you for your time and response

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
    It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now