VS2012 - Sudden Death - visual-studio-2012

I have a fairly consistent but random occurrence of sudden death in Visual Studio 2012. This usually happens when I press F6 to build - VS will disappear without any message or warning.
The event log has this:
Error Handler Exception: System.ServiceModel.CommunicationException: There was an error reading
from the pipe: Unrecognized error 109 (0x6d). ---> System.IO.IOException: The read operation
failed, see inner exception. ---> System.ServiceModel.CommunicationException: There was an error
reading from the pipe: Unrecognized error 109 (0x6d). ---> System.IO.PipeException: There was an
error reading from the pipe: Unrecognized error 109 (0x6d).
at System.ServiceModel.Channels.PipeConnection.OnAsyncReadComplete(Boolean haveResult, Int32 error, Int32 numBytes)
--- End of inner exception stack trace ---
at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Channels.ConnectionStream.EndRead(IAsyncResult asyncResult)
at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult)
--- End of inner exception stack trace ---
at System.Net.Security.NegotiateStream.EndRead(IAsyncResult asyncResult)
at System.ServiceModel.Channels.StreamConnection.EndRead()
--- End of inner exception stack trace ---
at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Channels.TransportDuplexSessionChannel.EndTryReceive(IAsyncResult result, Message& message)
at System.ServiceModel.Dispatcher.DuplexChannelBinder.EndTryReceive(IAsyncResult result, RequestContext& requestContext)
at System.ServiceModel.Dispatcher.ErrorHandlingReceiver.EndTryReceive(IAsyncResult result, RequestContext& requestContext) \r\n at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Channels.TransportDuplexSessionChannel.EndTryReceive(IAsyncResult result, Message& message)
at System.ServiceModel.Dispatcher.DuplexChannelBinder.EndTryReceive(IAsyncResult result, RequestContext& requestContext)
at System.ServiceModel.Dispatcher.ErrorHandlingReceiver.EndTryReceive(IAsyncResult result, RequestContext& requestContext)
I suspect it may be some extension I have installed but I've removed all the latest one I've installed and it persists.
Anyone had a similar experience?

Sounds like a bad installation to me. Try running a repair on your Visual Studio 2012 installation by selecting the application name in Windows Programs and Features and clicking on the Change button.

Related

Failed to deploy web package to App Service. Service Unavailable (CODE: 503)

