Solved

Referencing ActiveX Components in .NET

Posted on 2004-03-29
5
421 Views
Last Modified: 2012-06-27
I am trying to use FTP features contained in InetCtlsObjects (MSINET.OCX) so I went Project > Add Reference... and clicked Browse and selected the file out of C:\WINDOWS\system32\.

But I got this error:

A reference to 'C:\WINDOWS\system32\MSINET.OCX' could not be added. Could not create the wrapper assembly for the ActiveX type library 'C:\WINDOWS\system32\MSINET.OCX\1' You may need to register it.


So I was wondering how I could go about fixing this problem, possibly registering it first, if so, how??

I am working on this project between home and school but I swear this component was working before at home (the same project works fine at school and references InetCtlsObjects just fine)

Does anyone have any ideas??

Thanks!
Jim Vosika
http://www.tinyclick.com
0
Comment
Question by:jvosika
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 15

Expert Comment

by:Timbo87
ID: 10708569
Start the Visual Studio .NET 2003 Command Prompt. It should be in the start menu in Visual Studio .NET Tools.
CD to c:\windows\system32
Type in: regasm msinet.ocx
and press enter.
0
 

Author Comment

by:jvosika
ID: 10708905
I was so excited but then the stupid thing errored out, here is what it said:

RegAsm error: Failed to load 'C:\WINDOWS\system32\msinet.ocx' because it is not a valid .NET assembly

Could my file be corrupt?
0
 

Author Comment

by:jvosika
ID: 10708996
I just downloaded a new msinet.ocx file off the net and that did nothing, I got the same error :(
0
 
LVL 15

Accepted Solution

by:
Timbo87 earned 500 total points
ID: 10709001
Try adding it on the toolbar. Right click the toolbar, Add/Remove Items, select the COM Components tab, and add Microsoft Internet Transfer Control. This will generate a wrapper class for the DLL. If this doesn't work then there may indeed be something wrong with the file.
0
 

Author Comment

by:jvosika
ID: 10709037
That did it! Thank you very much!
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question