By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,938 Members | 1,578 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,938 IT Pros & Developers. It's quick & easy.

C# ActiveX Control won't load on some machines, does on others

P: n/a
Hi,

Our team have a web project which includes some C# ActiveX DLLs.

On some developers' PCs, the code which calls methods in the ActiveX
dll is succesful - no exceptions. On other PCs, the ActiveX control
doesn't even seem to get loaded. (On the failing machines, if we try
and debug down to where the ActiveX DLL method is invoked, both Visual
Studio
and IE hang.)

So there seems to be inconsistencies between the environment on the
different PCs which either does or doesn't allow the DLL to run, or
get registered, or have the right permissions.

My question is, what in the environment configuration can affect
whether an ActiveX DLL can load or not?

Thanks in advance

Artie

Mar 2 '07 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Could we explain the definitions first? What *IS* a "C# ActiveX control",
specifically?
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Artie" wrote:
Hi,

Our team have a web project which includes some C# ActiveX DLLs.

On some developers' PCs, the code which calls methods in the ActiveX
dll is succesful - no exceptions. On other PCs, the ActiveX control
doesn't even seem to get loaded. (On the failing machines, if we try
and debug down to where the ActiveX DLL method is invoked, both Visual
Studio
and IE hang.)

So there seems to be inconsistencies between the environment on the
different PCs which either does or doesn't allow the DLL to run, or
get registered, or have the right permissions.

My question is, what in the environment configuration can affect
whether an ActiveX DLL can load or not?

Thanks in advance

Artie

Mar 2 '07 #2

P: n/a
On 2 Mar, 22:58, Peter Bromberg [C# MVP]
<pbromb...@yahoo.yabbadabbadoo.comwrote:
Could we explain the definitions first? What *IS* a "C# ActiveX control",
specifically?
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net

"Artie" wrote:
Hi,
Our team have a web project which includes some C# ActiveX DLLs.
On some developers' PCs, the code which calls methods in the ActiveX
dll is succesful - no exceptions. On other PCs, the ActiveX control
doesn't even seem to get loaded. (On the failing machines, if we try
and debug down to where the ActiveX DLL method is invoked, both Visual
Studio
and IE hang.)
So there seems to be inconsistencies between the environment on the
different PCs which either does or doesn't allow the DLL to run, or
get registered, or have the right permissions.
My question is, what in the environment configuration can affect
whether an ActiveX DLL can load or not?
Thanks in advance
Artie- Hide quoted text -

- Show quoted text -
It's a control we've written in C# that gets built as an ActiveX DLL.

It resides in a folder called ActiveX which is below the root of our
IIS site.
The relevant piece ASP code refers to the dll as follows:

<object id="testID" style="display:none;" classid="/ActiveX/
Test.ActiveX.dll#Test.ActiveX.Processors.Processor "></object>

The web app works fine on some machines, but doesn't on others - the
DLL doesn't get loaded.

We've eliminated XP Service Packs, Hotfixes, IE versions etc as being
the cause. We've put various users in the Administrators group, and
ensured all folders have read/write access.

We think it's got something to do with permissions, but we don't know.

Any help would be much appreciated.

Artie

Mar 5 '07 #3

P: n/a
OK, that's not an "ActiveX Control"; there is no COM involved. What you have
is a .Net UserControl that you want to host in Internet Explorer. And yes,
there are security issues involved. Specifically, try settings in the .NET
Configuration wizards in Control Panel. At a minimum, you would need to grant
Full Trust to the url.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Artie" wrote:
On 2 Mar, 22:58, Peter Bromberg [C# MVP]
<pbromb...@yahoo.yabbadabbadoo.comwrote:
Could we explain the definitions first? What *IS* a "C# ActiveX control",
specifically?
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net

"Artie" wrote:
Hi,
Our team have a web project which includes some C# ActiveX DLLs.
On some developers' PCs, the code which calls methods in the ActiveX
dll is succesful - no exceptions. On other PCs, the ActiveX control
doesn't even seem to get loaded. (On the failing machines, if we try
and debug down to where the ActiveX DLL method is invoked, both Visual
Studio
and IE hang.)
So there seems to be inconsistencies between the environment on the
different PCs which either does or doesn't allow the DLL to run, or
get registered, or have the right permissions.
My question is, what in the environment configuration can affect
whether an ActiveX DLL can load or not?
Thanks in advance
Artie- Hide quoted text -
- Show quoted text -