I am trying to deploy my app to an Azure app service via Azure Dev Ops pipelines. The app builds okay, but during the deploy phase, I get the following error.
2023-01-12T19:23:13.1683884Z ##[error]Failed to deploy web package to App Service.
2023-01-12T19:23:13.1696403Z ##[error]Error: Error: Failed to deploy web package to App Service. Service Unavailable (CODE: 503)
It has failed consistently multiple times in a row, after working fine for the past couple of weeks.
Full log
2023-01-12T19:21:10.6967333Z ##[section]Starting: Deploy
2023-01-12T19:21:10.6981944Z ==============================================================================
2023-01-12T19:21:10.6982213Z Task : Azure App Service deploy
2023-01-12T19:21:10.6982366Z Description : Deploy to Azure App Service a web, mobile, or API app using Docker, Java, .NET, .NET Core, Node.js, PHP, Python, or Ruby
2023-01-12T19:21:10.6982681Z Version : 4.214.0
2023-01-12T19:21:10.6982809Z Author : Microsoft Corporation
2023-01-12T19:21:10.6982961Z Help : https://aka.ms/azureappservicetroubleshooting
2023-01-12T19:21:10.6983137Z ==============================================================================
2023-01-12T19:21:11.2444263Z Got service connection details for Azure App Service:'REDACTED'
2023-01-12T19:22:18.8337786Z Package deployment using ZIP Deploy initiated.
2023-01-12T19:23:13.1683884Z ##[error]Failed to deploy web package to App Service.
2023-01-12T19:23:13.1696403Z ##[error]Error: Error: Failed to deploy web package to App Service. Service Unavailable (CODE: 503)
2023-01-12T19:23:13.9090032Z Successfully added release annotation to the Application Insight : [REDACTED]
2023-01-12T19:23:14.0064590Z ##[warning]Error: Failed to update deployment history. Error: Service Unavailable (CODE: 503)
2023-01-12T19:23:14.2708516Z App Service Application URL: https://REDACTED.azurewebsites.net
2023-01-12T19:23:14.2790032Z ##[section]Finishing: Deploy
I tried to redeploy an older release that previously worked, but I got the same errors.
I also tried to publish to my app service from Visual Studio. It failed with the following error.
Error MSB4018: The "ZipDeploy" task failed unexpectedly.
Full Error
Error MSB4018: The "ZipDeploy" task failed unexpectedly.
System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: Error while copying content to a stream. ---> System.IO.IOException: Unable to read data from the transport connection: An established connection was aborted by the software in your host machine. ---> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
at System.Net.Sockets.Socket.BeginReceive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, AsyncCallback callback, Object state)
at System.Net.Sockets.NetworkStream.BeginRead(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
--- End of inner exception stack trace ---
at System.Net.ConnectStream.EndRead(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.WebExceptionWrapperStream.EndRead(IAsyncResult asyncResult)
at System.Net.Http.StreamToStreamCopy.StartRead()
--- End of inner exception stack trace ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.NET.Sdk.Publish.Tasks.ZipDeploy.HttpClientHelpers.<PostWithBasicAuthAsync>d__0.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.NET.Sdk.Publish.Tasks.ZipDeploy.ZipDeploy.<ZipDeployAsync>d__26.MoveNext()
--- 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.NET.Sdk.Publish.Tasks.ZipDeploy.ZipDeploy.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
---> (Inner Exception #0) System.Net.Http.HttpRequestException: Error while copying content to a stream. ---> System.IO.IOException: Unable to read data from the transport connection: An established connection was aborted by the software in your host machine. ---> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
at System.Net.Sockets.Socket.BeginReceive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, AsyncCallback callback, Object state)
at System.Net.Sockets.NetworkStream.BeginRead(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
--- End of inner exception stack trace ---
at System.Net.ConnectStream.EndRead(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.WebExceptionWrapperStream.EndRead(IAsyncResult asyncResult)
at System.Net.Http.StreamToStreamCopy.StartRead()
--- End of inner exception stack trace ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.NET.Sdk.Publish.Tasks.ZipDeploy.HttpClientHelpers.<PostWithBasicAuthAsync>d__0.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.NET.Sdk.Publish.Tasks.ZipDeploy.ZipDeploy.<ZipDeployAsync>d__26.MoveNext()<---
Could this a temporary problem with the zip deployment service? The Azure service status page doesn't currently show any issues.
Turns out my App Service was overloaded. I scaled-up to the next plan, and I was able to deploy again.

Win 10 -> VS 2019 -> .NET Core 3 WPF application -> Publish to directory (self-contained for linux-x64) -> Publish failed

Weird issue I've faced today.
Pre-requisites:
Installed:
VS2019
.NET Core 3.0
Steps to reproduce the issue:
Create new "WPF App (.NET Core)"
To the MainWindow.xaml add single TextBlock:
<TextBlock Text="WPF on Linux" TextWrapping="Wrap"/>
Create new Publish Profile like the following:
Then save and publish
Expected to see the application being published. But instead the following message pops up:
And here is the content of the mentioned in the error message file:
2019-10-28 19:39:43
System.AggregateException: One or more errors occurred. ---> System.Exception: Publishing failed.
--- 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.Publish.Framework.Model.DefaultPublishSteps.<>c__DisplayClass26_0.<IsBuildCompletedSuccessfully>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.Publish.Framework.Model.DefaultPublishSteps.<DefaultCorePublishStep>d__23.MoveNext()
--- 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.Publish.Framework.ViewModel.ProfileSelectorViewModel.<RunPublishTaskAsync>d__202.MoveNext()
---> (Inner Exception #0) System.Exception: Publishing failed.<---
System.Exception: Publishing failed.
===================
The question is.. What am I doing wrong and/or how to fix the issue?
Important note:
If Deployment Mode is set to "Framework Dependent", and the Target Runtime is "linux-x64" then the project is published into the directory with no issues.
If Deployment Mode is set to "Self-contained", but Target Runtime is "win-x64", then deployment works with no issues.
The error is in the build output window:
There was no runtime pack for Microsoft.WindowsDesktop.App.WPF available for the specified RuntimeIdentifier 'linux-x64'
WPF is not supported on Linux, only Windows.

Dotnet Core 2.0 Web App Publish to Azure Fails

From VS 2017
what I tried:
Build in release mode & debug mode both builds fine.
Set Build verbosity to Diagnostic, there is not much information
indicating code error.
However .tmp dump file indicates some error.
I suspect these are visual studio internal errors:
5/4/2018 9:34:44 PM
System.AggregateException: One or more errors occurred. ---> System.Exception: Publish failed due to build errors. Check the error list 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__DisplayClass40_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__88.MoveNext()
---> (Inner Exception #0) System.Exception: Publish failed due to build errors. Check the error list for more details.<---
===================
Setting RazorCompileOnBuild property to true should resolve your problem.
Take a look on following question
Had to set build verbosity to diagnostics then found out there were some errors in un-used Razor view pages.
There must be a way to compile Razor during build time rather than when publishing.

.NET Core deployment to IIS error for the standard .NET Core web application

I am trying to deploy a .NET Core 2.0 application to IIS. This is just the standard .NET Core web application that is created when starting a new project. The project builds and run just fine. However, when trying to publish to IIS via web deploy, I get the following error:
3/25/2018 3:45:08 PM
System.AggregateException: One or more errors occurred. ---> System.Exception: Publish failed due to build errors. Check the error list 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__DisplayClass40_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__88.MoveNext()
---> (Inner Exception #0) System.Exception: Publish failed due to build errors. Check the error list for more details.<---
===================
Am I missing something?

Image resizer with azure blob storage. Returns "403 forbidden" when going through the resizer

We have been using image resizer with azurereader2 for quite a while with no problem. After a small release (that really shouldnt have anything to do with this) we suddenly get errors when we try to access the images through the resizer.
This is only a problem on our test environment, the new release and image resizer etc. works just fine in production.
Both production and test is hosted in azure, and both use their own azure blob storage.
example url:
test.mysite.com/images/pim/b6ffa894-bc8f-4f1b-a1e8-ef115b78a56f.jpg?width=250&height=312&format=jpg&scale=both&mode=pad
returns the following error
Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (403) Forbidden. ---> System.Net.WebException: The remote server returned an error: (403) Forbidden.
at Microsoft.WindowsAzure.Storage.Shared.Protocol.HttpResponseParsers.ProcessExpectedStatusCodeNoException[T](HttpStatusCode expectedStatusCode, HttpStatusCode actualStatusCode, T retVal, StorageCommandBase`1 cmd, Exception ex) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\Common\Shared\Protocol\HttpResponseParsers.Common.cs:line 50
at Microsoft.WindowsAzure.Storage.Blob.CloudBlobClient.c__DisplayClass13.b__12(RESTCommand`1 cmd, HttpWebResponse resp, Exception ex, OperationContext ctx) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Blob\CloudBlobClient.cs:line 788
at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.EndGetResponse[T](IAsyncResult getResponseResult) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:line 299
--- End of inner exception stack trace ---
at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.EndExecuteAsync[T](IAsyncResult result) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:line 50
at Microsoft.WindowsAzure.Storage.Blob.CloudBlobClient.EndGetBlobReferenceFromServer(IAsyncResult asyncResult) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Blob\CloudBlobClient.cs:line 630
at Microsoft.WindowsAzure.Storage.Core.Util.AsyncExtensions.c__DisplayClass1`1.b__0(IAsyncResult ar) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Util\AsyncExtensions.cs:line 66
--- 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 ImageResizer.Plugins.AzureReader2.AzureReader2Plugin.d__14.MoveNext()
--- 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 ImageResizer.Util.AsyncUtils.RunSync[TResult](Func`1 func)
at ImageResizer.Storage.Blob.Open() in C:\projects\resizer\Plugins\ImageResizer.Storage\Blob.cs:line 41
at ImageResizer.ImageBuilder.GetStreamFromSource(Object source, ResizeSettings settings, Boolean& disposeStream, String& path, Boolean& restoreStreamPosition)
at ImageResizer.ImageBuilder.LoadImage(Object source, ResizeSettings settings, Boolean restoreStreamPos)
at ImageResizer.ImageBuilder.BuildJob(ImageJob job)
at ImageResizer.ImageBuilder.Build(ImageJob job)
at ImageResizer.ImageBuilder.Build(Object source, Object dest, ResizeSettings settings, Boolean disposeSource, Boolean addFileExtension)
at ImageResizer.ImageBuilder.Build(Object source, Object dest, ResizeSettings settings, Boolean disposeSource)
at ImageResizer.ImageBuilder.Build(Object source, Object dest, ResizeSettings settings)
at ImageResizer.InterceptModule.c__DisplayClass5_0.b__1(Stream stream)
at ImageResizer.Plugins.DiskCache.CustomDiskCache.c__DisplayClass28_0.b__0()
at ImageResizer.Plugins.DiskCache.LockProvider.TryExecute(String key, Int32 timeoutMs, LockCallback success)
at ImageResizer.Plugins.DiskCache.CustomDiskCache.GetCachedFile(String keyBasis, String extension, ResizeImageDelegate writeCallback, Int32 timeoutMs, Boolean asynchronous)
at ImageResizer.Plugins.DiskCache.DiskCache.Process(IResponseArgs e)
at ImageResizer.Plugins.DiskCache.DiskCache.Process(HttpContext context, IResponseArgs e)
at ImageResizer.InterceptModule.HandleRequest(HttpContext context, HttpModuleRequestAssistant ra, IVirtualFile vf)
at XXX.Web.Modules.CustomImageResizingInterceptModule.HandleRequest(HttpContext context, HttpModuleRequestAssistant ra, IVirtualFile vf) in E:\TeamCity\buildAgent\work\4773e55a378b97a1\src\Portal\Portal\Infrastructure\Web\Modules\CustomImageResizingInterceptModule.cs:line 15
at ImageResizer.InterceptModule.CheckRequest_PostAuthorizeRequest(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Request Information
RequestID:e8c13071-0001-00c2-437e-d8b9c7000000
RequestDate:Mon, 29 May 2017 13:19:16 GMT
StatusMessage:Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
the url
test.mysite.com/images/pim/b6ffa894-bc8f-4f1b-a1e8-ef115b78a56f.jpg correctly redirects to the image in the azure blob.
I have tried regenerating the access key for the blob storage, without any luck.
I have tried pointing to another blob storage from our test env, that does not work either.
I can access the test blob storage just fine from my local environment.
/resizer.debug reports 0 issues detected.
Any help is greatly appreciated, let me know if i can provide additional info.
This is purely a azure blob storage connection problem, image resizer is not the culprit.

Resources