Debugging deployed azure app - asp.net-mvc

Is it possible to attach to a deployed Azure app? I would like to be able to step through the code so that I can see what values are being set in a request to one of my web role actions.
I have looked around and the only examples seem to be of debugging when the azure app is running on the local machine.

Windows Azure Tools (June 2010) allows to use IntelliTrace in the cloud. This release:
Adds support for debugging services in the cloud by using the Visual Studio 2010 IntelliTrace feature. This is enabled by using the deployment feature, and logs are retrieved through Server Explorer.
IntelliTrace support requires:
.NET 4
Visual Studio 2010 Ultimate
the cloud service has to be deployed with IntelliTrace enabled

No, you can't debug an Azure app running on MS's servers.
You might be able to solve your problem with Azure's logging feature, though.
Edited to add MS just announced IntelliTrace for the cloud fabric in the June 2010 tools.

Adding one more thing to Rinat's answer: I did attend a session on Intellitrace and one of things I was told that it should never be used on your applications running in production slot as it creates quite an overhead. So you may want to deploy your application in staging slot do all the cloud debugging and then remove Intellitrace once you find the cause of your problems.

Craig is right "today" you cannot debug an Azure App running on cloud fbaric, you can only debug on local fabric.
you may want to look at the diagonostic and logging API
Link
http://blog.benday.com/archive/2008/11/07/23201.aspx
this is a great tool - http://www.cerebrata.com/Products/AzureDiagnosticsManager/Default.aspx

http://msdn.microsoft.com/en-us/magazine/ee336122.aspx
This will help u..

There is a way to deploy the Visual Studio 2012 remote debugging tools to a Windows Azure Cloud Service and attach to the remote process. The following BLOG post explains an approach.
http://www.fullscale180.com/Blog/post/2012/10/07/Remote-Debugging-Windows-Azure-Cloud-Services-with-Visual-Studio-2012.aspx
This sample code
demonstrates remotely debugging Windows Azure Cloud Services with Visual Studio 2012. The sample utilizes Visual Studio 2012 remote debugging tools and provides an approach to deploy these tools with a cloud service, allowing us to attach to the deployed instance from the Visual Studio 2012 IDE using the remote debugging features.

Related

Build a project targeting MSVC on linux Jenkins

I have a private server that I've been slowly setting up for personal projects, but I've run into a bit of a roadblock. My server is running Arch linux [I like bleeding edge and minimalistic installs in situations like this] and I have Jenkins running on it so that I can have it automatically build projects. I have a project that I've been working on that is currently targeting the Win32/64 platform using MSVC, but I can't seem to find any info anywhere about setting up a job on Jenkins for this situation. I was hoping that I could maybe setup a Docker instance that would be able to provide the MSVC toolchain, especially since Visual Studio Code is available for Linux, and that I could use that as part of my Jenkins setup to generate Win binaries for me to test on my main machine. I mention this because naturally, Visual Studio is not a command line utility, and currently my server is a pure headless setup that only provides cli interaction, so if possible, I would like to avoid directly adding GUI packages to the server, but if it is the only way, I'd be willing to do so. Is there really no way to achieve what I'm going for with this?
Sorry if this lacks important details or is formatted poorly, this is my first time asking a question here as it's very rare for me to not be able to find the info I'm looking for in an already existing question.
After research, this is not currently possible as it stems from a misunderstanding of exactly what docker provides. Docker simply uses the underlying OS to provide everything and does not provide any virtualization of foreign OSs. Without a version of the MSVC toolchain that can run on linux, or possibly the use of WINE, there is not a way to achieve this short of a VM. Since WINE is not perfect, the most reliable solution as it appears to me is the VM, but YMMV. The other advantage to using a VM is that I can keep the server headless.
I can't answer this question completely, but this topic is interesting to me too.
Note: Visual Studio Code is open-source, but that's an Electron-based editor. Visual Studio IDE and MSVC are proprietary Windows-only apps.
The website https://blog.sixeyed.com/how-to-dockerize-windows-applications/ suggests it's possible to dockerize Windows apps, including Visual Studio.
Docker images for Windows apps need to be based on microsoft/nanoserver or microsoft/windowsservercore, or on another image based on one of those.
Once you get that working, I'd use Visual Studio command-line builds, like devenv /build file.sln [optionally /project file.vcxproj ]. (https://learn.microsoft.com/en-us/visualstudio/ide/reference/devenv-command-line-switches?view=vs-2017 ).
Note that the VS2017 installer does not function on Wine. I recently filed a bug for this (https://bugs.winehq.org/show_bug.cgi?id=45749 followed by https://bugs.winehq.org/show_bug.cgi?id=45757 ).
I personally use Appveyor for auto-building MSVC apps. Appveyor is a Windows-based centralized cloud service, not a self-hosted CI system.

Visual Studio sometimes detects configuration issue on jenkins CI server

I have Jenkins CI server which builds various .net projects. The server is on Virtual Machine, connected to ActiveDirectory and Jenkins is running in the context of domain user which is also a local administrator.
Software used:
Windows 10 Professional
Visual Studio 2015 14.0.25431.01 Update 3
Jenkins 1.625.3
Solutions are build using devenv.com (currently msbuild is not an option), e.g.:
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com" "xxxxx.sln" /rebuild "Release|Any CPU"
My issue is, that quite often I receive an error, just after running devenv.com:
Microsoft Visual Studio has detected a configuration issue. To correct this, please restart as Administrator. For more information please visit: http://go.microsoft.com/fwlink/?LinkId=659046Build
It started to happen after one of Windows 10 updates. I found out, that when someone is log in to build server with the remote desktop using the same domain account, the builds run OK. After logout, the builds run OK for some time and then the errors are back.
Any clue what's going on?
It may be related to this apparent bug in a recent Windows update:
Connect: Visual Studio 2015 and SSMS 2016 RTM (VS 2015 shell) not running under "Run as different user" on Windows 10 Anniversary, Windows 2016 CTP 5
UPDATE 2017-09-08
As #Florian points out, the above link is broken. I can't even find the Connect issue cached on Google, Bing or archive.org.
The Connect issue Unable to start SSMS as another user (cached copy on archive.org) makes me think it would be worth checking whether the problem resolves after updating Windows 10 to 1703 (Creators Update) and ensuring that April 25, 2017—KB4016240 (OS Build 15063.250) has been applied. If this works, anyone running Jenkins on Windows Server 2016 will have to wait for Microsoft to publish 1703 and KB4016240 (or equivalent) for that OS.
Excerpts from Connect page "Unable to start SSMS as another user". I have bolded the error details, which match those in the original question (except for the LinkId in the supplied URL) even though the product is SSMS rather than VS:
Version: SQL Server 2016 CTP3
Operating System: Windows 10
Steps to Reproduce:
Right-click SQL Server Management Studio, select "More", then "Run as
a different user"
Actual Results:
Error message: "This task requires the application to have elevated
permissions" with two options: Restart under different credentials,
and Cancel the task and return to Microsoft SQL Server Management
Studio. Pressing either option closes the window with no further
result. Error information is:
Microsoft SQL Server Management Studio has detected a configuration issue. To correct this, please restart as Administrator. For more information please visit: http://go.microsoft.com/fwlink/?LinkId=647011.
When I go to that page and try the fix suggested there, I can't find
ieproxy.dll. The fix is for Windows 7 / Internet Explorer 8, and I'm
on Windows 10 with Internet Explorer 11, so that may be why it's not
there.
[...]
Posted by Microsoft on 4/28/2017 at 6:26 PM
Hi Jake, It turned out that this issue has been resolved (on the Windows side) very recently - like 3 days ago :)
If you are running Win10 "1703", just make sure you get the latest
updates (specifically, KB4016240) and you should be able to run
ssms.exe using "runas" just fine. This will work with any version of
SSMS.
Currently, the fix is not available on older versions of Win10 (e.g.
1607) or WS2016 (also 1607).
Thanks,
-Matteo
[...]
Posted by Microsoft on 4/27/2017 at 7:35 PM
Hi Jake, Yes, we are aware of this issue (in Windows 10).
We've engaged with the Visual Studio and Windows folks (which is there
the issue is) and hopefully will have a way to fix this issue in SSMS
(you should not need an updated SSMS, just an update in Windows 10).
I'm going to keep this issue open until I have more concrete updates
on it.
Thanks,
-Matteo
If the Windows updates do not solve the problem or are not available to you, I would suggest trying repair operations on Windows as well as Visual Studio.
I'm running into the same error after updating my Windows 10 to 1607, in that I cannot run Visual Studio as a different user. I'm not building solutions at the time though, but still running the VS program as I think you would be calling.
Using this command: runas /netonly /user:domain \ account devenv.exe
as outlined here Unable to launch Visual Studio 2015 as a different user works for me. Not as convenient but does the trick.

