ASP.NET Core 3.0 project fails to run under IIS Express: HTTP Error 500.30 - ANCM In-Process Start Failure // ERROR: Unknown command '%LAUNCHER_ARGS%' - asp.net-core

I migrated a project from asp.net core 2.2 to 3.0 following the migration guide.
After a couple issues were resolved, starting it with dotnet run worked fine.
However when I try to run/debug with IIS Express, I get the following error:
HTTP Error 500.30 - ANCM In-Process Start Failure
Common solutions to this issue:
The application failed to start
The application started but then stopped
The application started but threw an exception during startup
Troubleshooting steps:
Check the system event log for error messages
Enable logging the application process' stdout messages
Attach a debugger to the application process and inspect
For more information visit: https://go.microsoft.com/fwlink/?LinkID=2028265
The output window for "ASP.NET Core Web Server" in Visual Studio shows the follwing error:
ERROR: Unknown command '%LAUNCHER_ARGS%'
As does an error entry in the windows event viewer
<EventData>
<Data>Application '/LM/W3SVC/2/ROOT' with physical root 'C:\Path\To\Project\' has exited from Program.Main with exit code = '1'. First 30KB characters of captured stdout and stderr logs: ERROR: Unknown command '%LAUNCHER_ARGS%'</Data>
<Data>Process Id: 7092.</Data>
<Data>File Version: 13.0.19258.0. Description: IIS ASP.NET Core Module V2 Request Handler. Commit: aee5e4080331553ea9dfb7fb388b6d72f715bf6a</Data>
</EventData>
Immediately followed by:
<EventData>
<Data>Application '/LM/W3SVC/2/ROOT' with physical root 'C:\Path\To\Project\' failed to load coreclr. Exception message: CLR worker thread exited prematurely</Data>
<Data>Process Id: 7092.</Data>
<Data>File Version: 13.0.19258.0. Description: IIS ASP.NET Core Module V2 Request Handler. Commit: aee5e4080331553ea9dfb7fb388b6d72f715bf6a</Data>
</EventData>
My initial thought was that there was an issue with my system setup, but a fresh ASP.NET Core 3.0 project runs without issues in IIS Express. I compared the two applicationhost.config files of the projects and they're identical (except differences like the project name). I also can't find any meaningful differences in the other project files (Project.csproj, appsettings.json, launchSettings.json). I also tried deleting the .vs folder and .user files .
The error messages suggests that it's not a problem with my code. As does the fact that there's no exception the attached debugger breaks at and that everything seems to work fine using dotnet run. Yet a fresh project created via template runs without those issues.

I was able to identify the issue. One mistake I made was to attribute the ERROR: Unknown command message to ASP.NET, when it was actually our application that complained.
The %LAUNCHER_ARGS% parameter is still passed to the application, but it's no longer set in an in-process hosting context.
More details here: https://github.com/aspnet/AspNetCore/issues/14735

Related

Error when deploying .NET Core webapp to IIS

am getting the following error when i try to build and debug the solution
Error : The "CreateManifestFile" task returned false but did not log an error.

Apache Ignite .Net Core failed to start

Apache ignite .net core server node fails to start with below error, any idea what could be the reason?
Apache.Ignite.Core.Binary.BinaryObjectException
HResult = -2146233088,
Message = Unexpected field type [pos=42559, expected=String, actual=0]
StackTrace:
class org.apache.ignite.binary.BinaryObjectException: Unexpected field type [pos=42559, expected=String, actual=0]
at org.apache.ignite.internal.binary.BinaryReaderExImpl.checkFlagNoHandles(BinaryReaderExImpl.java:1684)
at org.apache.ignite.internal.binary.BinaryReaderExImpl.readString(BinaryReaderExImpl.java:1058)
at org.apache.ignite.internal.processors.platform.utils.PlatformConfigurationUtils.readDataRegionConfiguration(PlatformConfigurationUtils.java:2303)
at org.apache.ignite.internal.processors.platform.utils.PlatformConfigurationUtils.readDataStorageConfiguration(PlatformConfigurationUtils.java:2082)
at org.apache.ignite.internal.processors.platform.utils.PlatformConfigurationUtils.readIgniteConfiguration(PlatformConfigurationUtils.java:919)
at org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetConfigurationClosure.processPrepareResult(PlatformDotNetConfigurationClosure.java:195)
at org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetConfigurationClosure.prepare(PlatformDotNetConfigurationClosure.java:182)
at org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetConfigurationClosure.apply0(PlatformDotNetConfigurationClosure.java:110)
at org.apache.ignite.internal.processors.platform.PlatformAbstractConfigurationClosure.apply(PlatformAbstractConfigurationClosure.java:50)
at org.apache.ignite.internal.processors.platform.PlatformAbstractConfigurationClosure.apply(PlatformAbstractConfigurationClosure.java:27)
at org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java:40)
at org.apache.ignite.internal.processors.platform.PlatformIgnition.start(PlatformIgnition.java:74)
NOTE:This error only occuring in Apache Ignite 2.12.0 and code working fine in the previous versions.
An error like this happens due to a mismatch of .NET binaries and Java jar files.
Try deleting bin and obj directories and performing a clean rebuild.

