Unable to attach debugger from VS 2017 to Azure App Service for Web App Bot - azure

I have deployed my Bot Framework v4 app as a Web App Bot to Azure. I can connect to it in Web Chat in the Azure Portal, but it is crashing when I message it via Twilio.
I am attempting to debug this, but when I try to attach via Visual Studio's Cloud Explorer I get the error in the screenshot. I have also tried attaching directly by using the username and password in my publish profile, but that always results in the breakpoints saying the symbols haven't been loaded once it is connected. When I look at the debug modules, I don't see any pertaining to my bot's dll. This is with the publish profile set to the Debug configuration, so no issue with optimized code.
Any suggestions are greatly appreciated!

I have seen this error during one of my attempts. I ended up removing the current version of code from the web app by using the Kudu Console, restarting the app service and then publish again from VS using the publish profile.

Was able to make some progress on debugging by attaching to SITENAME.scm.azurewebsites.net instead of SITENAME.azurewebsites.net.
Doesn't explain why Cloud Explorer still can't connect, but at least unblocks me for now

Related

Visual Studio 2022 Debug On Remote Azure Server

I appears that the Cloud Explorer has now been retired in Visual Studio 2022.
This was something that I used many time a day and will sorely be missed.
I used to be able in the Cloud Explorer select the app service, right click, and attach the debugger to the app. In Visual Studio 2022 I can find no way of attaching the debugger the the remote Azure app service. Also browsing the web I can't find any documentation on how to do this. Can someone supply directions on how to do this, or point me to the documentation on how to debug an Azure app on the remote server.
Currently there's an option to debug Azure App Service.
Instead of using the cloud explorer you may create a publish profile and attach a debugger from there:
All in VS 2022.
I’ve had the same problem, trying to do remote debug an App Service with VS2022. I just realised that the top dropdown box “Connection Type” on Debug | Attach to Process... dialog gives you an option “Microsoft Azure App Services” (I'm using ver 17.2.4). Clicking the Find button lets you select target App Service. You can then select the target process. (Attaching from the Publish dialog doesn’t let you select the process - you may have a number of apps on virtual directories).
One thing I noticed and confusing; the listening port is not 4026 but 4024 even though you specify VS2022 on the Azure Portal in my case. Telnet or Psping to 4026 – no response. If you do the above way, this doesn’t matter but if you select Connection Type: “Default” and specify host:port, then the port should be 4024. You can remotely debug Azure Function in this way.
Today with Visual Studio 2022 you can use the Connected Services node under a given project:
Once you connect to an app service, you'll have access to attach the debugger:
Microsoft Learn Module
Remotely debug ASP.NET Core apps hosted on Azure App Service using Visual Studio
More info here:
Manage the resources associated with your Azure accounts in Visual Studio Cloud Explorer
Overview: Connected Service

"403 - This web app is stopped" when deploying to Azure from VSCode

I have a web app, ironradio.org, that I've deployed on Azure from VSCode. I've made some updates to the site and am now trying to deploy the newest version. Now when I try to deploy using this button:
I get the error 403 - This web app is stopped in the output window:
I've already deployed several versions of the site using the same method and it's never failed before. Also, the app is definitely not stopped because I can still browse to the site and it shows up.
My best guess as to what's going on is that I associated the App Service with a new resource group since the last deployment, so maybe VSCode isn't recognizing that? Does anyone have any idea what's going on here?
I tried the link given in the error message, but it wasn't much help.
Microsoft foreseen this type of error and how it can affected its customers greatly and this is why the deployment slot is for you.
Firstly, you have to delete the app and reupload again except you set up continuous deployment which work mostly with GitHub and other version control platforms.
Apart from this, I will suggest you check out the deployment slot docs. It’s very simple and easy to use
https://learn.microsoft.com/en-us/azure/app-service/deploy-staging-slots

Attach debugger to ASMX service on Azure app service

I have an old service that we have deployed up into Azure using an App Service (type: Web App). I publish this asmx direct from Visual Studio 2015 Professional. It works really well accept I cannot attach the VS 2015 Pro debugger to an instance of my ASMX.
I have set everything up correctly (so I think) in Azure and I am deploying with a Debug configuration:
But when I attach the debugger from VS - no errors are shown, it appears successful up until I set a new breakpoint, I get this (I have confirmed that I am attached to w3wp.exe):
I get a "hollow" breakpoint and the error:
The breakpoint will not currently be hit. No symbols have been loaded
for this document.
I get what this error is, what I don't get is how can I successfully attach the debugger to an ASMX service on azure?
Is attaching a debugger to ASMX on azure not supported?
Figured it out. Despite everything looking like it was attached, it wasn't. I had to go to Debug > Attach to Process > and specify the website.
Using the remote debugging option on both Cloud Explorer and Server Explorer does not work in my scenario.
For a better walk through:
https://msdn.microsoft.com/en-us/library/dd434211(v=vs.100).aspx
The real issue:
Azure does not play nice with < .net 4
After upgrading the package to 4.5.2 I could do the following:
Attach the debugger from VS
Use the ConfigurationManager class to get application settings and connections strings from Azure
Plus a few other basic Azure features.
Bottom-line, update .net before publishing

HTTP 500 error using Azure Easytables with Node.js backend

Having created a mobile app in Azure using EasyTables with a Node.js backend, I get an HTTP 500 error trying to post a new item.
Log in to the Azure console and in the project backend run:
npm i sqlite3
That fixes it.
(Answering my own question because I couldn't find this anywhere on StackOverflow. Props to #benjamintam from Readify for the solution)
If your mobile app application is running on Azure cloud not on locally, the issue is a little odd, as the sqlite 3 supporting is for Azure Mobile Apps development on local. You can refer to https://azure.github.io/azure-mobile-apps-node/module-azure-mobile-apps_src_configuration_DataProviders.html for the detailed description.
If your issue occurs on your Mobile Apps running on Azure, please double check whether you have completed the project's initialization. You can refer to https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-android-get-started/#configure-the-server-project for the steps.
Meanwhile, you can manually add the data connection to Azure SQL in the Azure portal,
And if successfully, you can find the configuration MS_TableConnectionString in Application settings in your Mobile Apps.
Any further concern, please feel free to let me know.

How to resolve error 500 on Azure web app?

What I have:
VS2015U2
ASP.NET 5 MVC 6 website
Deployed to Azure Web App
The site works locally
When I deploy to Azure I get internal server error (500)
I'm unable to Attach a debugger since they messed up something with the latest versions (tried manually too https://azure.microsoft.com/en-us/blog/introduction-to-remote-debugging-on-azure-web-sites/)
I have app.UseDeveloperExceptionPage(); but I guess the site is failing during configuration so it doesn't display any other information.
So how to resolve this? I need to see the .net exception but I have no idea how to do that.
Try adding Application Insights to the app. You should see errors on startup of your application.
I would also take a look at your startup code to see if you are writing to disk anywhere during configuration or app.start. This might be the case if you are using AAD in any capacity.
You can also hit up the KUDU console by targetting https://sitename.scm.azurewebsites.net . You will be able to navigate in the debugging console to see the RAW logs from IIS. That might shed some light into the situation. See KUDU for more info.
I solved this problem like show below.HTTP 500 error interested about that is not allowed to access the server.Go to azure portal address and choose your database.Press"Set server firewall " and Allow Azure services and resources to access this server choose "Yes" save that page and refresh your service.Than you can see your data
Use the KUDU console at https://sitename.scm.azurewebsites.net
Go to web.config file and check if the process path is correct.
I used the Azure Log Stream to help figure out what was going on. As Karishma Tiwari - MSFT said, the issue ended up being my web.config file (which was built for .NET 3.5 and not 4.7)
Here's the tutorial to set up Log Streaming: https://blogs.msdn.microsoft.com/azureossds/2016/09/28/how-to-identifyreview-errors-on-php-applications-in-azure-web-apps-using-log-stream-service/
My particular app's solution was to update my Azure App Service to use .NET 3.5, in its Application Settings, like so:
For me it worked after I turned "Allow Azure services and resources to access this server
" to Yes
I got this error even though I had enabled Application Logging (Filesystem), Detailed error messages and Failed request tracing in App Service logs
This page isn’t working
mysite.azurewebsites.net is currently unable
to handle this request.
HTTP ERROR 500
However by navigating to Log stream and selecting Application Logs I could see a detailed error message:
I know this question has already been answered but here is a recent view of the Azure Portal where I found a solution to this problem

Resources