iis,vbscript,asp-classic,vb6,activex , ActiveX dll not working on IIS 8.5


ActiveX dll not working on IIS 8.5

Question:

Tag: iis,vbscript,asp-classic,vb6,activex

ActiveX dll not working on IIS 8.5

We have a classic ASP application that uses and ActiveX dll to generate an image on the fly. It was working find on Window 2003 with IIS6. But we're migrating it to Windows 2012 and IIS 8.5. The DLL is registered on the server, configured to run under it's own app pool (No Managed Code, Classic pipeline mode). It's virtual directory is configured to run as an application and has a handler mapping for *.dll to point to the DLL for all verbs with Execute Access rights, which is the same config for IIS6.

The ASP code to render the HTML calling DLL looks like this:

<%dim SpokeData
dim JobName
dim NumOfExperts
dim ThisDirNo
dim ThisSel
dim PAPIType
dim JobType
dim SpokeDataShort
SpokeData = trim(Request.QueryString("Data"))
JobName = trim(Request.QueryString("JobName"))
NumOfExperts = trim(Request.QueryString("Exp"))
PAPIType = trim(Request.QueryString("PAPIType"))
JobType = trim(Request.QueryString("JobType"))
CalcDate = trim(Request.QueryString("Date"))
For ScaleNo = 1 to 20
    ThisSel = Mid(SpokeData,(ScaleNo*2),1)
    ThisDirNo = Mid(SpokeData,(ScaleNo*2)-1,1)
    If ThisSel = "1" then SpokeDataShort = SpokeDataShort & ThisDirNo else SpokeDataShort = SpokeDataShort & "0"

Next
Response.Write("<div id='Wheel'><img style='margin-left:20px' src='http://www.example.com/jpwheel/jpwheel.dll?Handler=Render&nori=" & PAPIType & "&dir=" & SpokeDataShort & "&" & Now & "'></div>")
%>

The HTML then lookslike this: <img src="http://www.example.com/jpwheel/jpwheel.dll?Handler=Render&amp;nori=N&amp;dir=55555050555000000000&amp;11/05/2015 16:05:24" style="margin-left:20px"> if I try to download this directly I get a 500 error (no error log unfortunately).

It is working on IIS6, not working on IIS8.5. Can anyone cast some light on migrating ActiveX server-side DLLs to IIS8.5? One thing I haven't done is check the dependencies for the DLL, can anybody recommend a tool for that? I'm guessing with windows 2003 coming to end of life a number of people are running into issues like this.


Answer:

The problem was caused by using the incorrect handler mapping. I had it setup as a Script Map. It needed to be a Module Mapping with the following details:

Request Restrictions: All Verbs, Access required: Script

Feature Permissions: Read, Script, Execute

So it's working now.


Related:


Close Open Excel Instance


vbscript
Could someone please let me know if the following simple VBScript is correct? It is supposed to close Excel after other processes have run (and left Excel open), but it doesn't work. Set MyApp = CreateObject("Excel.Application") MyApp.Quit ...

WshShell.SendKeys - SLASH not allowed?


vbscript,sendkeys
Today I am having difficulties with this following code: x=msgbox("Your Text Here" ,0, "Your Title Here") UserName=inputbox("After this message, you have 5 seconds to switch to Minecraft. Please enter the username you wish to type the song to:") wscript.sleep 5000 WshShell.SendKeys "/msg" + UserName + "I know that we just...

Conflict when running IIS and WCF application listening on the same port (443)


c#,asp.net,wcf,iis
I'm in the process of doing a server migration, and I've come across an issue when trying to host a WCF application and IIS at the same time using the same IP address and port. (this works perfectly on our other server) The new server is a Windows 2012 R2...

Recycling app pool each time something is published


.net,iis,lucene,umbraco,application-pool
I'm working on an Umbraco site where I have custom sections, and therefore use the application.config and trees.config files. I have a problem where every time I publish something, the app pool recycles with the following message: w3wp.exe Information: 0 : _shutDownMessage=CONFIG change HostingEnvironment initiated shutdown CONFIG change HostingEnvironment caused...

