"The RPC server is unavailable" Error on Azure Could Server 2019 - azure

This is regarding Abbyy Setup issue that we are facing on a Azure Cloud Machine which is a Windows Server 2019 VM.
We followed the Admin Guide for Reader 12, the "Manual Runtime Installation Steps" were followed for the setup. The Bin64, Data and Inc folders are copied into a directory which will be later used while registering FREngine.dll on the OS. We have not done the Abbyy SDK installation.
We have VM setup locally which is a Windows Server 2019 VM image. On this setup we are able to Register the FREngine.dll successfully using regsvr32 command. Also we don’t see any issue and is working, w.r.t reading OCR/Barcode values successfully through Abbyy FineReader.
ISSUE
The issue is on the Azure Cloud System [VM Windows Server 2019], where we are able to Register the FREngine.dll successfully using regsvr32 command. However even with the successful Registration of FREngine.dll, when we try to initialize the FREngine, we are getting an exception "Invalid Engine instance" during the call to InitializeEngine( ) with all the Required parameters set.
// Create the abbyy engine instance in outproc process,
// as its recommended by Abbyy for 64-bit process
outProcLoader = new OutprocLoader();
if (outProcLoader != null)
engine = outProcLoader.InitializeEngine(AbbyyEngineUtils._strProjectId,
engLicensePath,
AbbyyEngineUtils._strEngPwd,
"", "", true);
Here we have a license file which is also copied into the location where FREngine.dll is present.
Due to this initial Step failure Abbyy Logs could not be generated from the codebase. However we see a log file that gets generated from Abbyy in the path “C:\ProgramData\ABBYY\SDK\12\FineReader Engine\” at this point of failure which states as follows:
10552 :ABBYY Licensing Service is unavailable: The RPC server is
unavailable.
We also we additionally tried running the Abbyy SDK’s Sample applications on this machine. This also fails with the above error during Abbyy Engine Initialization.
How can this be resolved?
More Info on Licensing Service:
We additionally tried installing the LicensingService and the LicensingSettings.XML had :
ProtocolType="LocalInterprocessCommunication" />
Here Ours is a Standalone Abbyy Installation and hence the Protocol Type used is LocalInterprocessCommunication which is for the local Licensing Service. It is not necessary to specify this protocol type for Standalone installation, as Standalone licenses are always used with the LocalInterprocessCommunication protocol type.
This was an additional Step tried by us. However the actual issue was with the Abbyy Licensing on Azure.

Did you happen to start the abbyy licensing service in the Azure VM ?
(Windows Key + R) Run command --> services.msc
In the Services Dialog, find the Abby...Licensing service.
Right Click -> Properties
You can click on the start and click ok.
Retry your above steps. Also, you could have startup type as Automatic if this works in the services in dialog.

As any other OCR solution some have licensing constraint to run on Azure and AWS , make sure your license is compatible.
as posted here
https://support.abbyy.com/hc/en-us/articles/360016441600-Can-I-run-FineReader-Engine-in-Virtual-Machine-or-Container-
also I would check the OS compatible version.
ABBYY SDK 12 Licensing Service has been tested in the following virtual environments:
Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2
Windows 10, Windows 8.1, Windows 8, Windows 7 SP1

Related

Fix application deploy error on AzureDevops

I have created release in Azure Devops, which should be deplyoing my web application to IIS which is on a physical server (Windows Server 2008) but firstly I am getting a warning:
##[Warning 1]
The operating system the agent is running on is "Windows Server" (OS name: 2008, OS version: 7601), which will not be supported by the .NET 6 based v3 agent. Please upgrade the operating system of this host to ensure compatibility with the v3 agent. See https://aka.ms/azdo-pipeline-agent-version
Then I am getting a error:
I have created an Agent on my server, and until today I was not getting this error. How could I fix this?
Windows Server 2008 reached end of life years ago, so no modern tool is going to support it any more.
You might feel lucky that things were running, but that luck finally ran out. You have to upgrade your machine to a supported Windows version.

ASP.NET Core 2.0 app targeting .NET 4.6.1 fails to host on IIS

