i have created an application, it works perfectly fine on my system but when i deploy it on azure app service. it doesn't work. it is showing such error.
An error occurred while starting the application.
.NET Core 4.6.27817.03 X86 v4.0.0.0 | Microsoft.AspNetCore.Hosting version 2.2.0-rtm-35687 | Microsoft Windows 10.0.14393 | Need help?
i have tried to check the azure app service platform, but it is fine.
Also i have tried to check the publish settings on the visual studio.
Under the 'Entity framework Migrations' dropdown in publish settings i see this error:
Could not execute because the specified command or file was not found.
Possible reasons for this include:
You misspelled a built-in dotnet command.
You intended to execute a NET Core program, but dotnet-ef does not exist.
You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
Also i have checked everything, it looks fine.
I have tried to create a fresh new .net core 2.2 project and tried to deploy it but that also shows the same issues.
i want it to be deployed on azure and in working condition.
Whoever can, kindly Help.
Please look at the below answer for troubleshooting issue around dot net core 2.2
ASP.NET Core 2.2 App Service hosted on Azure returning 500 without an exception being thrown
This will give you the actual reason of the error which you can use it to resolve.
Additionally , you can enable DetailedErrorsKey in the Program.cs so you can figure it out what's happening.
For startup related exception , you can take look at this link.
The Database Error Page **middleware** captures database-related exceptions that can be resolved by using Entity Framework migrations. When these exceptions occur, an HTML response with details of possible actions to resolve the issue is generated. This page should be enabled only in the Development environment. Enable the page by adding code to Startup.Configure:
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/error-handling?view=aspnetcore-2.2#database-error-page
Hope it helps.
Related
Hy everbody,
I created a ASP.NET Core Web App which i run as a Windows Service.
That is working fine until i started to use Devart as DB-Provider for my Oracle-Database.
As soon as is include the Nuget-Package Devart.Data.Oracle.EFCore in my Project i get the following Error when i try to start my Windows Service:
[SC] StartService FAILED 1053:
The service did not respond to the start or control request in a timely fashion.
I can start the Service again when i remove the Package Devart.Data.Oracle.EFCore.
The Nuget-Package Devart.Data is also included but there is no Problem.
I can start the Service with the Package Devart.Data inculded without any Issue.
Unfortunately i need both Packages.
Maybe someone can give me a hint where i can find what the Problem with the Package Devart.Data.Oracle.EFCore is?
Thank you very much.
I tried a view suggestions from there: https://appuals.com/how-to-fix-error-1053-the-service-did-not-respond-to-the-start-or-control-request-in-a-timely-fashion/#:~:text=Users%20experience%20the%20error%20message,respond%20in%20the%20time%20window.
I created an ASP.Net project (.net 4.7.1), it's basically the default temple project without any change at all!
I created a build to publish it to an Azure WebApp- result : works just fine.
then I cloned the build and this time I target a virtual directory (I built the virtual directory from the portal and ticked it as an application)
surprisingly, although it has published successfully ( I doubled check from console), but when I browse it , it doesn't work and I get te below error:
HTTP Error 502.5 - Process Failure Common causes of this issue: The
application process failed to start The application process started
but then stopped The application process started but failed to listen
on the configured port 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
it doesn't make sense to me, so I tried with different project type and .net version but the result is the same!
I found a workaround if I deploy pure HTML file (without asp.net) in the root, then the virtual directories will start working.
it looks like it's related to the fact that web.config of the virtual directory inserts something from the config of the root.
When I publish a website with .Net MVC Core 2.0 to run in IIS, it results in error (see below picture) when I try ti register an account,
How to I fix it?
The error you are getting doesn't look like the errors I have had when trying to publish an Asp Core 2.0 site. Have you tried running the site in the powershell using:
dotnet app.dll
The fastest way I find doing this is to go to the directory the dll is stored using file explorer then typing "powershell" in the address bar.
Also do you have all the needed modules and tool kits installed? Here is the microsoft article on the needed items
https://learn.microsoft.com/en-us/aspnet/core/publishing/iis
Not sure here , but i hope someone would direct to the right in publishing a project to IIS from visual studio.
I'm publishing my project in .NET Framework V4. and on IIS I'm setting the Application Pool of the site to .NET Framework V4 as well.
Now, for some reason when I go to the site link it does not work and gives the following error:
*Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL:* /
But when i change the Application Pool to .NET Framework V2 the site works but i really need it to be working with the Application Pool set to .NET Framwork v4.
Is there anything i am missing? can someone direct please?
Thank you
Maybe your .net Framework v4 ASP is not registered.
open command prompt (Start -> cmd) and for 32 bit servers run the command
%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
open command prompt (Start -> cmd) and for 64 bit servers run the command
%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i
And Check if all features are installed for IIS
We have a solution consisting of several class libraries, and a Web
Application Project. We are using TFS 2012 with Team Build. The solution
compiles correctly on the build server.
I am currently trying to do this via MSBuild Arguments.
/p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish
/p:CreatePackageOnPublish=False /p:MSDeployPublishMethod=RemoteAgent
/p:MsDeployServiceUrl=https://testWebServer:8172/MsDeploy.axd?site=direct /p:AllowUntrustedCertificate=True
/p:DeployIisAppPath="direct"
/p:AuthType=NTLM
The solution builds but does not deploy. I get the following error message:
msdeploy error ERROR_DESTINATION_INVALID: Web deployment task failed.
( Could not connect to the remote computer ("https"). Make sure that
the remote computer name is correct and that you are able to connect
to that computer. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_INVALID.)
[C:\Builds\1\ProjectName\Solution General Build\Sources\Temp
Source\ProjectName\Solution\Project.csproj]
Is there another argument I should be passing to specify the server? I did
not intend for https to be the server name... I have tried omitting the
https:// to no avail, error is the same, so it is getting the value from
somewhere.
I have tried this with the following values for MsDeployServiceUrl:
https://testWebServer:8172/MsDeploy.axd?site=direct
https://testWebServer:8172/MsDeploy.axd
"https://testWebServer:8172/MsDeploy.axd?site=direct"
https://192.168.X.X:8172/MsDeploy.axd?site=direct
"https://192.168.X.X:8172/MsDeploy.axd?site=direct"
testWebServer:8172/MsDeploy.axd?site=direct
Update
Alright, the following is at least connecting:
/p:MsDeployServiceUrl=testWebServer
I have seen numerous posts concerning that particular argument, and almost invariably they are a URL, not just a hostname (the ones that appear to be a hostname I thought were just written that way for brevity).
I am now, however, faced with a new problem. I have made the Build Service Account (domain account) local admin on the webserver, and I am getting msdeploy error ERROR_USER_NOT_ADMIN as well as an Audit failure in the Security log.
Resolution
These are the MSBuild arguments I am currently going with.
/p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:CreatePackageOnPublish=False /p:MSDeployPublishMethod=WMSvc /p:MsDeployServiceUrl="https://SERVER:8172/MsDeploy.axd" /p:AllowUntrustedCertificate=True /p:DeployIisAppPath="siteName"
I am now getting ERROR_USER_UNAUTHORIZED. Apparently I have either not set up the delegation correctly or the IIS Manager User I have created is somehow incorrect. Regardless that will go in a different post if necessary.
What is the Server and IIS version, you are using?
IIS 6 uses Web Deployment Agent Service (MsDepSvc), whereas IIS 7 usually uses Web Management Service (WMSvc) which have different URLs (besides, you have to be an admin on the target server to execute MsDepSvc.
Can you try specifying
/P:MSDeployPublishMethod=WMSvc
Based on this article from Troy Hunt, Web Management Service (WMSvc) is using
.axd
URLs (the one you specify), whereas you are trying to force it use RemoteAgent publish method which seems to be inconsistent.
See this article for complete set of differencies between WMSvc and RemoteAgent publish methods.
I had a similar issue. To resolve the issue I tried the following steps:
As it was a hosted server we had to make sure that the port 8172 was open (obviously).
Creating a new login and set this up in IIS -> Deploy -> Configure -> Configure Web Deploy Publishing on the target server. I made sure that the password didn't have any spaces in to avoid the quotes issue just to be sure.
Actually running a manual deployment from the build server.
Finally specifying an IP address in the MSDeployServicerl:
/p:MsDeployServiceUrl=xxx.xxx.xxx.xxx:8172/msdeploy.axd
None of the web site names worked for me either. None of my parameters had quotes in. Of course if you leave a space in incorrectly in one of your parameters you will get the error:
MSBUILD : error MSB1008: Only one project can be specified