It's a control we've written in C# that gets built as an ActiveX DLL.

It resides in a folder called ActiveX which is below the root of our
IIS site.
The relevant piece ASP code refers to the dll as follows:

<object id="testID" style="display:none;" classid="/ActiveX/
Test.ActiveX.dll#Test.ActiveX.Processors.Processor "></object>

The web app works fine on some machines, but doesn't on others - the
DLL doesn't get loaded.

We've eliminated XP Service Packs, Hotfixes, IE versions etc as being
the cause. We've put various users in the Administrators group, and
ensured all folders have read/write access.

We think it's got something to do with permissions, but we don't know.

Any help would be much appreciated.

Artie

Mar 6 '07 #4

P: n/a
On 6 Mar, 02:05, Peter Bromberg [C# MVP]
<pbromb...@yahoo.yabbadabbadoo.comwrote:
OK, that's not an "ActiveXControl"; there is no COM involved. What you have
is a .Net UserControl that you want to host in Internet Explorer. And yes,
there are security issues involved. Specifically, try settings in the .NET
Configuration wizards in Control Panel. At a minimum, you would need to grant
Full Trust to the url.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net

"Artie" wrote:
On 2 Mar, 22:58, Peter Bromberg [C# MVP]
<pbromb...@yahoo.yabbadabbadoo.comwrote:
Could we explain the definitions first? What *IS* a "C#ActiveXcontrol",
specifically?
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Artie" wrote:
Hi,
Our team have a web project which includes some C#ActiveXDLLs.
On some developers' PCs, the code which calls methods in theActiveX
dll is succesful - no exceptions. On other PCs, theActiveXcontrol
doesn't even seem to get loaded. (On the failing machines, if we try
and debug down to where theActiveXDLL method is invoked, both Visual
Studio
and IE hang.)
So there seems to be inconsistencies between the environment on the
different PCs which either does or doesn't allow the DLL to run, or
get registered, or have the right permissions.
My question is, what in the environment configuration can affect
whether anActiveXDLL can load or not?
Thanks in advance
Artie- Hide quoted text -
- Show quoted text -
It's a control we've written in C# that gets built as anActiveXDLL.
It resides in a folder calledActiveXwhich is below the root of our
IIS site.
The relevant piece ASP code refers to the dll as follows:
<object id="testID" style="display:none;" classid="/ActiveX/
Test.ActiveX.dll#Test.ActiveX.Processors.Processor "></object>
The web app works fine on some machines, but doesn't on others - the
DLL doesn't get loaded.
We've eliminated XP Service Packs, Hotfixes, IE versions etc as being
the cause. We've put various users in the Administrators group, and
ensured all folders have read/write access.
We think it's got something to do with permissions, but we don't know.
Any help would be much appreciated.
Artie- Hide quoted text -

- Show quoted text -
Peter,

Thanks for the clarification over the control type.

I followed your suggestion re the .NET config wizards (in
Administrative Tools), but these actions had no effect - we're still
getting the DLL loading on some machines and not others.

I did the following:

Adjusted .NET Security to Full Trust
Added the URL to Trusted Sites, and gave that Full Trust
Trusted the Assembly itself
I've checked the dependencies for the dll on the PC and they're all
fine too.

I should mention that I've tried accessing the site (and therefore
trying to invoke the dll on the web server) from IE5.5, IE6 and
IE6SP2, all with the same results, so it's definitely a server-side
config/security issue.

We do have other (non .NET) server-side DLLs that seem to work without
any problems on every machine.

Any other thoughts? Any IIS 5.1 peculiarities that typically catch
folk out?

Artie

Mar 6 '07 #5

