I have a bot using Bot Framework v4 in Visual Studio 2017, and a clean Azure subscription with no resources and resource groups.
I followed this tutorial to deploy the bot to Azure.
The first time it worked, but in the browser the page displayed an Internal Server Error message.
So I removed all resources and their groups, undid all changes that the Publish did to any files in Visual Studio. Then I tried again, and again, with the same result.
The Publish fails, after the project builds in Release mode. I checked on Azure and the App Service and App Service plan are created.
Do you have any ideas?
The output window:
Error : Web deployment task failed. (Could not connect to the remote computer ("mybot.scm.azurewebsites.net"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.)
The requested resource does not exist, or the requested URL is incorrect.
Error details:
Could not connect to the remote computer ("mybot.scm.azurewebsites.net"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.
The remote server returned an error: (404) Not Found.
Publish failed to deploy.
Visual Studio generated a .tmp file with the stack trace:
11-Nov-18 13:19:02
System.AggregateException: One or more errors occurred. ---> System.Exception: Build failed. Check the Output window for more details.
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Web.Publish.PublishService.VsWebProjectPublish.<>c__DisplayClass43_0.<PublishAsync>b__2()
at System.Threading.Tasks.Task``1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.ApplicationCapabilities.Publish.ViewModel.ProfileSelectorViewModel.<RunPublishTaskAsync>d__127.MoveNext()
---> (Inner Exception #0) System.Exception: Build failed. Check the Output window for more details.<---
Related
Unable to deploy to Azure App Service. What might be possibly going wrong here?
10-10-2021 11:07:06
System.AggregateException: One or more errors occurred. ---> Microsoft.WebTools.Shared.Exceptions.WebToolsException: Build failed. Check the Output window for more details.
--- End of inner exception stack trace ---
---> (Inner Exception #0) Microsoft.WebTools.Shared.Exceptions.WebToolsException: Build failed. Check the Output window for more details.<---
Microsoft.WebTools.Shared.Exceptions.WebToolsException: Build failed. Check the Output window for more details.
===================
I'm using Visual studio 2022 Preview.
I tried this solution earlier, but this didn't work in my case, this was actually due to partially deleted publish profile under the properties folder.
So completely clearing (leaving launchSettings.json intact) that and adding profile again helped me resolve this issue.
Cannot send a DEBUG request to IIS Express (exception: An error occurred while sending the request., reason: System.Net.Http.HttpRequestException: An error occurred while sending the request. --->
System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. --->
System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. --->
System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult) at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
--- End of inner exception stack trace --- at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult) at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
--- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
--- End of inner exception stack trace --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at JetBrains.ReSharper.Host.Features.IisIntegration.IisExpressHost. d__14.MoveNext()). It may indicate an invalid "applicationUrl" parameter in your launchSettings.json. Please check your settings.
That the error message I get from Rider when it fails to run. VS2019 doesn't give an error message but I only used it to test if it was the IDE or the project.
The projects inside the solution are all using netcoreapp2.2.
I have narrowed it down to what I think is an error in with when Rider tries to setup SSL for the project.
Not sure what else to include with this, if there is something I can include or a file I can be pointed to to look at let me know.
Running the Project instead of Debugging allows me to access the site by going to the URL but obviously this is far from ideal as I need debugging tools.
Figured it out. So in my case this happened becuase Rider has its own SSL certificate that is uses when setting up the SSL on the projects running locally that was not installed on my machine. The error message however does not give any indication of this.
To install the ASP.NET Core certificate that it needs do the following (instructions from here).
Hit Ctrl+T
Click on the "Actions" tab
Search for "set up certificate"
Click on "Set up ASP.NET Core Developer Certificate"
In addition to Set up ASP.NET Core Developer Certificate in Rider, you can try these commands to recreate the certificate:
dotnet dev-certs https --clean
dotnet dev-certs https
dotnet dev-certs https --trust
or delete the localhost certificate from the Keychain Access if you are using a Mac.
Source: https://dev.to/cesarcodes/troubleshooting-net-core-dev-certs-on-macos-179d
While Installing the Oracle Development Tools for VS 2017, I came upon this error message and I have not been able solve it so far.
Error Message pointing me to a log file
The error Message points me to a log file in which the following stacktrace is found:
1/9/2020 3:39:09 PM - System.AggregateException: One or more errors occurred. ---> System.OperationCanceledException: Pre-check verification failed with warning(s) : AnotherInstallationRunning. ---> Microsoft.VisualStudio.Setup.CanceledByPrecheckException: Pre-check verification failed with warning(s) : AnotherInstallationRunning.
--- End of inner exception stack trace ---
at Microsoft.VisualStudio.Setup.PrecheckManager.RunPrechecks(PrecheckParameters precheckParameters, VariableCollection properties)
at Microsoft.VisualStudio.Setup.Engine.RunPrecheck(String destination, Product product, ExecuteAction action, IWindowsRestartManager rmService, ITelemetryOperation installOperation, InstallOperation install)
at Microsoft.VisualStudio.Setup.Engine.Install(Product product, String destination, CancellationToken token)
at Microsoft.VisualStudio.ExtensionManager.SetupEngineService.<Install>b__14_0()
at System.Threading.Tasks.Task1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Microsoft.VisualStudio.ExtensionManager.SetupEngineService.Install()
at Microsoft.VisualStudio.ExtensionManager.ExtensionBatchEngine.Execute(List1 installableExtensions, Version targetVsVersion)
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.BatchEngineInstall(List1 installableExtensions, InstallFlags installFlags, Version targetVsVersion)
at VSIXInstaller.BatchSetupEngineInstaller.Install(SupportedVSSKU sku, List1 extensionsToInstall, InstallFlags installFlags)
at VSIXInstaller.BatchSetupEngineInstaller.BatchInstall(IReadOnlyList1 targetSkus, IEnumerable1 extensionsToInstall)
at VSIXInstaller.SilentEngine.Execute(ExtensionData data)
at VSIXInstaller.App.OnStartup(StartupEventArgs e)
---> (Inner Exception #0) System.OperationCanceledException: Pre-check verification failed with warning(s) : AnotherInstallationRunning. ---> Microsoft.VisualStudio.Setup.CanceledByPrecheckException: Pre-check verification failed with warning(s) : AnotherInstallationRunning.
--- End of inner exception stack trace ---
at Microsoft.VisualStudio.Setup.PrecheckManager.RunPrechecks(PrecheckParameters precheckParameters, VariableCollection properties)
at Microsoft.VisualStudio.Setup.Engine.RunPrecheck(String destination, Product product, ExecuteAction action, IWindowsRestartManager rmService, ITelemetryOperation installOperation, InstallOperation install)
at Microsoft.VisualStudio.Setup.Engine.Install(Product product, String destination, CancellationToken token)
at Microsoft.VisualStudio.ExtensionManager.SetupEngineService.<Install>b__14_0()
at System.Threading.Tasks.Task1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)<---
The gist of it in my understanding is that there is another installation running while it tries to install the Visual Studio extension. I didn't of course install something myself during the process, but I also checked the task manager if there is ein msiexec process running. Sometimes there was one running but I got the same error message while there was no msiexec process running.
The only way I can imagine two installers running is that the Oracle Development Tools installer starts the Visual Studio extension installer. Then there are two installers running. However I do not quite believe in that conclusion as this should have been occurred somewhere else before but I haven't found my error message anywhere.
The things I have tried:
Multiple Reinstall with restarts and running as admin.
I have tried to manuelly install the extension after the error occurs, which ends successfully, however when I try to use the custom tools in visual studio I get an error message.
Visual Studio 2017 Verison: 15.9.18
Oracle Development Tools Version: 18.3.0.0.0
In my case the execution of the following file solved this issue:
Oracle.VsDevTools.15.0.vsix
Here you can find this file: C:\Program Files (x86)\Oracle Developer Tools for VS2017\odt
I want to deploy my asp net web core project in a local network. I don't really know how to make this available.
Someone has an idea how to do ?
I have tried to publish my code via Visual Studio, but an error occurred.
Build step successful but not publish step.
Error when publish
Logs :
System.AggregateException: One or more errors occurred. ---> System.Exception: Build failed. Check the Output window for more details.
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Web.Publish.PublishService.VsWebProjectPublish.<>c__DisplayClass43_0.<PublishAsync>b__2()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.ApplicationCapabilities.Publish.ViewModel.ProfileSelectorViewModel.<RunPublishTaskAsync>d__127.MoveNext()
---> (Inner Exception #0) System.Exception: Build failed. Check the Output window for more details.<---
UPDATE
Publish is ok, but when I want to use the IIS management and start the website I have a website innacessible
UPDATE
On IIS Management, I have configured the project on the port 80.
When I start the server, I go to 127.0.0.1:80, my browser load something during a long time and nothing happens
Solution was when I publish my project from Visual Studio 2017 to select "Self-container" in deployment mode.
In the IIS, I have selected the folder "publish"
I'm getting below error in log file when trying to start the .Net Core API application deployed on IIS. Tried many workarounds according to many posts (configuration changes in IIS, etc) but still couldn't resolve this issue. Specially tried to add logs to find specific missing dlls using this link, related to .Net Core ReflectionTypeLoadException in ASP.NET Core MVC application
Created a ExceptionCatchMiddleware extension class.
Added it in Configure() method in Startup.cs:
But it didn't log any specific log message related to this exception. Only the above mentioned error is there in the log.
This is a .Net Core API application (Net Core 2.0 with Visual Studio 2017). Deployed on IIS in both Windows 10 & Windows Server 2012 R2. Same error is there in log file.
Main issue I found here is: this project has added a reference to a SOAP service (asmx service). When this service reference is removed, no such error. Seems the application is trying to get relevant dlls from some where else, instead of getting from published folder. May be from GAC. But copied the dlls related to "system.servicemodel.*" to GAC as well (these are the automatically added dlls (from Nuget) when adding that service reference via Connected Services in Visual Studio).
This happens only after deployed (on IIS). When runing this application from source code, this works fine. No such error. I'm not sure if these new version of .Net Core doesn't support asmx services after deployed.
Appreciate any help to resolve this issue, as we need that asmx service reference in this project.
Thank you.
2018-10-01T10:10:42.6383743+01:00 0HLH7FMNJ4U50:00000002 [ERR] Connection id ""0HLH7FMNJ4U50"", Request id ""0HLH7FMNJ4U50:00000002"": An unhandled exception was thrown by the application. (560e7d32)
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeAssembly.get_DefinedTypes()
at Microsoft.AspNetCore.Mvc.Controllers.ControllerFeatureProvider.PopulateFeature(IEnumerable1 parts, ControllerFeature feature) at Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager.PopulateFeature[TFeature](TFeature feature) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionDescriptorProvider.GetControllerTypes() at Microsoft.AspNetCore.Mvc.Internal.ControllerActionDescriptorProvider.BuildModel() at Microsoft.AspNetCore.Mvc.Internal.ControllerActionDescriptorProvider.GetDescriptors() at Microsoft.AspNetCore.Mvc.Internal.ControllerActionDescriptorProvider.OnProvidersExecuting(ActionDescriptorProviderContext context) at Microsoft.AspNetCore.Mvc.Internal.ActionDescriptorCollectionProvider.UpdateCollection() at Microsoft.AspNetCore.Mvc.Internal.ActionDescriptorCollectionProvider.get_ActionDescriptors() at Microsoft.AspNetCore.Mvc.Internal.AttributeRoute.GetTreeRouter() at Microsoft.AspNetCore.Mvc.Internal.AttributeRoute.RouteAsync(RouteContext context) at Microsoft.AspNetCore.Routing.RouteCollection.d__9.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Builder.RouterMiddleware.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.d__11.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.d__3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Frame1.d__2.MoveNext()
2018-10-01T10:10:42.6385488+01:00 0HLH7FMNJ4U50:00000002 [INF] Request finished in 11.3774ms 500 (791a596a)
PS: I could resolve this issue. I have added the solution that I found, in the comment below.
I could resolve this issue by including a .Net standard project to the .Net Core 2.0 project (Added .Net standard project reference to the .Net Core project).