Calling WordApplication.Open with VB6 fails when running as local User - iis

I'm running a DLL file that is referenced by an "xpto.asp" file.
At some point of the code, this DLL opens a word template file:
set oWordApp=New Word.Application
set oWordDoc= oWordApp.Documents.Open(sTemplate,,true)
In IIS i´m using User Authentication(pass throught) authentication.
This code works fine if the login user has ADMIN privileges.
If the login user doesn't have ADMIN privileges then an Error occurs when tryng to open the template:
Automation error The remote procedure call failed. (error.number
=2147023170)
Does anybody know how to solve it?

Related

Unable to use SelectPDF after deployment to IIS

I have a function that generates a PDF from a HTML page like this:
HtmlToPdf converter = new HtmlToPdf();
PdfDocument doc = converter.ConvertUrl(url);
var PdfArray = doc.Save();
doc.Close();
This works perfectly when I run it in VS 2017, However when I deploy to IIS it throws the following exception: "Conversion failure error 5."
According to my Googling this is related to the IIS not having the correct access to write. However I have as an attempt given that application access to every operation.
All suggestions would be greatly appreciated.
From the troubleshooting page on SelectPdf website:
https://selectpdf.com/docs/Troubleshooting.htm#item3
The error code is this:
ERROR_ACCESS_DENIED
5 (0x5)
Access is denied.
Enable execute permissions on Select.Html.dep.
You need to go to the bin folder of your deployment to IIS and set execute permissions for the Select.Html.dep file. If you do not know the app pool user, in the first place, just set permissions for Everyone to see if it works.

unable to login with default user name administrator after installing Kentico

I have installed the Kentico and it generated an URL. When we try to login with a default username 'administrator' and getting an error message as follow.
[WebFarmTaskManager.CanCreateTask]: Task type 'DICTIONARYCOMMAND' is not supported. The task needs to be registered with WebFarmHelper.RegisterTask method.
Publish first CMSApp_AppCode, then, in the same folder, CMSApp, however disable the option "Delete all existing files prior to publish" in CMSApp

Getting java.lang.IllegalArgumentException error while running cucumber feature file in Java Eclipse

I am trying to run a basic cucumber feature file via JAVA ECLIPSE on my MacBook and getting this java.lang.IllegalArgumentException error .
Following steps are taken care.
Added the dependencies
Created a Maven project
Created a feature file
Created a Runner Class
Created a Step Definition class
Trying to run the feature file so that I will get the implementation steps as part of errors in consolidating so that I can use the same in the step definition file.
Feature file :
Feature: POC on gmail Login Page
Scenario: gmail login test
Given User navigated to gmail Login page
When User enter the Loginid
And User enter Password for gmail
And User click on Login button
Then Verification Page Displayed
Then Inbox page is displayed
Error in detail:
Exception in thread "main" java.lang.IllegalArgumentException: Not a file or directory: /Users/civakalyan/Documents/Java Eclipse/FIrstCucumberMavenProject/--plugin
at cucumber.runtime.io.FileResourceIterator$FileIterator.(FileResourceIterator.java:54)
at cucumber.runtime.io.FileResourceIterator.(FileResourceIterator.java:20)
at cucumber.runtime.io.FileResourceIterable.iterator(FileResourceIterable.java:19)
at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:38)
at cucumber.runtime.RuntimeOptions.cucumberFeatures(RuntimeOptions.java:117)
at cucumber.runtime.Runtime.run(Runtime.java:92)
at cucumber.api.cli.Main.run(Main.java:20)
at cucumber.api.cli.Main.main(Main.java:12)
U have to build the path etc, restart eclipse. Try making a new Fresh Project with the same feature file and run it.
it worked for me , however still looking for a better solution

Cannot query Active Directory using ServerBind on non-domain computer in Windows PE

