473,396 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Problems with Name Translation

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\temp orary asp.net files\selfservice\db8553d0\167d2047\assembly\dl2\0 d745bf6\0060a90f_c6f2c201\interop.activeds.dll': Access is denied

All help is appreciated
Wilson

Jul 21 '05 #1
2 3571
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>

"Wilson" <an*******@discussions.microsoft.com> wrote in message news:84**********************************@microsof t.com...
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.IADsNameTranslate
Dim dso As String
Dim trans As String
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\temp orary asp.net files\selfservice\db8553d0\167d2047\assembly\dl2\0 d745bf6\0060a90f_c6f2c201\interop.activeds.dll': Access is denied.

All help is appreciated,
Wilson.

Jul 21 '05 #2
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>

"Wilson" <an*******@discussions.microsoft.com> wrote in message news:84**********************************@microsof t.com...
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.IADsNameTranslate
Dim dso As String
Dim trans As String
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\temp orary asp.net files\selfservice\db8553d0\167d2047\assembly\dl2\0 d745bf6\0060a90f_c6f2c201\interop.activeds.dll': Access is denied.

All help is appreciated,
Wilson.

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Michael Foord | last post by:
Here's a little oddity with 'print' being a reserved word... >>> class thing: pass >>> something = thing() >>> something.print = 3 SyntaxError: invalid syntax >>> print something.__dict__...
5
by: Web Developer | last post by:
Hi, I read that identifiers should not start with an underscore in order to prevent LINKAGE problems. I am not familar with this concept of "linkage", so can someone provide a simple...
4
by: Ives Steglich | last post by:
hi there i have a line like: boost::bind(&EventSource<SinkType>::fire<Op>,boost::ref(fireProc),_1) and this generates an error like: eventsource.h: In member function `void...
10
by: puzzlecracker | last post by:
can someone explain why int k; canNOT be definied in .h file? what are general rules for what can/cannot be placed in .h file. FAQ doesn't seem to address this problem.
4
by: B. Fletcher | last post by:
Hi, I'm having some trouble with javascript code of mine: When the script runs, I vget an error in line 119: Number Expected. I'm not sure as to why this is happening. Any advice would be...
2
by: DOA | last post by:
Help! I've been doing C language development for a long time, but this problem has me stumped. I would like the user to be able to enter the name of a function that has been linked into the...
5
by: Hendrik Schober | last post by:
Hi, we just run into the problem, that "default" alignment in the project properies dialog seem to be different. We have a project that's a DLL, which is linked with a couple of LIBs. All are...
3
by: Dave | last post by:
Hello everyone, its me again. I have been stuck on this problem forever, and cannot find any documentation or any help to solve it. From what I have seen online, what I need to do should be...
2
by: morten44 | last post by:
Hello, I have just been to come2linux http://www.come2linux.org/psp/ and succesfully tried http://www.tntnet.org/ it really works, I have also experimented with apache and it is no...
2
by: Azzuron | last post by:
We are trying to translate some raw flat data into a cart. What we have done is BCP the raw files into the database, and then we begin to run a series of SQL commands to copy the data and format it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.