Attach debugger not working for Azure Websites in visual studio 2015 - visual-studio

Attach debugger not working for Azure Websites in visual studio 2015
I am getting Below error
Please help
Microsoft Visual Studio
Unable to configure remote debugger.
Could not load properties
Could not load app settings
Could not load connection strings
OK

I cringed for this problem for about 3 hours. The solution was to manually attach the debugger through Visual Studio's "Attach to Process".
Here are the steps.
1) Let's enter to Azure's portal # https://portal.azure.com, and head to your App Services directory (as shown in the image).
2) Click on the App you would like to debug.
3) Click Settings or All Settings (both will launch the "All Settings" blade)
4) Go to Application Settings and scroll down. In there you will see "Remote Debugging". It is very important to check that this is turned on, as the image show. Select your appropriate Visual Studio version. Note, that if you're visiting from the classic portal you will not be able to select Visual Studio 2015.
5) Press Save.
If you have never set up an FTP account for your App Service, continue reading, otherwise jump to step 8.
6) In the already opened "All Settings" blade, scroll down and look for "Deployment credentials". In here you will create an FTP username and password. Put whatever you want. Of course, I recommend you to use a different username than your account and a strong password for it.
7) Click Save.
8) In case you've forgotten about your FTP username, in the main page of your web app (where you clicked "All Settings"), you will have your deployment username. In this example, you will use the one that goes after the slash. If it is mywebsite\userftp you will use userftp.
9) Let's head to Visual Studio. Open the project you want to debug, and select the "DEBUG" tab.
10) Click on "Attach Process". Of course, you can just hit Alt + P and that will also open the window for you!
11) Now you will focus in the Qualifier. Put in there your azurewebsites.net domain. You could try with your .com domain, but in my case it didn't work. I am using Cloudflare to enable https on my shared Azure website and it seems that it is filtering the connection with the debugger.
12) Press Enter on your Keyboard or hit "Refresh" button.
13) The following prompt will appear:
14) As the picture says: The username will be: theSameWebsiteYouPutInTheQualifier.azurewebsites.net**.**exampleftp
Please note the following:
a) You must put the same website URL you put in the qualifier.
b) You must put the dot and the backward slash after the .net or .com
c) You must put your FTP username. Remember after reading point 8, that if you lose this one, you must check on Azure website and use the name after the backward slash.
Press OK. If you receive some errors, check that Remote Debugging is turned on. It has happened to me that it has turned off without noticing.
15) Select w3wp.exe and press "Attach"
16) This shall put you with the goody orange "Ready" bar :D

Assuming your project settings are correct, this will often resolve the issue:
Go to the Azure portal and Stop / Restart your web app
If that doesn't work:
Close Visual Studio.
Go to the Azure portal and Stop / Restart your web app
Restart visual studio

Much more surefire route at http://blog.falafel.com/remote-debugging-azure-websites-day-31-visual-studio-2015/ .
Open up server explorer.
Navigate in through the azure node to your web app.
right-mouse and attach debugger.
Configures all the goodies

Seems to be a false positive error dialog. If you just press Ok, the debugger attaches to the Azure web app despite showing this dialog.

Related

VS2017 Blank Sign In Screen

I have a unique issue with my installation of Visual Studio 2017 where the sign in dialog is blank, and no matter how long I wait it never seems to allow me to log in.
I have tried changing the default browser to Chrome, Edge and IE just in case it was using that under the hood for rendering this page. Prior to that I had an issue with the Virtual Machine running the IDE which required me to re-register *.VBS associations to complete the install, that has been resolved and the install has passed.
I am now just left with the sign in issue as shown below:
Has anyone had this before / know of a work around here? I have been looking around on Google for similar issues but to no avail.
Any help here would be appreciated.
Thanks!
I just encountered this issue myself on Visual Studio 2017 (30-day evaluation expired too so Eduardo Zavala's suggestion isn't possible). The cause is that I have Internet Explorer 11 installed and set to be extremely restrictive security wise. For example, it will not follow a redirect if a webpage tells it to. It also has JavaScript disabled. Apparently, Visual Studio uses Internet Explorer 11 (or at least "Internet Options" rules) for this login page instead of the default browser (e.g. Microsoft Edge) and its settings.
Start Internet Explorer 11.
Click on the gear icon in the upper right corner.
Click "Internet Options."
Click on the "Security" tab.
Click "Default level" button.
Click "Apply."
Click "OK."
Run Visual Studio 2017 again and sign in.
Set Internet Explorer 11 settings back to how you prefer them.
All should be well in both programs now (VS17 authorized and IE11 restrictive).
I think I found something...
If you go to Help tab and click on Send Feedback >> Report a Problem, a Developer Community forum page will pop-up.
In this page, you will see a sign-in link very much like the one in Visual Studio.
That particular link works, so if you log in to it, then exit the Developer Community Forum, you will have successfully logged into Visual Studio.
Hope this helps.
I was able to work around it by doing the following:
At the account login screen select "Account Options"
Under Environment > Accounts on the Sign-In Options section, change the "Add and Reauthenticate accounts using:" pull down menu to "System Web Browser"
Options dialog box
This will open the dialog box IE or whatever default web browser you use and should allow you to login.
I had the same issues. The problem was with Internet Explorer. My computer has Internet Explorer 8.
Please follow the steps below to fix the issue.
Install Internet Explorer 11 - you can download it from the Microsoft site.
Restart the computer
Relaunch Visual Studio
Now sign in.
No blank screen will be displayed.
I had the same issue with VS2019, this ended up being blocked by a web filter and could see logincdn.msauth.net being blocked while signing into VS2019.
I would suggest adding an exception for *.msauth.net to allow the sign-in page to load.
This doesn't appear in the list from Microsoft firewall and proxy URLs - https://learn.microsoft.com/en-us/visualstudio/install/install-and-use-visual-studio-behind-a-firewall-or-proxy-server?view=vs-2019
On the signin screen click Account Options
Then change Embedded web browser to System web browser
The login screen now opened up a full browser instead of the blank screen.
Just change your default Internet browser to Internet Explorer.