P: n/a
Firstly, you need to determine if your issue is related to CAS policy. Turn
CAS policy off on the machine, purge the assembly download cache, close IE
and re-open to the URL. If your control doesn't load, this is not a CAS
policy issue. If your control loads, turn CAS policy back on and add
full_trust to the all_code group. This is a required work-around to a CAS
design flaw.

Follow that by adding a custom code group and configure permissions for the
control. See this link: http://support.microsoft.com/kb/555688

--
Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET is coming...
OWC Black book on Amazon and
www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
"Artie" <ar********@yahoo.co.ukwrote in message
news:11*********************@p10g2000cwp.googlegro ups.com...
On 6 Mar, 02:05, Peter Bromberg [C# MVP]
<pbromb...@yahoo.yabbadabbadoo.comwrote:
>OK, that's not an "ActiveXControl"; there is no COM involved. What you
have
is a .Net UserControl that you want to host in Internet Explorer. And
yes,
there are security issues involved. Specifically, try settings in the
.NET
Configuration wizards in Control Panel. At a minimum, you would need to
grant
Full Trust to the url.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net

"Artie" wrote:
On 2 Mar, 22:58, Peter Bromberg [C# MVP]
<pbromb...@yahoo.yabbadabbadoo.comwrote:
Could we explain the definitions first? What *IS* a
"C#ActiveXcontrol",
specifically?
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Artie" wrote:
Hi,
Our team have a web project which includes some C#ActiveXDLLs.
On some developers' PCs, the code which calls methods in theActiveX
dll is succesful - no exceptions. On other PCs, theActiveXcontrol
doesn't even seem to get loaded. (On the failing machines, if we
try
and debug down to where theActiveXDLL method is invoked, both
Visual
Studio
and IE hang.)
So there seems to be inconsistencies between the environment on the
different PCs which either does or doesn't allow the DLL to run, or
get registered, or have the right permissions.
My question is, what in the environment configuration can affect
whether anActiveXDLL can load or not?
Thanks in advance
Artie- Hide quoted text -
- Show quoted text -
It's a control we've written in C# that gets built as anActiveXDLL.
It resides in a folder calledActiveXwhich is below the root of our
IIS site.
The relevant piece ASP code refers to the dll as follows:
<object id="testID" style="display:none;" classid="/ActiveX/
Test.ActiveX.dll#Test.ActiveX.Processors.Processor "></object>
The web app works fine on some machines, but doesn't on others - the
DLL doesn't get loaded.
We've eliminated XP Service Packs, Hotfixes, IE versions etc as being
the cause. We've put various users in the Administrators group, and
ensured all folders have read/write access.
We think it's got something to do with permissions, but we don't know.
Any help would be much appreciated.
>Artie- Hide quoted text -

- Show quoted text -

Peter,

Thanks for the clarification over the control type.

I followed your suggestion re the .NET config wizards (in
Administrative Tools), but these actions had no effect - we're still
getting the DLL loading on some machines and not others.

I did the following:

Adjusted .NET Security to Full Trust
Added the URL to Trusted Sites, and gave that Full Trust
Trusted the Assembly itself
I've checked the dependencies for the dll on the PC and they're all
fine too.

I should mention that I've tried accessing the site (and therefore
trying to invoke the dll on the web server) from IE5.5, IE6 and
IE6SP2, all with the same results, so it's definitely a server-side
config/security issue.

We do have other (non .NET) server-side DLLs that seem to work without
any problems on every machine.

Any other thoughts? Any IIS 5.1 peculiarities that typically catch
folk out?

Artie

Mar 7 '07 #6

P: n/a
On 7 Mar, 01:14, "Alvin Bruney [MVP]" <some guy without an email
addresswrote:
Firstly, you need to determine if your issue is related to CAS policy. Turn
CAS policy off on the machine, purge the assembly download cache, close IE
and re-open to the URL. If your control doesn't load, this is not a CAS
policy issue. If your control loads, turn CAS policy back on and add
full_trust to the all_code group. This is a required work-around to a CAS
design flaw.

Follow that by adding a custom code group and configure permissions for the
control. See this link:http://support.microsoft.com/kb/555688