TFS 2015 - Waiting for an agent to be requested

So after coming back from vacation my build server don't want to run any builds anymore. It's just stuck on Waiting for an available agent / Waiting for an agent to be requested and if I cancel it I feel it get's stuck on Build Cancelling... since nothing more is happening after I cancel the build. The waiting message is still there but the build is not in the build queue though.
All the agents are green in the Agent Pool and the background service is running.
I am getting the following error in the event log:
Detailed Message: There was an error during job agent execution. The operation will be retried. Similar errors in the next five minutes may not be logged.
Exception Message: A previous call to WebApiConfiguration.Initialize failed. See inner exception for details. (type WebApiInitializationPreviouslyFailedException)
And after 14 Inner Exceptions with the same message on the 15th Inner Exception it says:
Exception Message: Could not load file or assembly 'System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (type FileNotFoundException)
I have installed the standalone installer for MVC 4 from http://www.asp.net/mvc/mvc4 but that did not help. Also think it's wierd that it's suddenly missing this assembly. I have also tried reconfiguring the agent.
Finnaly got this working again \o/
What I think fixed it was installing the ASP.NET MVC Security Update MS14-059 from this site: https://www.microsoft.com/en-us/download/details.aspx?id=44533
It's still no System.Web.Mvc assembly reference in the %windir%\assembly folder but after innstalling the fix and restarting the server the job agent queued the job right away. And I had restarted the server multiple times before that so it was definitely not because of the restart.

Unity Di container not working with 64 bit build

I am using Unity for in WCF service to load component.
I am referring below mention article.
https://msdn.microsoft.com/en-us/library/vstudio/hh323725(v=vs.100).aspx
Service is working fine when i build service in visual studio with build option option any CPU.
As one third party component required 64 bit specific build. So i selected 64 bit build option.
I have downloaded Unity code and build for 64 bit but it is also not working.
I am getting below mention exception.
Could not load file or assembly 'Common.Unity' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.BadImageFormatException: Could not load file or assembly 'Common.Unity' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Common.Unity' could not be loaded.
As this is not issue of Unity.
It is issue of IISExprees of VS2012 which is support on 32 bit.
Can't get IIS Express 8 beta to run website as 64-bit process
https://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3254745-allow-for-iis-express-64-bit-to-run-from-visual-st

Error in transporting an application from development worklight to Worklight Server Consumer Edition

I am using IBM Worklight environment. I have created a small application "SampleHybridProject" using Worklight Developer studio and tested it successfully.
Now when I am trying to deploy it on the Worklight Server Consumer Edition, and hitting the following URL: http://mymachine.com:9080/SampleHybridProject/console
I am getting this error in my browser:
Error 404: com.ibm.ws.webcontainer.servlet.exception.NoTargetForURIException: No target servlet configured for uri: /SampleHybridProject/console
I am using Worklight Edition 5.0.6. The Worklight Server is default "WAS with Liberty profile".
Here are the properties that I changed in worklight.properties file.
publicWorkLightHostname=localhost
publicWorkLightProtocol=http
publicWorkLightPort=9080
publicWorkLightContext=/SampleHybridProject
wl.db.type=MYSQL
wl.db.url=jdbc:mysql://mysqlinstalledonmypc:3306/WRKLGHT
wl.db.username=root
wl.db.password=admin
Here are the changes that I made in application-descriptor.xml:
<worklightServerRootURL>http://${local.IPAddress}:9080/SampleHybridProject</worklightServerRootURL>
Can you tell me what I am doing wrong or what I need to do?
I have found the problem and solved it. The problem is I was having this error in console.log file:
Error creating bean with name 'txManager' defined in URL [jar:file:/C:/ProgramData/IBM/Worklight/WAS85liberty-server/wlp/usr/shared/resou‌​rces/lib/worklight-jee-library.jar!/conf/core.xml]: Invocation of init method failed; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of com/ibm/ws/classloading/internal/UnifiedClassLoader) previously initiated loading for a different type with name "javax/sql/DataSource"
This was because I had a jar in the server/lib folder of my project which was causing this problem. I removed the jar from server/lib folder and redeployed the .war file. Now the console is getting loaded.
Are you getting any deployment errors in your liberty logs? A 404 on the context root generally means either the WAR was not found, or the context root defaults to something other than 'SampleHybridProject'. If the WAR appears to be loading correctly, it will output where it is listening on similar to:
[AUDIT ] CWWKT0016I: Web application available (default_host): http://[hostname]:port/SampleHybridProject/*
If it says the context root is anything other than SampleHybridProject, you can set it in the tag in liberty's server.xml:
<application id="SampleHybridProject" name="SampleHybridProject"
location="SampleHybridProject.war" type="war"
context-root="SampleHybridProject">
...
</application>