开发者

WebSetUp with COM Registration

I have a c# asp.net website project in a solution (VS 2008). In this solution, there are 6 c# class library projects, each have wcf service classes.

All the 6 class library projects dlls are referred in the asp.net website project and it is shown in the bin directory. So this asp.net website is our hosting server for our wcf services. One of my c# class lib project is using a C++ dll, which calls another C# COM dll in application. So this C# COM dll is registered as COM using Regasm.exe and C++ is loaded using P/Invoke and it all working in the development environment.

Now, I want to make the set up of this server application and needs to host it in the IIS 7.5 (Win 7 32 bit OS). I downloaded the Web Deployment tool from the internet and created the setup using VS Web Setup and Deployment project. I am not able to register the C# COM dll in the installing machine through the SetUp.

In the setup project, I added the C# COM dll (myCOM.dll). When I added the myCOM.dll in to the Web folder of the web setup project, it adds 2 another files such as myCOM.DLL and myCOM.tlb along with myC开发者_开发技巧OM.dll.

I tried the following methods:

First Method:

I deleted the myCOM.DLL and myCOM.tlb. Then I selected the myCOM.dll and set the Register vsdrCOM in the property pane.

Then I installed in a machine. but myCOM.dll is not registered and tlb file is not generated in the Application Folder/bin folder. I don't know WHY ???

Second method.

I created a batch file, which contains the command for registering the dll from the current location of the batch file, which is shown below:

ECHO registering starts...

PAUSE

Regasm.exe "myCOM.dll" /tlb:myCOM.tlb \codebase --> [this will generate the tlb in the same location of myCOM.dll]

Then I created a custom installer and added this installer as a custom action in the set up project. [Install custom action]. In this installer class, I overrided the Install method and wrote code for executing the batch file from the location C:\inetpub\wwwroot\MyApp\bin.

Then I tried to install it in a machine. When it installs, the console window of the batch (cmd) appears for a second and suddenly cmd window closes. When the installation completes, i looked the c:\inetpub\wwwroot\MyApp\bin folder, there is nothing.

What could be the problem with my installation ???

Please throw some light on this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