Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessing Active Directory in ASP.net locally works fine. After deploying the same code on server gives Authorization-errors

I'm currently developing an ASP.net application. On localhost I can access Active Directory when calling AuthorizationGroups. After I published my ASP.net app to the server, I can't access Active Directory. I need to know why this is occuring on the server, when locally it worked fine? Do I need to import special DLLs?

As said I try to get the AuthorizationGroups from ActiveDirectory, I get the following message from the server.

-While trying to retrieve the authorization groups, an error (5) occurred.

like image 677
Tassisto Avatar asked May 05 '11 08:05

Tassisto


People also ask

What is Active Directory in asp net?

NET applications need to interact with Microsoft Active Directory (AD) to authenticate users, get a list of users, retrieve groups, or determine which users are within which AD groups. There are a few different approaches you can use to retrieve information from your AD database within your domain.


1 Answers

Seriously, is that the full error information?

You Need to have logging of errors in place, even if that's the default that happens on an unhanded exception and you can check the Event Viewer.

So my answer is that you have to learn how to diagnose about any type of error in your site. If you are not prepared for that, it'll mean trouble later on when you are not the one that got the error.

As for the specific error, without the stacktrace we won't be able to advice you anymore than google. There isn't just one scenario where you can get that error, check the first few entries on google to see what I mean: http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=While+trying+to+retrieve+the+authorization+groups%2C+an+error+(5)+occurred

like image 200
eglasius Avatar answered Sep 27 '22 23:09

eglasius