The problem
IIS ASP.NET Core module is unable to start an ASP.NET Core 2.0 app.
Browser: HTTP Error 502.5 - Process Failure
Windows Event Log: Application ‘MACHINE/WEBROOT/APPHOST/AppSite’ with physical root ‘C:\inetpub\apps\AppFolder\’ failed to start process with commandline ‘C:\inetpub\apps\AppFolder\App.exe’, ErrorCode = ‘0x80004005: 1’.
ASP.NET Core Module Log: Log file is created but is empty.
The setup
App: ASP.NET Core 2.0 targeting .NET Framework 4.6.1.
Server: Windows Server 2012 R2 Standard 6.2.9200 with IIS 8.5.9600.
The story
We've created a blank MVC Web application using the default project templates provided in Visual Studio 2017.
The app is deployed following the official specification: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/.
The confusion arises mainly from these two points:
Running the app through command-line on Kestrel works.
Running a different app but targeting .NET Core 2.0 and publishing as framework-dependant works flawlessly on IIS.
But between these two apps: the codebase is the same, the IIS website and application pool is the same and we even emptied out the app directory and used the same one.
Due to these points the only difference seems to be the net461 app's executable file.
We do not have full control over the Windows Server where we're trying to deploy but we do have administrator accounts. The current assumption is that the issue lies within permissions - maybe AD group policies, antivirus blocking the file but we're still awaiting response from the client's sysadmins. Meanwhile we haven't been able to replicate the error code ‘0x80004005: 1’ while trying to setup these restrictions on our development machines.
Here's an incomplete list of ideas and points about the issue we've tried while problem solving:
The initial app (targeting net461) works flawlessly on IIS when
deployed to other servers (Windows 10 Enterprise, Windows Server 2012
R2 Datacenter).
Reinstalling different versions of ASP.NET Core/.NET Core: Runtime & Hosting Bundle.
Setting NTFS permissions to the dotnet folder.
Changing IIS application pool identity to an administrator account.
Restarting the server.
Going over local group and security policies.
Going over the antivirus settings and logs.
Trying to deploy on a brand new server (same OS, same bloat).
All ideas/comments are greatly appreciated. The more obscure the better.
EDIT:
Since this got flagged as a possible duplicate of ASP.NET Core 0x80004005 I need to specify why that is not a duplicate.
That referenced project is an older version of ASP.NET Core (last use
of project.json was in 2016)
That referenced project targets .NET Core and not .NET 4.6.1. It is mentioned here as well that targeting .NET Core works on IIS in regard to this issue.
Selected answer points out that they fixed it by:
Turns out that this was result of needing to install some windows
updates and this problem:
api-ms-win-crt-runtime-l1-1-0.dll is missing when opening Microsoft
Office file
Rather than install the version discussed in the above issue I whet
into Programs and Features and ran a repair on Microsoft Visual C++
2015 Redistributable.
but the installation of Microsoft Visual C++ 2015 Redistributable is one of the steps in the official setup guide and it is mentioned here as well that the official guide has been followed during the setup process.
We have gone over that post and tried to repair and reinstall the Microsoft Visual C++ 2015 Redistributable runtime components and this did not fix the issue.
If anyone stumbles upon this post in the future:
The problem was indeed in the server's antivirus. It wasn't directly blocking the app's executable but its call to a class library in the system folder. This termination did not raise any of the usual alarms.
The application "C:\inetpub\apps\AppFolder\App.exe" attempted to load the library "bcrypt.dll" by calling the function "LoadLibraryExW". The operation was blocked and the application terminated.
After switching the MVC blank app to a completely blank Hello-World app it ran successfully.

Unable to see "Management Service" in IIS 10 (Windows 10)