I have a need to write a .NET application which will query Active Directory while running in Windows PE on a computer which is not yet a member of the domain.
We are running this during a Microsoft Deployment Toolkit task sequence (note that MDT 2012 has been configured to load support for .NET into the WinPE environment - the .NET application is starting without any problems).
I am using the code below to bind to the domain:
DirectoryEntry entry = new DirectoryEntry(
path,
username,
password,
AuthenticationTypes.ServerBind | AuthenticationTypes.Secure);
I have tried a path both of the form:
LDAP://domainServer/dc=domain,dc=name
And also without a domain controller name as
LDAP://dc=domain,dc=name
I have also tried using a username both of the form domain\username and also just username.
The DirectoryEntry object seems to be constructed okay, but when I try to execute Console.Writeline(entry.Name) to confirm a valid connection has been made, I get the following exception:
System.Runtime.InteropServices.COMException (0x80005000): Unknown
error (0x80005000) at
System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
at System.DirectoryServices.DirectoryEntry.Bind() at
System.DirectoryServices.DirectoryEntry.get_Name()
I have tried other variations on this code, trying to execute LDAP queries with various filters, trying to rewrite it in VBScript, etc... but the code posted above is the simplest example I could come up with which reproduces the problem.
From what I have read, in a scenario like this you would always need to use AuthenticationTypes.ServerBind and that is why I am trying to specify the code within the ADSI LDAP path. But what is wrong with the code above? To me, it looks like it is passing all needed information in the parameters to the DirectoryEntry constructor.
There is a way to get it work, but it's not supported by Microsoft. This post helped me a lot. It works, tested and approved for a deployment of new computers :)
Get the ADSIxXX.inf from the zip file to C:\ADSI
Copy the following files from a Windows/System32 to C:\ADSI. Carefull of Architecture
x86 x64 -
adsldp.dll
adsmsext.dll
adsnt.dll
mscoree.dll
mscorier.dll
mscories.dll
Mount the bootimage.wim
No need to load Package (Your WinPE is already configured to load .NET API), juste add ADSI driver:
Dism /Image:C:\Mount /Add-Driver /Driver:C:\ADSI\ADSIxXX.inf /forceunsigned
No need to load his script
Unmount the bootimage.wim
Then it's done, if your .NET application is well implement ;)
I'm not sur the PIPE | is supported as an argument too, just set to AuthenticationTypes.Secure -
DirectoryEntry entry = new DirectoryEntry(
path,
username,
password,
AuthenticationTypes.ServerBind | AuthenticationTypes.Secure);
Link: http://www.deploymentresearch.com/Research/tabid/62/EntryId/74/ADSI-plugin-for-WinPE-4-0.aspx#AddComment

How to debug ASP permission problems with WScript.Shell object?

I have to run command line operation from some legacy ASP application.
Here is my code:
<%
cmd = "%comspec% /c echo Hello"
set wsh = CreateObject("WScript.Shell")
ireturn = wsh.Run(cmd, 0, true)
set wsh = nothing
%>
And here is result I am receiving:
Microsoft VBScript runtime error
'800a0046'
Permission denied
/test.asp, line 6
Do you have any idea how to make IIS6 to run this code?
Note: Of course I don't have to run echo command but I want to exclude any additional causes of the problem.
Update: I tried most things tomalaks mention however nothing helped. Maybe I can alter question a little. How can I debug this problem?
ASP usually is denied access to anything potentially dangerous, such as cmd.exe. Check file permissions on cmd.exe to see if that is true for you (I suppose it is).
If you really must use cmd.exe to do part of the page processing, either change file permissions on cmd.exe (not recommended for an Internet-facing web-server), or make sure that the ASP page runs credentials that are not denied access to that file.
To achieve this, use the IIS management console to remove "anonymous access" to the ASP page and use Windows-integrated authentication instead (if feasible), or leave "anonymous access" on and enter a fixed set of credentials that should be used instead of the default "IUSR_...".
Alternatively, if you use cmd.exe just to start a program that outputs something to STDOUT, you can try starting the program directly, without wrapping it in a cmd.exe call. Again, the user the ASP page runs under needs access to that program's executable.

Resources