How to display the physical path of a web application using appcmd.exe?


iis,iis-7,iis-7.5,appcmd
Please, observe: PS C:\Dayforce\DayforceRTQA\150520_747\SharpTop> $a C:\Program Files\IIS Express\appcmd.exe PS C:\Dayforce\DayforceRTQA\150520_747\SharpTop> &$a list app "MyDayforce/" /text:* APP path:"/" APP.NAME:"MyDayforce/" APPPOOL.NAME:"Clr4IntegratedAppPool" SITE.NAME:"MyDayforce" [application] path:"/" applicationPool:"Clr4IntegratedAppPool" enabledProtocols:"http" serviceAutoStartEnabled:"false" serviceAutoStartProvider:"" preloadEnabled:"false" [virtualDirectoryDefaults] path:"" physicalPath:""...

AccountDomainSID is the same for all users accessing ASP.Net MVC site


asp.net,asp.net-mvc,iis
The site is under ApplicationPoolIdentity in IIS7.5, we are using Windows Authentication. When running this code, AccoundDomainSID is the same for all users accessing the site, not unique. Are there any IIS settings that need to be configured for this to work properly? string SID = new WindowsIdentity(WindowsIdentity.GetCurrent().Token).Owner.Value; Is there...

FormatCurrency giving different results on different pages in different browsers?


vbscript,asp-classic
Given the following VBscript code: FormatCurrency("123",2) written to an html page: <td><%= FormatCurrency("123",2) %></td> Both pages have the same charset "ISO-8859-1", and show the same behavior with charset "UTF-8". I am getting several results across browsers - IE10 and FireFox38 display the following: "Payment Page": £123.00 "Receipt Page": £123.00 while...

AvailableVirtualMemory on IIS and Console application


asp.net,iis,memory,console-application
I'm having problems to get the real value of AvailableVirtualMemory in IIS and a Console application, as detailed below: When i run these commands on a Console application: Console.WriteLine(String.Format("Memoria virtual total: {0}MB", My.Computer.Info.TotalVirtualMemory / 1024 / 1024)) Console.WriteLine(String.Format("Memoria virtual disponible: {0}MB", CDec(My.Computer.Info.AvailableVirtualMemory / 1024 / 1024))) The Console shows me...

Response.write in multiple place with same recordset


vb.net,vbscript,asp-classic
I have two divs <div class="selection mini"> <select name="selfromYear"> <option selected disabled>From</option> <option>1956</option> <option>1986</option> </select> </div> <div class="selection mini"> <select name="selToYear"> <option selected disabled>To</option> <option>1956</option> <option>1986</option> </select> </div> And I want to fill them with same fields <div class="selection mini"> <select...

Script works on its own but not as a subroutine of a bigger program


vbscript
I have written the following code, tested it, and it works. I then literally copied and pasted it into a larger program as a sub. I'm getting a Type mismatch on the Split Function now. I copied & pasted it out of the subroutine and into a new file and...

Unzip files that begin with a particular string


vbscript,wildcard,unzip
This is my second attempt at cracking this problem I am facing. In a nutshell I get some files sent to me on a weekly basis which begin with the same 11 characters and anything after that can differ from week to week. I have some basic code that unzips...

Error code 0x8000500D when trying to access PasswordLastChanged


vbscript,active-directory
I'm writing a VBScript that will simply check each user in AD if their password has been changed within a given number of days. When I was trying to get it working for a single user, I came up with the following working code: Option Explicit Dim objUser, strLDAPConnection, intPwdExpLimit...

ASP.NET address in IIS


asp.net,asp.net-mvc,iis
We have an ASP.NET MVC Intranet hosted on our IIS server. As you'll know, a Visual Studio project/solution called "MyProject" for example, will have the first folder containing the solution, then another one containing the project files, so it would be http://intranet/myproject/myproject/ for example. Is there a way to change...

Host Four ASP.Net Projects in IIS as single direcory(maintain more projects in same url)


asp.net,iis,hosting,web-deployment
I m having a ASP.Net Webapplication it accessed by from many geography like India,China&America.In that application's login page fields are username,Password & Geography. Based on this login page geography option the application's functionalities will change in all page. In this project,If we add a feature for Indian users but that...

