Recovering a long lost ASP.NET Web Forms Application
I was asked to recover some data in a SQL Azure database for which the client didn't have any credentials. I was at a bit of a loss as there was also no documentation and no code repository. They have an ASP.NET Web Forms Application running in an App Service in Azure that talks to this SQL Azure database.
I always forget about the Kudu Console but I figured that was one way of getting at the files for the application which would include a web.config with a connection string (possibly).
If you're running a plain App Service you add in an scm (Scource Control Management?) into the URL after your app name:
1https://<app-name>.scm.azurewebsites.net
(The URL for app service environments is different - the link above has the details).
For this particular problem I was able to go into Debug Console -> Powershell in Kudu and see the code, including web.config which did have a valid connection string. I connected to the database and extracted the data.
And then I realised I could've connected directly to the database with Azure Data Studio by logging in to Azure Portal with my credentials. That would've been the sensible thing to do.