Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6246051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:37:09+00:00 2026-05-24T12:37:09+00:00

I am trying to make a simple web application using ASP.NET and Interop COM.

  • 0

I am trying to make a simple web application using ASP.NET and Interop COM.

The main question is: How to make Interop COM works in client side?

I am Using:

IIS Windows Server 2008
C# Interop COM – Visual Studio 2010
Asp .NET – Visual Studio 2010

After looking at these articles
http://msdn.microsoft.com/en-us/library/aa479302.aspx
and http://msdn.microsoft.com/en-us/magazine/cc301832.aspx.
I tried to use the component on the client side in two ways:

First:

<object id="Obj" codebase="MyApp.dll#version=1,0,0,0" classid="clsid:C6659361-1625-4746-931C-36014B146679" VIEWASTEXT></object> 
    <script type="text/javascript" >
        function test() {
            alert('TEst');
            Obj.PrintHi();
            alert('and');
        }
    </script>

Second:
in .aspx

<object id="Obj" codebase="MyApp.dll#version=1,0,0,0" classid="clsid:C6659361-1625-4746-931C-36014B146679" VIEWASTEXT></object>

and in .cs file:

RegisterClientScriptBlock("showSaveMessage", "<script language=\"JavaScript\"> Obj.PrintHi();  </script>");

In server side I open Internet Explorer and works like a charm. But in client side appears: Object doesn’t support this property or method.

I also tried:

<%
    set Obj = CreateObject("MyApp.MyClass")

    Obj.PrintHi
%>

Works for both side, but only call MyApp.dll installed on the server side.

Using ‘object tag’ is the correct way? Is there another way to use COM in client side? How to configure IIS to avoid Object doesn’t support this property or method in client side?

Thanks in Advance

1# Update

I create ASP.NET C# in Visual Studio 2010 on Windows XP 32bits that uses a C# Interop COM.
On my machine “Windows XP” I do Start Debugging and IE page opens with my application. This works.
So I copied the project to Windows Server 2008 and added the project in IIS. When I run IIS opens IE and this works.

After this I tried to make the final test, So I open the IE on Windows XP and type the address that Windows Server generated, fine, I can see the page, but when I click to run the function, Appears: “Object does not support this property or method”.

Server:
Windows 2008 R2 64bits
IE version 9

Client:
Windows XP 32bits
IE version 8

2# Update

I tried another test

I made a new Component COM
IClassTest.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace MyCOM
{
    [ComVisible(true)]
    [Guid("8F388924-7743-4166-993F-CBF897D08A8B")]
    public interface IClassTest
    {
        string getString(string str);
    }
}

ClassTest.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace MyCOM
{
    [ComVisible(true)]
    [Guid("1AE4AD64-A951-4E6C-8600-AA1F08810DDD")]
    public class ClassTest : IClassTest
    {
        public string getString(string str)
        {
            return str + "1";
        }
    }
}

In AssemblyInf.cs has [assembly: ComVisible(true)]

I made another asp application:

<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="asp_test._Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
<object id="Obj" codebase="MyCOM.dll#version=1,0,0,0" classid="clsid:1AE4AD64-A951-4E6C-8600-AA1F08810DDD" VIEWASTEXT></object> 
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">

<script type="text/javascript" >
    function test() {
        var test = Obj.getString('2');
        alert(test);
    }
    </script>
    <input name="btnTest" value="Call COM" onclick="test()" style=" width: 400px;" type="button">
</asp:Content>

I change IE settings to display ActiveX not trust and run the program.
In windows XP works, In Windows Server works. But when try to call the page from windows XP “Windows XP call Windows 2008 page” appears: “Object doesn’t support this property or method”

If on client side I do regasm /u MyCOM.dll the IE prompted to install the component.
The dll is stored in the C:\WINDOWS\Downloaded Program Files, if I try to install more than once, creates a folder called CONFLICT.1.. C:\WINDOWS\Downloaded Program Files\CONFLICT.1 very strange. I also tried to register this downloaded component with regasm MyCOM.dll /codebase.

Server .NET: C:\Windows\Microsoft.NET\Framework\v4.0.30319
Client .NET: C:\Windows\Microsoft.NET\Framework\v4.0.30319

Why not work? It makes no sense.

3# Update

I ran on another machine “Client”. I change IE settings to run not safe ActiveX. And Works, After this I tried on Windows XP Client I reseted the settings and set up again to run ActiveX not safe. This Works.

Now the problem is related to Install Interop COM from ASP. I tried to install but appears: Object doesn’t support this property or method. I think it is related to Safe Inicialization. I found this link: http://msdn.microsoft.com/en-us/library/aa751977.aspx#iobjsafe but is for C++, Is there C# examples?

4# Update

I tried to use:
public class ClassTest : System.Windows.Forms.UserControl, IClassTest
I also tried to do a .cab file but does not work.

Have I to make wpf project? Why this does not work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T12:37:10+00:00Added an answer on May 24, 2026 at 12:37 pm

    I found the solution: Deploy C# ActiveX in a CAB for Internet Explorer use

    I did the following:

    Strong-named the assembly.
    Created an INF file
    Created an MSI using the Visual Studio 2010 “Setup Project” template.
    Created a CAB file using “Makecab.exe”

    See this link for details to mark as safe for scripting
    http://www.olavaukan.com/2010/08/creating-an-activex-control-in-net-using-c/

    I was searching wrong, not is Component COM C# and yes C# ActiveX Control. I confuse with ATL COM C++.

    Thank you

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to develop a very simple Java web application using JSP and Servlets.
I'm trying to make a simple C# web server that, at this stage, you
I have an ASP.NET web application that I am making and I am thinking
I'm trying to build a generic grid view in an ASP.NET MVC application. Let
I'm using ASP.net and I'm trying to execute a webmethod from jquery. I have
I am trying to make a simple application which will be used to point
Here's the scenario: ASP.NET MVC2 Web Application Entity Framework 4 (Pure POCO's, Custom Data
So, I'm trying to make a simple call using jQuery .getJSON to my local
I am trying to make a multi-textured point sprite for an iphone application using
I am trying to build a simple repository browser into a web application and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.