Azure Umbraco Web Site down after azure restore - azure

Error running Reader:
SQL Statement:
SELECT id, domainName FROM umbracoDomains ORDER BY id
I performed an Azure restore of my umbraco website which is using the umbraco.sdf file in the App_Data folder. After the restore I have this error. It errors when I try to log into the Umbraco backend. The Umrbaco.sdf file is only 64KB is that normal? It seems like Azure deleted some of the tables from the .sdf file on restore? In the meantime my site is down and there's no hope in retrieving all my data in my db. Help please!

As far as I know, restoring the web app would replace your current web app data and settings with content stored in the backup. According to your description, please try to check your db file in the specific backup as you mentioned in the above snapshot via this tool Microsoft Azure Storage Explorer.
If the size of Umrbaco.sdf file seems as normal, you could try to upload the Umrbaco.sdf file to you web app manually via KUDU or FTP for a temporary processing to make your web app available.
Note: When you replace the Umrbaco.sdf file, you need to add a app_offline.htm file to the root of your webserver for releasing the Umrbaco.sdf file. After you replace the db file, you could remove the app_offline.htm file to make your web app online.

Related

How delete all the files that are in Folder in Azure app service using Kudu console

I have a Temp Folder in Azure app service, I need to delete files that are inside it, I use Kudu console to login, the Folder in c:\Home\Mysite\wwwroot\Temp
How and with what command I can delete all the files that are in this folder?
We can use below command to delete all files from respective folder through KUDU console using cmd.
Remove-Item –path c:\Home\Mysite\wwwroot\Temp\* –recurse
I understand it’s a delayed response. Apologies for the late answer.
On Azure App Service WebApp (PAAS solution), unlike Persisted files, these files (temp) are not shared among site instances. Also, you cannot rely on them staying there. When you scale out, each instance has its own temp folder. When you restart your WebApp, you'll find that all of these folders get reset to their original state. Those files only get cleaned when your site is restarted.
Another important note is that the Main site and the scm site do not share temp files. So, if you write some files there from your site, you will not see them from Kudu Console (and vice versa). You can make them use the same temp space if you disable separation (via WEBSITE_DISABLE_SCM_SEPARATION). Just highlight this for additional info, but note that this is a legacy flag, and its use is not recommended/supported.
You may check your WebApp limit and usage in portal by going to "Diagnose and solve problems" section of your App Service blade, selecting "Best Practices", "Best Practices for Availability, Performance", and then "Temp File Usage On Workers". Please note that the displayed usage and limits are per worker, and are aggregated across all apps in the same app service plan.
Ref: Kindly check these GitHub wiki and Operating system functionality on Azure App Service for more info.

Azure Web App FTP permission is denied and cannot upload files and cannot create folders

I'm managing small web app, deploying with (always) FTP. My teammate requested me to upload a folder including small teaser website. As usual routine, I opened the Azure Web App Deployment Center FTP dashboard and copied server address and credentials and pasted them into FileZilla(latest version). Login went well and I could see file list and folders. However, when I tried to upload files, remove existing files, all of the writing attempts failed with 550 Access is denied error. What could be the cause of this?
On the other hands, I could remove existing files on KUDU debug console.
I check the ftp link the deployment center provide, looks like the portal provides a read-only ftp link. So go to your web app, click Get publish profile, choose the publishUrl under tag profileName=<yourwebname-FTP>.

Azure DebugConsole - Can't upload more than 299 files

I am using Microsoft Azure for an WordPress website.
Recently, I created a folder in the root directory of my WordPress and I have to upload 4000 photos there.
Using the DebugConsole / Kudu I was able to create the folder and transfer the files but I noticed that only 299 files were transferred as shown here:
I tried to add the files again there but it won't work.
How can I upload the rest?
Looks like you hit the disk space limit. You can check the usage of disk space via Kudu (https://<your app name>.scm.azurewebsites.net/Env.cshtml).
Currently, there is a limitation of 299 files and directories we can view in Kudu. See Some folders are not visible in KUDU #2595. So, I'd recommend using the FTP client tool to connect to Azure and check exactly how many files were uploaded.
About how to connect to Azure App Service using FTP, please refer to:
https://learn.microsoft.com/en-us/azure/app-service/app-service-deploy-ftp
Another option is to use App Service Editor, which has fancier UI:
https://<your app name>.scm.azurewebsites.net/dev

Azure web app Back limit exceeded

I have an Azure Web App configured for Backups. It runs once a day and backup both website and database". I have checked the database size is just 170MB but now during taking backup I am facing error "The website + database size exceeds the 10 GB limit for backups. Your content size is 10 GB".
It necessarily need not be your Database that can cause the size to exceed. The Logfiles folder can also contributes to the size. If you are sure that the Database is not at fault, then look at the other areas that can cause the size to bloat. You can determine folder content size using the Azure Web Apps Disk Usage Site Extension.
This is how it looks like:
Installing the Site Extension:
Browse the Kudu site for your web app: https://sitename.scm.azurewebsites.net
Click on Site extensions and then click on Gallery.
Search for Azure Web Apps Disk Usage site extension.
Click on + icon to install the site extension.
Once installed, click on the Restart Site button.
Now, this should show up under Installed. Once installed, the + incon should change to play (>) as shown below
This should take you to the following url: https://sitename.scm.azurewebsites.net/DiskUsage/ (replace sitename with the name of the web app)
Excluding specific folders from the backup:
There is way to exclude specific folders from your backup.
Create a file called _backup.filter. Place it here: D:\home\site\wwwroot\_backup.filter.
specify the files and folders that you want to exclude in this file
for example I would add the following to my _backup.filter file:
\site\wwwroot\Logs
\LogFiles
\Data
For more information on how back up works, refer this blogpost: http://zainrizvi.io/2015/06/05/creating-partial-backups-of-your-site-with-azure-web-apps/
If none of this helps, create an Azure Support Ticket: How to create an Azure support request
It is very odd, please firstly check the Web Apps Disk Usage from quota in the web protal and have a try to use following two ways.
1.Scale up your web app then Scale down back. To refresh the web app.
2.I suggest you could create another server plan, then move this web app to that service plan.
If this two ways still don't solve this error.I suggest you could connect to the azure support.

File and folder permissions on Windows Azure

I have deployed a simple Web Site on Windows Azure as a Web App.
Using ASP.NET, whenever a user clicks on a button, a file is created as /hidden/test.txt. I want the directory, and the file, to be hidden and protected from any user accessing the website.
Currently, if you type www.sitename.com/hidden/test.txt on your browser you can access and view the content of the file.
How can I avoid this?
In Asp net App_Data folder is very secured so you can store your file in App_Data folder which could be use by the application but no any user can access from out side on url.("App_Data" is listed there as a restricted folder)
But on Azure Best practice is to store any file on Azure Storage Blob.
Related Link
https://azure.microsoft.com/en-in/documentation/articles/storage-dotnet-how-to-use-blobs/

Resources