Web Server Can't Reference LDAPRSS

1 reply

Last post Aug 20, 2014 09:45 AM by Perkinsville

  • Web Server Can't Reference LDAP

    Aug 19, 2014 08:11 AM|ramelllamar|LINK

    I have a web app (C# 4.5) that I'm currently developing, and I need to use LDAP to authenticate the users. I was able to run the web app on my local machine and authenticate using my creds (while using LDAP) w/o issues, but when I deploy the code to the web server (IIS 7.0) I get the error message below. I'm pretty sure that Its related to LDAP, because I commented out the LDAP reference in the code, deployed the code to the server, and I didn't receive any errors. I didn't think that I had to register any components to use LDAP (outside of listing it in the web config file) Does anyone have any ideas what I need to do to use/reference LDAP on a web sever?

    Event code: 3005 

    Event message: An unhandled exception has occurred. 
    Event time: 8/18/2014 6:26:17 PM 
    Event time (UTC): 8/18/2014 10:26:17 PM 
    Event ID: 1c0fc255dda64258b56401d04bf6c740 
    Event sequence: 4 
    Event occurrence: 1 
    Event detail code: 0 

    Application information: 
        Application domain: /LM/W3SVC/3/ROOT-2-130528743727117130 
        Trust level: Full 
        Application Virtual Path: / 
        Application Path: E:\DSDSummary_Test\ 
        Machine name: MT000XSRPT91 

    Process information: 
        Process ID: 4204 
        Process name: w3wp.exe 
        Account name: IIS APPPOOL\DSDSummary 

    Exception information: 
        Exception type: NullReferenceException 
        Exception message: Object reference not set to an instance of an object.
       at DSD_Summary.Summary_Positioning.Page_Load(Object sender, EventArgs e)
       at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
       at System.Web.UI.Control.OnLoad(EventArgs e)
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)



    Request information: 
        Request URL: http://mt000xsrpt91:83/Summary_Positioning.aspx 
        Request path: /Summary_Positioning.aspx 
        User host address: 2002:bf8:1aa3::bf8:1aa3 
        User: FEDERATED\B003322 
        Is authenticated: True 
        Authentication Type: Negotiate 
        Thread account name: IIS APPPOOL\DSDSummary 

    Thread information: 
        Thread ID: 10 
        Thread account name: IIS APPPOOL\DSDSummary 
        Is impersonating: False 
        Stack trace:    at DSD_Summary.Summary_Positioning.Page_Load(Object sender, EventArgs e)
       at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
       at System.Web.UI.Control.OnLoad(EventArgs e)
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    ldap

  • Re: Web Server Can't Reference LDAP

    Aug 20, 2014 09:45 AM|Perkinsville|LINK

    Hi,

    You might consider using Process Monitor and see if you get any access denied errors.

    You might also consider running the application pool with a custom identity.

    When you run from your machine, the worker process runs in your identity, when it runs on the server it uses the Application Pool identity.  So perhaps that identity on the IIS server does not have access to the resource you are wanting.

    Make sure you place your code in a try...catch so your don't crash the worker process.

    HTH, Benjamin

    ldap