473,382 Members | 1,252 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,382 software developers and data experts.

deploying app with existing COM

In this case I would like my application to be able to use exisiting
registered COM components. I dont want to re-register them.

While I am copying the interop DLL with the exe to the same directory, I get
a message that says the COM component or one of its dependencies cannot be
found.
[ This was for a simple one we developed using VB 6 ]

I also tried just using the File Scripting Object ( scrun.dll ), but that
also gave drove out a permission error.

What process should I follow ? I expected that the exe would find the
interop DLL and simply look at the registry and bind it .... Thanks

--
Andrew
Nov 16 '05 #1
8 1338
I also tried just using the File Scripting Object ( scrun.dll ), but that
also gave drove out a permission error.


if your script failed to create the VB6 object then it is not registered,
and therefore the interop won't work...
Nov 16 '05 #2
Hi Andrew,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that when you have deployed your application
on a computer, a message that says the COM component or one of its
dependencies cannot be found. If there is any misunderstanding, please feel
free to let me know.

Generally, when this message appears, I think one of the COM component
you're interoping hasn't been registerd yet. We have to copy that COM DLL
to C:\Windows\System32, and register it with regsvr32.exe.

HTH. If anything is unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #3
Of the 2 instances of the problem, the com componet issue was caused by a
very specific reference to the interop DLL in the code ( complete path -
down VS Projects.. )

I had ... System.Relection.Assembly.LoadFrom(.....assemblypa th/...);

when I recompiled with no path iml\plying the DLL is in the application
directory then it works.

BUT in the second instance - I simply made a COM interop DLL to the existing
SCRUN.DLL - then on the target machines I got a security violation.

The code inside is just 3 lines:

Scripting.FileSystemObjectClass FSO = new FileSystemObjectClass();
int numDrives = FSO.Drives.Count;
lblNumDrives.Text=Convert.ToString(numDrives);

So why would I get : System.Security.SecurityException ???

"Kevin Yu [MSFT]" wrote:
Hi Andrew,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that when you have deployed your application
on a computer, a message that says the COM component or one of its
dependencies cannot be found. If there is any misunderstanding, please feel
free to let me know.

Generally, when this message appears, I think one of the COM component
you're interoping hasn't been registerd yet. We have to copy that COM DLL
to C:\Windows\System32, and register it with regsvr32.exe.

HTH. If anything is unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #4
Hi

From you description, do you mean you have a .net application which will
use a SCRUN.DLL(a common com dll) to do some job, and on target machine you
get exception. If I have any misunderstanding, please feel free to post
here.

Also what is the exact error message? And which code line cause the
exception?

To isolate if the problem is caused by the CLR security check or underlying
win32 check, we can try to use the caspol tool to shut down the clr
security check.
caspol -s[ecurity] { on | off }
Turn security on or off

We can turn off the security check by running the code below.
caspol -s off

NOTE: this is for test purpose please enable the security check after test.
caspol -s on

For detailed information about caspol, please refer to the link below.
Code Access Security Policy Tool (Caspol.exe)
http://msdn.microsoft.com/library/de...us/cptools/htm
l/cpgrfcodeaccesssecuritypolicyutilitycaspolexe.asp

If this works after call(caspol -s off), we will know that the problem is
caused by clr security check.
You may try to run the application under same account and run on the local
machine, both the interop dll the managed app and the com dll will be on
the same machine.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 16 '05 #5
The error was caused when my remote testers did not include the interop DLL
in the same directory. Would be nice if teh .NET knew that or offered that as
a possible cause. THANKS

"andrewcw" wrote:
In this case I would like my application to be able to use exisiting
registered COM components. I dont want to re-register them.

While I am copying the interop DLL with the exe to the same directory, I get
a message that says the COM component or one of its dependencies cannot be
found.
[ This was for a simple one we developed using VB 6 ]

I also tried just using the File Scripting Object ( scrun.dll ), but that
also gave drove out a permission error.

What process should I follow ? I expected that the exe would find the
interop DLL and simply look at the registry and bind it .... Thanks

--
Andrew

Nov 16 '05 #6
The error was caused when my remote testers did not include the interop DLL
in the same directory. Would be nice if teh .NET knew that or offered that as
a possible cause. THANKS

"andrewcw" wrote:
In this case I would like my application to be able to use exisiting
registered COM components. I dont want to re-register them.

While I am copying the interop DLL with the exe to the same directory, I get
a message that says the COM component or one of its dependencies cannot be
found.
[ This was for a simple one we developed using VB 6 ]

I also tried just using the File Scripting Object ( scrun.dll ), but that
also gave drove out a permission error.

What process should I follow ? I expected that the exe would find the
interop DLL and simply look at the registry and bind it .... Thanks

--
Andrew

Nov 16 '05 #7
Hi Andrew,

Thanks for sharing your experience with all the people here. If you have
any questions, please feel free to post them in the community.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #8
Hi Andrew,

Thanks for sharing your experience with all the people here. If you have
any questions, please feel free to post them in the community.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #9

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

Similar topics

2
by: Phil S. | last post by:
I am using Visual Studio .Net setup project to deploy a visual basic application. Nothing fancy, just a regular old setup wizard to install the program on a computer. My problem is: If the...
0
by: SWu | last post by:
Hi all Could someone please tell me how to configure and deploy my Crystal reports? Any help would be greatly appreciated. I want to be able to deploy my reports/web pages to another domain,...
2
by: Tom N | last post by:
Here's is our configuration ..Net Framework 1.1, Windows 2000, AppCenter 200 Our developers use XCOPY to deploy to the AppCenter NLB cluster (obviously, to the node that is the controller ...
0
by: Arne Beruldsen | last post by:
I've created a fairly simply web app via VBNet. I would like to integrate the pages to my existing site. I'm using Frontpage to manage my site. How do I deploy the created app?? Many Thanks.
10
by: fenway | last post by:
Hi, I'm new to ASP.NET and just finished up a small application. Essentially it's just a form that writes data to a CSV file on the server after a user fills in the form. The code compiles and...
12
by: Jozef | last post by:
I have a custom menu bar that I seem to be having trouble deploying with the database. This type of custom object is kept in the System.mdw correct? I have a target machine that won't let go of...
6
by: Ryan | last post by:
Is there any way to save a VB 2005 created application as an .MSI install file? The only method I see is to publish as a .EXE. Curious because I want to push out an application with Group Policy....
17
by: ARC | last post by:
Hello again, I'm close to the end of converting a large app from access 97 to 2007. I have many users on the old system, with the db's in Access 97, and here's what I'm thinking of doing to...
12
by: ARC | last post by:
I'm currently looking at the access developer extensions for creating an MSI installer package for a 2007 runtime app. Couple of observations and questions. 1) Doesn't look like we have the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.