same server, get url: vbscript msxml3.dll 80004005 unspecified error, or msxml6.dll error '80072ee6' System error: -2147012890


vbscript,iis-6,serverxmlhttp
What's the correct way to get the output of an asp page located on the same server? <% GetUrl "/route/to/abc/123/" Function GetUrl(url) Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP.3.0") objXMLHTTP.open "GET", URL, false objXMLHTTP.send() If objXMLHTTP.Status = 200 Then Response.Write objXMLHTTP.ResponseText End if Set objXMLHTTP = Nothing End Function %> results in this...

How IE setting affect authorization


asp.net,iis
I have a Webform app written in asp.net 4.5 and trying to understand how IE plays a role for authentication. So far my search has not provided a solid answer I know webconfig setting override iis setting. But assume we set the authorization mode to anonymous in both of iis...

for each loop: how to step out of conditions


loops,vbscript,condition
I am stuck at creating a loop for testing filenames with VBScript. To be precise, I am trying to perform something like a jump in a For Each loop. The loop should test all files in a folder and in some cases it should delete some files. But while running,...

Can't read first row of CSV file


csv,vbscript,imacros
I can't figure out why my script is not reading and storing the first row of the CSV file. It is starting with the second row for some reason. I have the following code (reading from a 2 column CSV file): Set rs = CreateObject("ADOR.Recordset") 'this just gets the folder...

Classic ASP and JQuery reloads default.asp page on redirect


javascript,jquery,vbscript,asp-classic
I have integrated an existing Classic ASP site with JQuery (they were using VBScript before). The previous version works fine but the script's needed to be updated so it will work on other browsers. But when I redirect the page with JQuery integrated, the system loads the default.asp file and...

Garbage char returned by Shell.StdOut.ReadAll


batch-file,vbscript,stdout
Here is my code Set objFSO = CreateObject("Scripting.FileSystemObject") a = "@echo off && " & _ "pushd ""\\xxxxx.local\cfs\Development\Docs\Baseline"" &&" & _ "cls &&" & _ "dir /b /a-d &&" & _ "popd" Set objShell = CreateObject("WScript.Shell").Exec("%comspec% /c " & a) execStdOut = objShell.StdOut.ReadAll() msgbox execStdOut Basically I am trying to...

IIS and Windows authentication not allowing error pages


asp.net,iis,web-config,windows-authentication,global-asax
I have been trying this from last two days. I am not getting whats the problem. I searched the web but didn't find any solution. i tried all the settings of IIS like "Moving negotiate down, disable other authentication" but doesn't work. SO here is my problem: I have a...

Iterate through the folder and find a particular file


vbscript,folders,subfolder
I have written this code to iterate through the folders and exit the function when it finds the ".c" file. Ideally it should return the path of the ".c" file. But its returning empty string. tval = 1 Function findStlcode(objFSO,fFolder,folderName) Set objFSO = CreateObject("Scripting.FileSystemObject") Set Folder = objFSO.GetFolder(fFolder) Set colfiles...

Is it possible to share session between different PHP versions?


php,apache,symfony2,session,iis
I am starting an old app refactoring, I will rebuild some functionality from spaghetti code to MVC (Symfony). Plan was I will set up new IIS app, using subdomain. Now, old app is running PHP 5.3 which can't be upgraded. New app will be running on PHP 5.6. Only thing...

Return index of word in string


arrays,vb.net,vbscript
This code: Module Module1 Sub Main() ' Our input string. Dim animals As String = "cat, dog, bird" ' See if dog is contained in the string. If Not animals.IndexOf("dog") = -1 Then Console.WriteLine(animals.IndexOf("dog")) End If End Sub End Module Return start position 5 in string But how to return...

SCOM Monitor not reporting


vbscript,windows2012,scom
I am running into a bit of an issue with SCOM. I have create the script below to monitor an application. It creates an entry in the Event log when the script runs and I have configured the alerts for a specific group in which the monitor is running on....

Web API Sync Calls Best Practice


