Problems with Name Translation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I am sorry for posting the following dumb question but I have a problem and need help. I am a newbie in this area..

I am trying to translate an AD user name into an FDQN and then bind to the AD and read all attributes for the user

I am using VB.NET 2003 and have the ActiveDS reference loaded

I cut and pasted some example code (see below) but it doesn't work forme

Dim nto As ActiveDs.IADsNameTranslat
Dim dso As Strin
Dim trans As Strin
dso = "Wilson
nto.Init(1, Domain

nto.Set(3, dso
trans = nto.Get(1

Instead of getting a result I get the error message

Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object

Source Error:

Line 44:
Line 45: dso = "Wilson
Line 46: nto.Init(1, Domain
Line 47:
Line 48: nto.Set(3, dso

Line 44 is highlighted

Can anyone else. I am also getting an intermittent error that reports

Compiler Error Message: BC31011: Unable to load referenced library 'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\selfservice\db8553d0\167d2047\assembly\dl2\0d745bf6\0060a90f_c6f2c201\interop.activeds.dll': Access is denied

All help is appreciated
Wilson
 
Heyas,

The only dumb question is the one not asked, if you don't ask then you don't learn. End Preach.

Ok your problem is this "Dim nto As ActiveDs.IADsNameTranslate" your declaring it but not initializing it. It should be like so "Dim nto As New ActiveDs.IADsNameTranslate", note the keyword "New". That should fix that problem. If not then I need to see more code.

As to your intermitent access denied problem. The official help file answer is this.

A library referenced by this project could not be loaded.
To correct this error
Verify that the file is in the specified location, and is not locked by another application.

However, that isn't that useful. Other schools of thought on the issue is that turning off indexing, via "Control Panel | Add/Remove Programs | Windows COmponents" will stop the error, though this only seems to work in about 50% of the cases.

Additionally the painful way of working around this is to recycle IIS. I know it is a painful but I, and this is my personal thought, suspect that there is a problem with the ASPNET_WP.exe. This is the process that your .NET web apps run in.

And finally the last ditch effort to end all, the reboot your machine of the IIS/.NET world, rebind your .NET framework to your IIS install. I make it sound more painful than it actually is, but 96% of the time it fixes all the errors you will see with IIS and ASP.NET. So here goes. Navigate to "C:\WINDOWS\Microsoft.NET\Framework\<Framework Version>\" and run "aspnet_regiis.exe /i". It ill run for about a minute and a half and then just see how it goes from there. This will more than likely fix the issue, usually does.

Hope this helps.

Enjoy!!

-Evan
<The wannabe MVP>
 
Back
Top