I have windows 10 (pro) and IIS 10 installed on Server A. I was trying to publish a Web API from Visual Studio 2015 on Machine B to Server A, but I get the following error.
web deployment task failed. (Could not connect to the remote computer ("172.26.50.17") . On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started.
I understood from googling that the web server need to have Management Service installed and running. I have installed web platform installed and I can see that the "Web depoy 3.6 without bundled SQL support(latest)" component installed.
But I still do not see management service icon under "management" section on IIS. Could anyone please help me understand this?
I solved it by installing the Web Platform Installer (Web PI).
Then you can add a lot of tools using this Web PI. One of those tools is Management Service which can be enabled via Web PI.
If you do that and still cannot see the Management Service, try closing and opening the IIS Manager again.
UPDATE:
For Windows 10 and later, see the #RBT comment below.

Cannot start Windows process activation service on Windows 10

After upgrading from Windows 7 Pro x64 to Windows 10 Pro x64, I cannot start IIS. Most of the Windows 10 system works fine. Some study tells me that the primary problem is that the Windows Process Activation Service (WAS) will not start.
I have another machine that upgraded to Windows 10 with IIS fine (Windows 7 Home Premium x64 up to Windows 10 Home Premium x64).
The IIS on that machine works OK (it only serves one website; so simpler setup.)
I have had NO LUCK finding anything on the Internet that resolves this.
I tried using the clean.iinstall IIS config files (no improvement).
I tried uninstalling IIS - uninstall failed and rolled back (see below).
I tried uninstalling WAS - uninstall failed, and rolled back.
DETAILS:
My first error trying to run IIS Manager program:
One or more problems have been detected during IIS upgrade. As a precaution,
one or more IIS services have been disabled. Please review the following error message:
Data loss has occurred - You upgraded your operating system or switched from one Windows SKU
to another SKU, and data from the previous installation of IIS has been lost or copied incorrectly.
As a result, the services W3SVC and MSFTPSVC have been disabled. Before enabling these services,
you should review the latest IIS 7.0 compatibility information.
(The link to see the IIS 7.0 compatibility information was a dead link.)
I decided to give it a try despite the compatibility warning. I started the services IIS, MSFTP, WAS and W3SVC (depends on WAS), then tried to start IIS Manager.
Failed to connect
There was an error when trying to connect. Do you want to retype your credentials and try again?
Details:
Creating an instance of the COM component with CLSID {2B72133B-3F5B-4602-8952-803546CE3344}
from the IClassFactry failed due to the following error: 800700b7
Cannot create a file when that file already exists. (Exception from HRESULT: 0x800700B7).
FACTS:
The IIS configuration files exist with non-zero length; they look coherent.
C:\Windows\System32\Inetsrv\Config
ApplicationHost.config
Administration.config
Redirection.config
I have a backup that I made that should be good (not just the automatic backups).
machine.config exists ok: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
The appPools folder exists: C:\inetpub\temp\appPools
The upgrade changed IIS from v7.5 to v10.0.10240.16384
This machine has one user account (me) and the account is marked Administrator.
My previous Windows 7 Pro with IIS 7.5 worked FINE for several years. IIS was giving no trouble before the upgrade.
I can use other network stuff OK: Internet, Outlook, PuTTY, MySQL Workbench (remote & local), and FileZilla.
Trying to start the Microsoft FTP service, or run appcmd or start W3SVC or WAS all give the same error:
Error 183: Cannot create a file when that file already exists.
appcmd list backup --> failed (running as Admin)
ERROR ( hresult:800700b7, message:Command execution failed.
Cannot create a file when that file already exists.)
Event Log after error starting WAS:
The configuration manager for Windows Process Activation Service (WAS) did not initialize.
The data field contains the error number.
error # = B7000780
I used the MS error lookup tool:
To see the appcmd error ( 800700b7)
for hex 0x800700b7 / decimal -2147024713 :
STIERR_HANDLEEXISTS stierr.h
1 matches found for "800700b7"
To see the WAS error (B7000780)
as an HRESULT: Severity: FAILURE (1), Facility: 0x1700, Code 0x780
for hex 0x780 / decimal 1920 :
SQL_1920_severity_10 sql_err
Skipping rebuild of index ID %d, which is on a read-only
filegroup.
ERROR_CANT_ACCESS_FILE winerror.h
The file can not be accessed by the system.
2 matches found for "b7000780"
I tried to uninstall IIS: 11/25
- uninstalled in windows features
- system did the work, I restarted system
- main system booted ok; then it treated the features
- the features uninstall failed at about 85% of total work
"We couldn't complete the features"
- system did a rollback
At reboot time, (some) services statuses are:
IIS runing auto IIS Admin Service (depends on HTTP service)
MSFTP off auto MS FTP Service (ftpsvc)
W3SVC off auto World Wide Web Publishing Service (depends on WAS)
WAS off auto Windows Process Activation Service
NetMsmqActivator off Auto Net.Msmq Listener Adapter
NetPipeActivator off Auto Net.Pipe Listener Adapter
NetTcpActivator off Auto Net.Tcp Listener Adapter
AppHostSvc off Auto Application Host Helper Service
==> THESE AUTO SERVICES ABOVE SHOULD BE RUNNING, BUT FAIL TO START PROBABLY DUE TO THE 'WAS' PROBLEM !
HTTP service is hidden, running:
sc queryex http ==> running
RPC and its dependencies are all OK, running.
I tried to uninstall WAS windows feature:
The system did the uninstall work, restarted, "could not complete features", rolled-back changes
I ran process monitor, but I could not see anything particular to resolve.
11/29 changed out the IIS configuration files, to use the clean.install versions:
C:\Windows\System32\inetsrv\config
I replaced applicationHost.config with applicationHost.config.clean.install (renamed it to the regular name)
I replaced administration.config with administration.config.clean.install (renamed it to the regular name)
I rebooted
I still could not start FTP or WAS, so maybe it's not getting far enough to read the configuration files?

Window Azure solution- Not running under local solution

need urgent help
i am not able to run the solution in the local environment. I have created the hello world sample and trying to run the application but i am getting error like some prerequisites are missing. Below in the configuration i have.
Installed in VM--
Window server 2008 OS-32 Bit
VS 2010
Installed the Azure SDK
But when i am running the solution i am getting below error ---
Windows Azure Tools: Warning: The Windows Azure development fabric and development storage are running on a 32-bit workstation. In the cloud, Windows Azure Hosted Services run in a 64-bit environment. The use of native code execution or .Net Full Trust features such as P/Invoke may require migration to 64-bit. See http://go.microsoft.com/fwlink/?LinkId=145047 for details.
Windows Azure Tools: Error: Running .NET 4.0 web roles on the Windows Azure Development Fabric requires installing the following QFE: http://support.microsoft.com/kb/958854, or upgrading to SP2 of Windows Vista or Windows Server 2008.
Windows Azure Tools: The system is missing a prerequisite to execute the service. Please see the release notes.
Can any one suggest what i am doing wrong ??
As said, you are using 32-bit environment. Retry on 64-bit Windows Server.
Also make sure the client profile in not set on the .NET Assembly versioning... Choose .NET 4
Did you upgrade to SP2 of Windows Server 2008 as suggested by the warning message ? And the mentioned hotfix for IIS7 & .NET 4.0: http://support.microsoft.com/kb/958854.

Resources