c#,iis,.net-4.5,web-api
Probably this question has already been made, but I never found a definitive answer. Let's say that I have a Web API 2.0 Application hosted on IIS. I think I understand that best practice (to prevent deadlocks on client) is always use async methods from the GUI event to the...

TFS 2013: HTTP code 503: Service Unavailable


iis,tfs
All of a sudden, our TFS server down. When I checked in IIS, http://localhost:8080/tfs is giving 503 service error. Below application pools are getting stopped automatically, even though I manually made them start in IIS manager. Microsoft Team Foundation Server Application Pool, Microsoft Team Foundation Server Proxy Application Pool Please...

IIS Express 8 - Max allowed length


c#,asp.net,iis,visual-studio-2013,iis-express
In case the below is too long, my question is whether IIS Express 8 in Visual Studio 2013 obeys the maxAllowedContentLength attribute or if it has some overriding value that prevents large requests When debugging some webapi calls against Visual Studio 2013, I'm receiving this error: Maximum request length exceeded....

deployment of a site asp.net and iis


c#,asp.net,iis
I know this is for some of you a stupid question but for me is a real problem. I have never deployed a site before What i have done so far: 1) publish the site from visual studio to a folder. 2) added to iis for testing everything works great...

Get dates from AUT?


date,vbscript,locale,qtp,hp-uft
My Web-based application (like most) follows the browser locale to format dates. So if you configure British English as the preferred language in the browser, the app will display dates in "DD/MM/YYYY" format. Now QTP (ok, it´s VBScript that is the culprit) does not know about this. It strictly follows...

Wordpress on IIS with shared wp-content


php,wordpress,iis,permissions
I've been trying to install Wordpress on IIS and everything went smoothly with a standard installation and an handler mapping for php-cgi. Since I have a public server (A) and a private shared server (B), I need to have a WP installation on server A with a shared database and...

VBScript Regular Expression Insert Line


regex,vbscript
I try to insert a line between 2 specific lines in a files with VBScript : # Ligne 1 # Ligne 2 => # Ligne 1 # Ligne 1 bis # Ligne 2 My script code is : Dim regEx Set regEx = New RegExp regEx.Pattern = "# Ligne 1\r\n#...

What does IIS do with MVC projects


asp.net-mvc,iis
IIS seems to be an application that listens for incoming connections, parses the data sent there as HTTP requests, and maps request urls to directories based on a site an application and a virtual directory, and then does something based on the file present (or not present) on that location....

How can I retrieve the LAN adapter MAC address?


windows,vbscript
I want to retrieve the MAC address from a Windows system, only for LAN Adapter. Can you suggest to me how I'd handle this in VBScript? I'm currently using this VBScript for getting the MAC address, but this is giving me results for all adapters, while I only want the...

How can I find a node containing a sub-string?


xml,xpath,vbscript,asp-classic
I am able to find nodes in an XML file using the following statement: Set user = objXMLDoc.selectSingleNode("//user[@id = '" & id & "']") But the XML files I'm reading are being generated automatically and sometimes contain spaces after the ID. The id attribute of the user node might look...

VBScript Redirect to Network Folder


vbscript,asp-classic
I have taken over a web page recently I have some programming knowledge and can usually muddle my way through things but I cant seem to get it today. There is a snippet of code on the website that opens a folder on a network drive when a user opens...

IIS cannot write file if called from remote, only from the server


c#,.net,iis,file-permissions
I am running a web api on a IIS on Windows Server 2012 R2. The application has a controller, that on a get request will write to a file on a network share. If I access the site from a browser on the server it works fine, however if I...

Bonobo Git Server Configruation: HTTP Error 500.19 - Internal Server Error at line 71


iis,windows-server,windows-server-2012-r2,iis-8.5,bonobo
I have tried to configure Bonobo Git Server. I have followed the included instructions, and after trying to visit the server for the first time, I get the following error: There is a similar question; however, it gives an error at one line prior and the solution the author answered...

Cannot start Website in IIS - W3SVC running


