desperate call: referencing specific version Microsoft.Interop.Security.AzRolesassembly

W

Wiebe Tijsma

Hi,

I'm running a web application application using the
Microsoft.Interop.Security.AzRoles version 1.2.0.0 in the GAC.

After an upgrade to Vista, I also have a version 2.0.0.0 in the GAC.

I seem to be absolutely unable to make the application load version 1.2.

What I've tried:

- deleting all *.dll files under the solution folders

- setting 'specific version' to 'True' on all referencing projects

- adding this to the web.config:

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Interop.Security.AzRoles"
culture="neutral"
publicKeyToken="31bf3856ad364e35" version="1.2.0.0" />
<!--<codeBase version="1.2.0.0" /> -->
<!--<bindingRedirect
oldVersion="2.0.0.0"
newVersion="1.2.0.0"/> -->

</dependentAssembly>
</assemblyBinding>
</runtime>

- creating a binding redirect in the .NET FrameWork 2.0 configuration
from version 2.0.0.0 to 1.2.0.0 (this causes a manifest error, also
causes other applications using 2.0.0.0 to malfunction)

Any help is welcome!

Best regards,

Wiebe Tijsma
 
W

Willy Denoyette [MVP]

Wiebe Tijsma said:
Hi,

I'm running a web application application using the Microsoft.Interop.Security.AzRoles
version 1.2.0.0 in the GAC.

After an upgrade to Vista, I also have a version 2.0.0.0 in the GAC.

I seem to be absolutely unable to make the application load version 1.2.

What I've tried:

- deleting all *.dll files under the solution folders

- setting 'specific version' to 'True' on all referencing projects

- adding this to the web.config:

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Interop.Security.AzRoles"
culture="neutral"
publicKeyToken="31bf3856ad364e35" version="1.2.0.0" />
<!--<codeBase version="1.2.0.0" /> -->
<!--<bindingRedirect
oldVersion="2.0.0.0"
newVersion="1.2.0.0"/> -->

</dependentAssembly>
</assemblyBinding>
</runtime>

- creating a binding redirect in the .NET FrameWork 2.0 configuration from version 2.0.0.0
to 1.2.0.0 (this causes a manifest error, also causes other applications using 2.0.0.0 to
malfunction)

Any help is welcome!

Best regards,

Wiebe Tijsma


AzRoles is a COM automation server and the version included with Vista is version 2
(azroles.dll), that means that you have to use the v2 of the interop assembly. Any reason
why you want to use an "incompatible" version?

Willy.
 
W

Wiebe Tijsma

Willy Denoyette [MVP] schreef:
AzRoles is a COM automation server and the version included with Vista
is version 2 (azroles.dll), that means that you have to use the v2 of
the interop assembly. Any reason why you want to use an "incompatible"
version?

Willy.

Hi Willy,

Thanks for the answer.

There are some reasons for wanting to use the old version:
- The application is going to run on Windows 2003
- Other people are developing on older OS'es
- All current calls are incompatible with azroles.dll v2, all current
calls fail, and I can't rewrite them

Isn't it still weird though that the previous assembly gets completely
ignored, even though all the settings I've applied?

Shouldn't I just get a COM exception, because I'm using an older Interop
assembly for a newer COM dll?

Thanks in advance,

Wiebe Tijsma
 
W

Willy Denoyette [MVP]

Wiebe Tijsma said:
Willy Denoyette [MVP] schreef:

Hi Willy,

Thanks for the answer.

There are some reasons for wanting to use the old version:
- The application is going to run on Windows 2003
- Other people are developing on older OS'es
- All current calls are incompatible with azroles.dll v2, all current calls fail, and I
can't rewrite them

I'm afraid you'll have to build two versions of your application. Vista comes with
azroles.dll and it's Interop Assembly installed in the GAC, W2K3 comes with an other (older)
version of azroles.dll. What you are trying, is to access the newer azroles.dll with an
older (incompatible) version of the IA.
Isn't it still weird though that the previous assembly gets completely ignored, even
though all the settings I've applied?

The Interop Assembly isn't getting ignored, the IA used to create the RCW, but this one
isn't compatible with the underlying COM DLL (azroles.dll), and (more importantly) it's
registered typelib is incompatible.
Shouldn't I just get a COM exception, because I'm using an older Interop assembly for a
newer COM dll?

Not necessarily, all depends on the incompatibilities.

Willy.
 
W

Wiebe Tijsma

Jeez... Sounds I was naive to believe this 'DLL hell thing is all over
with this .NET 1.0' thing.

Yes I know it's COM, not my choice anyway :(

I'll still give registering the old DLL a try though.

Thanks for the answers!



Willy Denoyette [MVP] schreef:
 
W

Willy Denoyette [MVP]

Wiebe Tijsma said:
Jeez... Sounds I was naive to believe this 'DLL hell thing is all over with this .NET 1.0'
thing.

Yes I know it's COM, not my choice anyway :(

I'll still give registering the old DLL a try though.

Thanks for the answers!

This is not about DLL hell, this is about versioning. .NET doesn't solve that issue.
Note also that registering the "old" version is not a good idea (although I won't stop you
doing this ;-)), you don't know about the azroles.dll dependencies (dll's and API's), and,
this is a system component and as such not distributable.

Willy.
 
P

patrickmarch

This is not about DLL hell, this is about versioning. .NET doesn't solve that issue.
Note also that registering the "old" version is not a good idea (although I won't stop you
doing this ;-)), you don't know about theazroles.dll dependencies (dll's and API's), and,
this is a system component and as such not distributable.

Willy.

I am trying to deploy the vista azroles.dll (v6.0.6000.16386) to WinXP
and get an error when I try to register the dll.

The reason why I'm doing this is because v6.... has IAzClientContext3
that the lower one doesn't

Any clues as to why the regsvr32 azroles.dll is failing?

Thanks
 
P

patrickmarch

This is not about DLL hell, this is about versioning. .NET doesn't solve that issue.
Note also that registering the "old" version is not a good idea (although I won't stop you
doing this ;-)), you don't know about theazroles.dll dependencies (dll's and API's), and,
this is a system component and as such not distributable.

Willy.

I am trying to deploy the vista azroles.dll (v6.0.6000.16386) to
WinXP. When attempting the register the dll i get the following error
"LoadLibrary("azroles.dll") failed - The specified precedure could not
be found.

Any clues?
 

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

Top