ActiveX cannot be executed from the server

My MFC activeX control works fine when run from disk, but I encounter errors when hosting it on a server. Client: Windows 7 machine Server: Ubuntu running Apache

Below is the HTML code along with the encountered errors. Any advice would be much appreciated. Thank you, Nahum

HTML:

<html>
<HEAD>
<TITLE>myFirstOCX.CAB</TITLE>
<script type="text/javascript" FOR="window">
function fn()
{
     try{
    document.all('Ctrl1').AboutBox();//error: object doesn't support propert
                                                  //or method AboutBox() 
        //OR
        var obj = new ActiveXObject ("activex.activexCtrl");
        obj.AboutBox ();//error: Automation server can't create object
       }

     catch (ex) { alert("Error: "  + ex.message); }

}
</script>
</HEAD>
<body bgcolor=lightblue >
<TABLE BORDER>
<TR>
<TD><OBJECT
 CLASSID="CLSID:E228C560-FA68-48E6-850F-B1167515C920"
 CODEBASE="./nsip.CAB#version=1,0,0,1"
 ID="Ctrl1"
 name="Ctrl1">
 </OBJECT>
 </TD>
 </TR>
 <TR>
 <TD ALIGN="CENTER">
  <INPUT TYPE=BUTTON VALUE="Click Me" onclick="fn()" >
 </TD>     </TR>      </TABLE> 
 <INPUT TYPE=TEXT ID="ConnectionString" VALUE="" >
 </body>
  </html>

The INF file: [version] ; version signature (same for both NT and Win95) do not remove signature="$CHICAGO$" AdvancedINF=2.0

[Add.Code]
nsip_ax_10.ocx=nsip_ax_10.ocx
nsip_ax_10.inf=nsip_ax_10.inf

[nsip_ax_10.ocx]
file=thiscab
clsid={E228C560-FA68-48E6-850F-B1167515C920}
RegisterServer=yes
FileVersion=1,0,0,1

Answer №1

On URIs, the use of / characters is different from how local Windows file systems use \ characters.

Checking the error and access logs for your web server is a recommended practice. If you encountered a 404 error, it would have been reported there.

(There may be additional issues related to varying security zones, but the 404 error is the first one you'll likely come across).

Answer №2

To ensure proper handling of .cab files on your server (possibly Apache), you may need to configure the correct mime type. Refer to the following link for information on the appropriate mime type to set:

http://en.wikipedia.org/wiki/Cabinet_(file_format)

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The outcome of my function designed to calculate the highest possible profit using k transactions is a null array

I have developed a custom function to calculate the maximum profit from a series of stock transactions given a specific number of transactions allowed. Each transaction involves buying at a low price and selling at a higher price, with the rule that you ...

ASP.Net - Unexpected JSON Format Error

As I work on my ASP.Net web application, I am encountering an issue with binding data from a database to a Google Combo chart via a Web Service class. While I can successfully bind the data to a grid view, attempting to bind it to the chart results in the ...

Guide to indicating the chosen filter in React using Material UI

I'm currently working on a blog that includes a filter feature. The filtering functionality is working perfectly, but I am trying to specify which filter option is currently selected. Here is the code snippet: {cardCategories.map((cat) => { retu ...

Exploring Options for Enabling HTML in AngularUI Accordion-Group Content

I want to showcase content in an accordion-group that might contain HTML markup. This content is fetched from external sources. How can I achieve this? You can check out an example at Plnkr (content hard-coded for testing) Currently, the items are displa ...

Configuring CORS in an Angular JS controller

Having a controller with a service that retrieves JSON from another server, I encountered the following issue: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http:somesite.com. This can be fixed by moving the ...

Neglecting the Outcome of Async/Await

I am facing an issue where I need to send different SMS messages to different recipients synchronously, but my current implementation using async/await is not producing the expected results. Below is the code snippet causing the problem: Upon querying fo ...

Modify a HTML element periodically

My first project involves creating an HTML5 clock, but I'm encountering issues with updating the .innerHTML property every second. Interestingly, console.log is working perfectly fine for me. Here's my main.js: var baseDate = new Date(); var ...

Angular does not seem to support drop and drag events in fullCalendar

I am looking to enhance my fullCalendar by adding a drag and drop feature for the events. This feature will allow users to easily move events within the calendar to different days and times. Below is the HTML code I currently have: <p-fullCalendar deep ...

Difficulty obtaining elements in Internet Explorer, however works fine in Chrome and Firefox

My <textarea> is set up like this: <textarea class="form-control notetext" id="{{this._id}}-notetext" name="notetext">{{this.text}}</textarea> I am using ajax to send data and load a partial webpage. After loading the content, I attemp ...

Mastering the art of manipulating arrays with jquery

Trying to implement a dynamic search bar feature using jQuery. Here is the code snippet: Fiddle : https://jsfiddle.net/fpLf1to4/ var inputSearch = $('.searchInput').hide(); var searchArray = ['s','e','a',& ...

The functionality to disable the ES lint max length rule is malfunctioning

In trying to disable an eslint rule in a TypeScript file, I encountered an issue with a regular expression that exceeded 500 characters. As a result, an eslint warning was generated. To address this, I attempted to add an eslint comment before declaring th ...

Guide on dynamically loading email contacts options in selectize.js

I have been working with selectize.js to create an email contacts feature. However, I am facing an issue where the mail list retrieved from the database is displaying as undefined in selectize. Strangely, when I manually enter the return value, everything ...

Conflict arises between entities due to the speed of one

I am working on creating a scenario in my world where a ball enters a tube with multiple sections. To achieve this, I have constructed the tube using a series of box shapes that I manipulate by moving and rotating them to form the complete structure of the ...

How to display a div in Angular when hovering with ElementRef and Query List

I am having trouble implementing a ngFor loop in my project where I want to display a div on mouse hover using the @Input notation. This is how my HTML code looks: <div class="col s12 m6" style="position: relative" *ngFor="let res of hostInfo.resident ...

Don't let noise linger in the background unnoticed

Within my HTML table, there are 32 cells that each possess an onclick="music()" function. This function is currently functioning correctly, with one small exception. I desire for the functionality to be such that whenever I click on a different cell, the m ...

Issue: $controller:ctrlreg The controller named 'HeaderCntrl' has not been properly registered

I am encountering an error while working on my AngularJS program. I have defined the controller in a separate file but it keeps saying that the controller is not registered. Can someone please help me understand why this issue is happening? <html n ...

Testing abstract class methods in Jest can ensure full coverage

In my project, I have an abstract generic service class. export default abstract class GenericService<Type> implements CrudService<Type> { private readonly modifiedUrl: URL; public constructor(url: string) { this.modifiedUrl = ...

I keep encountering the issue of receiving a "name undefined" error message while attempting to make a post request with Express and Body Parser

I've been working on building a MEAN app and encountered an issue while testing POSTing with POSTMAN. Every time I attempt to POST, I receive the error message "TypeError: Cannot read property 'name' of undefined". Strangely enough, if I inp ...

Error occurs when trying to create or delete a folder in Express.js

Implement Folder Creation Code in index.js let companydir = './views/campaigns/' + companyname; if(!fs.existsSync(companydir, { recursive: true })) { fs.mkdirSync(companydir, { recursive: true }); } var dir = companydir + &apo ...

Python automation with selenium - capturing webpage content

I am utilizing selenium to scrape multiple pages while refraining from using other frameworks such as scrapy due to the abundance of ajax action. My predicament lies in the fact that the content refreshes automatically nearly every second, especially finan ...