Creation of simple COM-Objects fails after latest ASP.net security patch

J

Jan Peter Stotz

Hi.

I am in the progress of migrating an ASP/vbscript application to
ASP.net/VB.
At the moment my asp.net code still contais a lot of late bound
com-objects with worked well until I installed the latest asp.net
security-patch from MS.
The application is (at the moment) impersonated via web.config to a
domain administrators account (via aspnet_setreg.exe).

Now even the creation of the simplest Com-Object fails with a
System.Exception: Cannot create ActiveX component

<%@ Page Language="VB" Debug="true" ASPCompat="true" %>
<script runat="server">
Sub Page_Load (ByVal Sender As Object, _
ByVal E As EventArgs)
dim objRootDSE = GetObject("LDAP://rootDSE")
End Sub
</script>
<html><body>
</body></html>

Did any body else notices a similar behaviour or knows a way to avoid
this problem?

Jan
 
J

Jan Peter Stotz

Jan Peter Stotz schrieb:

Ok, no answers, but I was able to figure out what was the real problem.
At the moment my asp.net code still contais a lot of late bound
com-objects with worked well until I installed the latest asp.net
security-patch from MS.

It my have something to do with the mentioned patch but I am not sure.
Another mistake was, that not all com-objects were affected. I had several
independent problems with different COM objects.

The one reason was that I imported ActiveDS.tlb (I need the
SecurityDescriptor and AccessControllist) and it looks like this assembly
collides with some internal assembly of the same name.
My be for that reason under some circumstances the call
GetObject("LDAP://rootDSE") did not resolve the address in ActiveDirectory
but in local filesystem (really strange).
Now, I bypass this problem by using the System.DirectoryServices classes:
DirectoryEntry rootDSE = new DirectoryEntry("LDAP://RootDSE");

And the ActiveDS.tlb now uses a different name is only used via fully
qualified Classnames (now ActiveDIS.Securitydescriptor).

Jan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top