asp.net,iis
I am trying to start a Website in IIS but it doesn't get started and gives me following error: The World Wide Web Publishing Service (W3SVC) is stopped. Websites cannot be started unless the World Wide Web Publishing Service is running. How can I resolve it? I donot even know...

Close an HTA when the user presses the 'Esc' key


vbscript,hta,onkeyup
I'm trying to capture key presses so that I can close my HTA when the user presses the Esc key. I have confirmed that the onKeyUp event works (I also capture the length of an input), and also that the example below is not working (by adding a MsgBox which...

How to detect after system boot if the service is running, if running then start my apps?


windows,vbscript
In VBScript is it possible to query a specific service name if it's started or running? if its running then execute finally my application. So here is how the flow i am trying to prepare: System is booted Windows 8.1 Startup script is executed (VBS) VBScript now wait and keep...

jQuery or AngularJS Ajax “POST” request to server using code below however do not sending param data to server.


javascript,jquery,ajax,angularjs,iis
"POST" request to server using code below however do not sending param data to server. I tried jQuery Way and var request = $.ajax({ url: baseUrl, type:'post', data: 'userId=userabcd&passwd=abcd1234', }); request.done(function( msg ) { console.log(msg); }); request.fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); AngularJS...

IIS 6 Allow anonymous access by default


asp.net,iis,website,iis-6
I have automated builds the will create IIS websites for me using FinalBuilder scripts. The problem is that in FinalBuilder there is no option to set 'allow anonymous access' to true on creation of the website, so I am forced to go into IIS manager and change this manually. In...

Add Binding To IIS With PowerShell Without Overwriting Existing


powershell,iis,octopus-deploy
We use OctopusDeploy to create the website and we use the create website template that is on the community step sites. I have modified it slightly to ensure that if the website exists it adds the default binding however it is removing all the existing bindings. Is there a way...

How to delete chars in string by position only?


regex,vbscript
I need a regex search & replace pair that will delete 'n' characters from a string, starting at some definable location. For example, to delete 3 characters starting at position 5. In that case the string AAA. 01 Data From July would become AAA. Data from July (Don't know if...

Selection skipping node on missing childnode


xpath,vbscript,xml-parsing
Here is my XML file: <?xml version="1.0" encoding="iso-8859-1" ?> <data> <metadata> <sector>weather</sector> <title>sourceTitle</title> </metadata> <weather> <countries> <country code="AU" name="Australia" region="Oceania"> <location type="APLOC" code="6700" name="Addington" state="VIC" postcode="3352"> <point_forecasts type="TWC"> <related_location type="TWCID" code="9508" name="Ballarat" state="VIC"> </related_location> <point_forecast...

How to track 500 errors on WebSockets (ws://)


c#,asp.net,iis,websocket
I'm trying to play around with WebSockets on IIS 8.5. I started off with a couple of very basic C# classes from a lesson: using Microsoft.Web.WebSockets; using System.Web; public class ChatHttpHandler : IHttpHandler { public void ProcessRequest(HttpContext context) { if (context.IsWebSocketRequest) context.AcceptWebSocketRequest(new WebSocketChatHandler()); } public bool IsReusable { get {...

Set the Enable Parent Paths = True of ASP Application in IIS for all available websites by Power shell Script


powershell,iis
I am trying to update Enable Parent Paths = True of ASP Application in IIS for all available websites by Power Shell Script. Below is my power shell script which I tried but it works for Specific Website only. Set-WebConfigurationProperty ` -PSPath MACHINE/WEBROOT/APPHOST ` -Location 'Default Web Site' ` -Filter...

Microsoft VB Compilation Error


vbscript
I am learner to vbscripting and as a beginner trying to execute the below code. But I keep getting the compilation error [Please see error message below]. I am not sure as I do not see any error in the code. Also, I made sure that I type in all...

vbscript to run command


command-line,vbscript
I'm trying to create a script that runs the command: RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255 Right now this errors out Dim objShell Set objShell = Wscript.CreateObject("WScript.Shell") sEXE = """C:\Windows\system32\RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255 """ with CreateObject("WScript.Shell") .Run sEXE & " " , 1, true end with Wscript.Quit Any suggestions? Could I make the script...