Note I do not use the Storage Emulator.
If I build my solution with the configuration set to debug and then run the binaries from the command-line everything is fine and my code interacts fine with the AzureStorage.
But, if I debug my binaries from within the Visual-Studio a SocketException is thrown and no interaction with the AzureStorage happens.
Q What do I need to tweak to enable Visual-Studio to debug my code with the IDE?
Update I asked this question after I discovered with fiddler that Visual Studio debugs the binaries in a kind of sandbox-environment which inhibits the Azure communication.
Before discovering that, I asked this detailed question, which didn't receive an answer up to now. You'll find all the requested information in the question.
Update1 The exception is plain and simple System.Net.Sockets.SocketException occurred with the corresponding stack-trace:
Related
I've tried using the standard Blazor template app to remote debug on an Azure app service and I get the following error:(the app run fine if a compile to release, though not debugging of course.)
I compile to debug any CPU.
UPDATE
I can debugger in my .razor pages.
PRIVIOUS
Judging from your error message, the problem may be caused by unsuccessful release of some files and other factors when the program was released.
In order to solve your problem, you can tell us the version of Visual Studio you are using and how you created the project. This problem is mostly related to your development tool environment configuration.
Here is a suggestion, test it by yourself and it runs normally.
Visual Studio 2019 Enterprise Edition (other versions should also be normal)
Configuration before project release
Start remote debugging
The final result
I have a web project, which works fine on local PC. But when I publish it on Azure Website, I get an error:
Could not load type 'Infrastructure.Asset.AssetContext' from assembly
'Infrastructure'. 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.TypeLoadException: Could not load type
'Infrastructure.Asset.AssetContext' from assembly 'Infrastructure'.
where AssetContext is DbContext from another project inside solution. As I understand, this assembly is not published correctly on Azure. So, I removed all files on Azure Website via Kudu and republish again. The same. I try to connect to remote Db from my local - it works. I tried to rebuild solution, reopen Visual Studio etc. Nothing happened
Why it can be happened, what is wrong and how to fix?
There is a similar SO thread What could be causing a System.TypeLoadException in a Visual Studio Unit Test?, I think which answers are valuable for your current issue.
Please follow the figure below to get the information of what platform you used is on Azure Website, then to select the current mode in Visual Studio to build and publish.
Error message:
A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available.
This was the error message I got when I tried to launch Visual Studio 2012 on my Windows 8.1 system. There is no other information to act upon other than this, which is rather the same as "We don't know what's wrong. We will tell you if we know (but I don't think we do)". It was actually working before it just decided to stop.
The last configuration I made before it began to show this error was that I selected the option to load the last solution whenever I launch Visual Studio, and this was done in the options dialog. I don't think that could have caused Visual Studio to suddenly crash. The previous error message included something that had to with a change in configuration.
I have checked that ActivityLog.xml file in.
There were basically four errors:
Construction of frame content failed. Frame identifier: ST:0:0:{74946827-37a0-11d2-a273-00c04f8ef4ff} Frame caption: Exception details: System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) at Microsoft.VisualStudio.Shell.Interop.IVsShell5.LoadPackageWithContext(Guid& packageGuid, Int32 reason, Guid& context) at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.GetPackage() at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()
SetSite failed for package [Visual Studio Component Model Host Package]
End package load [Visual Studio Component Model Host Package]
End package load [Microsoft.VisualStudio.Editor.Implementation.EditorPackage]
I have searched on Stack Overflow, Bing and Google. The solutions I got from there didn't work. Some had to do with registry settings, deleting keys, etc. I even disabled all the extensions from the registry. There was a time it was showing another message that "Object reference was not set to ...".
I don't know what to do. The only solution I have not tried is the one that I should download the updates. Update 4 is about 2 GB. That will take me, at least a week to download. Is there anything I can do?
PS: I tried to uninstall it. It does absolutely nothing. From the Control Panel, there's only the option to change. Clicking it seems to do something but nothing appears. I tried running from the set up from the .iso file. It shows nothing, too. How can I fix this problem?
There's probably nothing we can help you with here, my view is that you need to reinstall VS. If you cannot uninstall or repair it then you should contact Microsoft.
I am able to fix this problem by installing latest version of of .NET Framework. May be helpful for others as well.
I followed the instructions in this link: http://msdn.microsoft.com/en-us/library/bt727f1t.aspx to install the remote debugger (2012) on my server where the application is running in hope to debug it remotely from my dev machine running visual studio 2012.
I cannot even get as far as viewing the list of processes to attach to on the remote machine. I keep getting "Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named [name]. Invalid access to memory location".
I have managed to successfully connect a few times but then the attach fails immediately then I cannot connect again.
This is causing huge issues for me as I cannot remote debug anything. I must be missing something glaring. Please someone give me a solution.
I've found the only way to correct this is by restarting Visual Studio.
Worked for me. I found it at this blog post about invalid access and remote debugging.
It turns out the one thing I missed was to tell Visual Studio where to find the .pdb symbols relating to the remote process. To do this go to Tools -> Options -> Debugging then in the Symbol (.pdb) locations add the remote location to the pdb files.
To clarify, I was attaching fine but could not break into code. Now I can. Be aware though that there are other hurdles before you get to my stage where I was attaching to the process successfully but could not catch a breakpoint.
I recently had someone else report this and debugged the issue on their machine. The "Invalid access to memory location" errors are due to an issue in Windows, it can be addressed with this hotfix.
I have had this problem in VS 2012, 2013, 2015 and 2017. Based on other answers it is likely that the problem is related to running a 32 bit version of Visual Studio on a 64 bit PC. Sometimes, as others have recommended, restarting Visual Studio fixes the problem but the best solution I've found so far is to start Visual Studio without a solution, open Debug -> Attach to Process, change the Connection Target to the remove server and wait for the process list to load. Then Cancel, do not attach yet. Load your desired solution and then come back to Attach to Process and the remote process list will still be loaded. Connect to your desired process and everything should work properly from then on.
I have an .exe that crashes in release mode. I want to debug where the crash occurs.
How can I use VC++ to debug a crash in a release-mode .exe?
You can run Visual Studio and attach it to a process to debug.
Also check through the Windows Event Viewer (an often overlooked source of information) for any exceptions that Windows may have caught.
Firstly if you have access to the code you can open the workspace in visual studion and debug it by pressing F5 button.
Secondly go through the steps that leads to the crash. At that point of time check the location pointed to by the call stack.
This will give you indication on the funciton or line where crash is occuring.
We are assuming this application was written in VC++. How often are you able to reproduce this issue. Is it like everytime you can reproduce it or how is it.