Visual Studio 2013 Flexera customer community tab

First of all, they took away the default setup project and give us a 3rd party tool to package ( maybe its a topic for a separate forum), but visual studio keeps opening a new tab with the flexera customer support page(with an irritating javascript error) whenever i have a 'error' in my code .
how can i disable this feature ?
As a workaround, you can go to Solution Properties -> Configuration Properties -> and uncheck the Build action for the setup Project (then close and reopen visual studio).
Later you reactivate it only when setup creation is required.
Another workaround.
Right-click on setup project and choose Unload Project.
When you want to build setup again, use Reload Project.
Not a solution, but another workaround. Edit your hosts file and point that website to localhost. Gets rid of the popups, but not the extra tab in Visual Studio.
1) Run this:
notepad C:\Windows\System32\drivers\etc\hosts
2) Add this text and save the file:
# To get rid of the annoying javascript error popups in Visual Studio
# Example problem URL: http://flexerasoftware.force.com/SupportKBList?searchString=-1014
127.0.0.1 flexerasoftware.force.com
3) Run this:
ipconfig /flushdns
4) Close re-open Visual Studio.
My favorite workaround (10 seconds but must be re-done after each VS2013 restart):
1) Right click the tab and click [Float]
2) Minimize the window and put it in an unused corner of VS 2013

How to prevent stopping IIS in VS 2013?

I'm using VS 2013 preview for web development.
When I click F5, the website is running. But when I press stop button in VS, it shuts down IIS server (in VS 2012 everything's fine). It's a huge inconvenience, cos every time you place minor changes to markup or whatever you have to press F5 instead of just click "Ctrl+S" and refresh the browser.
This seems to be due to the Enable edit and continue option being checked by default in the Project Properties > Web > Debuggers section. Disabling it has solved the problem for me.
I have exactly the setup you are talking about. In order to do this, you can set up your project as follows:
In your Project Properties, Select the Web tab
Change the Start Action to "Don't open a page"
Now you can start your application using CTRL + F5 (start without debugging) to launch your application and use it without the debugger running. If you want the debugger, you can still hit F5 to start it up, but stopping debugging doesn't shut down the instance. It's great for making HTML changes in particular.
That said, I don't have "Enable Edit and Continue" checked either, as per Xaviers answer.

How to make IIS Express the default web server in Visual Studio?

Is there a way to set IIS Express as the default launch option in Visual Studio 2010 SP1? Currently, it uses Visual Studio Development Server by default and one has to execute "Use IIS Express..." command manually.
Right click on the Default Startup project file in your Solution explorer.
Select "Properties".
Click on the Web Tab on the left hand side
scroll down and select the "Use Local IIS Web server radio button
Tick the checkbox "Use IIS Express"
Another useful tid bit in the section is that you can tell IIS not to launch browsers when you debug and just wait for a browser process to hit it. This is really nice for cross-browser testing.
Just above the previous said section, look for a radio button titled "Don't open a page. Wait for a request from an external app" under Start Action section of the same page
EDIT:
To set all projects made to behave this way do the following:
Tools -> Options
Projects and Solutions
Web Projects
Tick "Use IIS Express for new file-based web sites and projects

Attach to process in VS2010 express using a web site. Is it possible?

I have read this article but it applies to web projects with a .csproj... What about a 'web site'?
http://www.ninjatrader.com/support/forum/showthread.php?t=15671
People at work here tell me to just response.write my way to debug the web sites but I really miss the attach to process that is in the professional edition of vs2010.. or maybe I have to get used to response.write debugging?
(Reason I am not debugging is ektron 8.0 does not compile is vs2010.. so I must attach to process.. or use vs2008)
Visual Studio 2010 Express Edition supports Attach to process but it is available only in Expert Settings.
Go to Tools->Settings->Expert Settings.
After this change, you should see Attach to Process button in Debug menu.
It isn't available for VS2100 Express. Check the link. http://msdn.microsoft.com/en-us/library/vstudio/c6wf8e4z(v=vs.100).aspx
An option for websites hosted on another application (Like IIS) is to use the property pages.
Right Click on Project/Website in Solution Explorer->Property Pages->Start Options
Launch VS2010 Express (or VS2012 Express) as Administrator
Set "Start Action" radio-button to "Don't open a page. Wait for a request from an external application."
Set "Server" radio-button to "Use Custom Server"
Set the "Base URL" textbox to your site url.
Verify the Debuggers: ASP.NET option is checked.
Hit F5 to launch the debugger, then request the page in the browser.
Then, linking to the website is as easy as pressing the play-debug button and navigating to your url.
NB: This was tested in VS Express for Web 2012 (ver. 11.0.50727.1) on a Web Site project.
Just like said in the post above, you can use "Attach to process" in visual studio express. But it's not necessary to change your settings to "expert settings". All you have to do is add the command to the debug menu.
Tools-> Customize -> Commands -> Menu bar: Debug -> Add Command... -> Debug -> Attach to Process
Try this:
right click on toolbar/menu Customize/tab Commands/button Add Command/left list Debug/right list Attach to Process.../button OK/button Close.
for me works crtl-alt-p shortcut too.
.. voila!

Resources