--
Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET is coming...
OWC Black book on Amazon andwww.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley

"Artie" <artiele...@yahoo.co.ukwrote in message

news:11*********************@p10g2000cwp.googlegro ups.com...
On 6 Mar, 02:05, Peter Bromberg [C# MVP]
<pbromb...@yahoo.yabbadabbadoo.comwrote:
OK, that's not an "ActiveXControl"; there is no COM involved. What you
have
is a .Net UserControl that you want to host in Internet Explorer. And
yes,
there are security issues involved. Specifically, try settings in the
.NET
Configuration wizards in Control Panel. At a minimum, you would need to
grant
Full Trust to the url.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Artie" wrote:
On 2 Mar, 22:58, Peter Bromberg [C# MVP]
<pbromb...@yahoo.yabbadabbadoo.comwrote:
Could we explain the definitions first? What *IS* a
"C#ActiveXcontrol",
specifically?
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Artie" wrote:
Hi,
Our team have a web project which includes some C#ActiveXDLLs.
On some developers' PCs, the code which calls methods in theActiveX
dll is succesful - no exceptions. On other PCs, theActiveXcontrol
doesn't even seem to get loaded. (On the failing machines, if we
try
and debug down to where theActiveXDLL method is invoked, both
Visual
Studio
and IE hang.)
So there seems to be inconsistencies between the environment on the
different PCs which either does or doesn't allow the DLL to run, or
get registered, or have the right permissions.
My question is, what in the environment configuration can affect
whether anActiveXDLL can load or not?
Thanks in advance
Artie- Hide quoted text -
- Show quoted text -
It's a control we've written in C# that gets built as anActiveXDLL.
It resides in a folder calledActiveXwhich is below the root of our
IIS site.
The relevant piece ASP code refers to the dll as follows:
<object id="testID" style="display:none;" classid="/ActiveX/
Test.ActiveX.dll#Test.ActiveX.Processors.Processor "></object>
The web app works fine on some machines, but doesn't on others - the
DLL doesn't get loaded.
We've eliminated XP Service Packs, Hotfixes, IE versions etc as being
the cause. We've put various users in the Administrators group, and
ensured all folders have read/write access.
We think it's got something to do with permissions, but we don't know.
Any help would be much appreciated.
Artie- Hide quoted text -
- Show quoted text -
Peter,
Thanks for the clarification over the control type.
I followed your suggestion re the .NET config wizards (in
Administrative Tools), but these actions had no effect - we're still
getting the DLL loading on some machines and not others.
I did the following:
Adjusted .NET Security to Full Trust
Added the URL to Trusted Sites, and gave that Full Trust
Trusted the Assembly itself
I've checked the dependencies for the dll on the PC and they're all
fine too.
I should mention that I've tried accessing the site (and therefore
trying to invoke the dll on the web server) from IE5.5, IE6 and
IE6SP2, all with the same results, so it's definitely a server-side
config/security issue.
We do have other (non .NET) server-side DLLs that seem to work without
any problems on every machine.
Any other thoughts? Any IIS 5.1 peculiarities that typically catch
folk out?
Artie- Hide quoted text -

- Show quoted text -
Thanks for your suggestion Alvin.

I turned off CAS policy, cleared the assembly cache, closed IE, and
restart the web app. Same issue - control didn't load.

I also glanced through a couple of your articles, but couldn't see
anything obvious.

Anything else you can think of?

Artie

Mar 7 '07 #7

P: n/a
This sounds like a similar problem to what we are having also...

ActiveX runs ok on some PCs with Windows XP and IE7 and not on others?

We have found that if the activeX was installed prior to the IE7 update then
our activeX runs perfectly and we can also detect the version (important for
updates). But if the activeX is installed after updating to IE7 then the
activeX is not run. Nor can it be detected and it doesn't show in "managed
add-ons".

At the moment we are trying to find out how it can be installed and accepted
as a "Managed add-on" in IE7. Web searches have turned up a lot of discussion
about not be able to detect plugin/version in IE7 at all, and wondering how
other developers are coping?

- Is there a solution?


May 24 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.