TFS 2012 Uninstall does not remove the port 8080 bindings

Quick background. My client uses Visual Studio 2010 for their website. It was ported onto a new machine, and I had to do some extensive work to get all of the 3rd party controls and add-ons to work. They then requested source control, so using their MSDN license I pulled down and installed TFS 2012 on their machine. Everything installed correctly, and seemed to work until I went to add the existing VS2010 project to TFS2012, and I got an error that when traced back, basically told me that I would not be able to use TFS 2012 and VS2010 together. I weighed the choices, updating the project to VS2012, or uninstalling TFS 2012 and installing TFS2010, and decided the TFS route was the way to go, as I did not want to screw around with all the add-ons again. TFS2012 uninstalled fine, and TFS2010 installed fine.
When I went to start configuring TFS2010, I got an error ([ Application Tier ] TF255297: The Web site found has bindings that conflict with the bindings chosen for the Web site for Team Foundation Server. You must manually resolve the conflict between the bindings.) basically telling me the binding were not removed for the TFS2012 install. I looked in IIS and there is nothing in there using port 8080.
So my question is, how do I find out where the bindings are in use. I tried the netstat commands, and did not find anything using port 8080. I am kind of dead in the water here, so any help that is offered would be greatly appreciated.

How do I evaluate Team Foundation Server locally?

I've been tasked with evaluating TFS 2010 for possible use in my group, but don't have access to a server at this point. Is there a way to run it locally (Win XP) just to put it through it's paces?
It's better if you download the VM for TFS 2012 by Brain Keller, you will be able to see most of the TFS features with hands-on labs.
Visual Studio 2012 Application Lifecycle Management Virtual Machine and Hands-on-Labs / Demo Scripts
TFS2010 requires windows 2003, 2008, vista or 7, You can't install it directly on windows xp. You could install it into a virtual machine running one of these operating systems, that would require a fair amount of ram.
However I get the feeling that you probably don't really have the hardware requirements to run TFS, and you probably don't really want to maintain a TFS server. You should probably look at using TFService instead (tfs.visualstudio.com) which is an online version of TFS2012, free for up to 5 users (however while it's in preview it's free for larger groups too). You can install a patch so that VS2010 can access this service.

Slowcheeta not working for web applications in Teambuild

I read this article on getting slowcheeta working on the build server. It works fine with Console apps but I can not get it to work for Web Applications.
I verified that the build service can access the slowcheeta (works fine for consoles apps).
I am able to transform on my local machine for web applications correctly as well.
The primary .config file is set to content do not copy, the transforms are set to none, do not copy.
The server is TFS 2012 with visual studio 2010 and 2012 installed to support build tasks.
github

Resources