Azure web role with cdn - azure

I have a web role with 2 web application on it.( one is web application the other is wcf application).
The static content in the web application is from azure cdn. I put my static content under cdn directory and on the html i refer to the cdn endpoint.
my problem is
that sometime see that the entire static content not getting from the cdn.and the entire web page is without css/images/javascript files and after 5-10 minutes everything up again.
Has anyone see this kind of behavior? - i always check the status in Microsoft web site and every time i see that the cdn is working properly.
How does the cdn react with 2 web role on the same instance. maybe that's what causing the problem that it switch back and forth?
thanks allot

If your static content is not changing frequently, I would suggest you to setup higher Cache limit may be for an year and this will help you to load content faster. The link below explain more on how to do it:
http://blogs.msdn.com/b/windowsazure/archive/2011/03/18/best-practices-for-the-windows-azure-content-delivery-network.aspx
[More info]
IF you have random issues with your Windows Azure CDN cache, it is suggested to contact Windows Azure Support Team and discuss this problem. They will dig deeper to look for the root cause. The above info is very less to determine the actual root cause.

Related

Web app on azure doesn't show my asp.net core web app after I have published it without any problems

Landing Page of my web app
I have published my asp.net core mvc project in the Azure as web app, however it doesn't show anything. Instead of this it just shows the landing page as there was no code (which is not the case). I have checked few points on stackoverflow, but couldn't find anything, could anyone please help me with that?
There are few reasons causing it, you could refer to the following and troubleshoot it.
Go to your kudu site to check whether all your project file have uploaded to azure.
After publishing webapp to azure, wait for a moment.
Make sure you default page is listed in here and is above hostingstart.html
Deploy Continuous to Azure App Service.
Update:
Delete app and republish it.

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.

How to host html application on Azure

I have a single page html application, that uses a lot of jQuery. The app content (data as xml and media audio/video/image) is (and has to be) provided by blobs on azure account. I don't need any application server.
What is the recommended way to host such single page html application on Windows Azure Environment (Azure is a requirement).
As I do not need any application server, all application files are currently uploaded into single container as Blobs with appropriate content types. It all works very good.
Still, I've seen that Azure has some website hosting capabilities I've been wondering if what I did is appropriate?
Thanks
Windows Azure Web Sites would work well and could be free for the duration. If the constraints of the free offering don't work for you, you can scale out easily.
You could also store your home page in Azure blob storage, but that means users would have to have the full path to it as there's no server configuration to specify a default page. Publicizing your site endpoint via a vanity URL from bit.ly or the like could make that a non-issue though.
Do note though, that by having everything in blob storage, you're incurring a transaction cost for every image, every page, every script access (that's not cached on the browser that is). Depending on the nature of your site and traffic, it could be more cost-effective to leverage something like Windows Azure Web Site for some of this.

Deploying and maintaining multiple copies of the same web application at different URLs on Azure

I'm currently investigating the possibility of my company using Azure.
Our current hosting situation that we run ourselves involves a separate site in IIS for each of our clients, each one having a virtual directory to the CMS we've built with ASP.Net web forms. We can update the contents of that virtual directory, which then provides the latest version of our CMS to all our clients at once.
I'm not looking to recreate that exact situation in Azure, but I am instead interested in figuring out how to create a single Web application in Visual Studio, publish that application to Azure in such a way that multiple sites (that I've specified) are created on Azure. Then I would like to be able to make changes to that application, and publish it again in a such a way that all the sites for it get updated all together, without requiring something be done manually per site/client.
The closest explanation I've found is this one:
http://www.wadewegner.com/2011/02/running-multiple-websites-in-a-windows-azure-web-role/
That gets me close, but what I don't understand is that when I publish this application to Azure, I still only see one application / URL available in the Azure management console. Shouldn't the extra "Site" node result in a different site being available when I publish it? Why doesn't it? Is there a completely separate way to accomplish this that I'm not using?
When you look at the management console you're seeing the web roles that you have deployed, not the sites that are part of that web role which is why you're only seeing one. As long as you've followed the instructions correctly, then yes, you do have two sites running. The catch is that you can only access the main site through that default URL. Presuming you have urls that look like customer1.mysite.com and customer2.mysite.com, you need to make sure you've set these as the host headers in the sub sites and then change your DNS so both of these domains point to URL you can see in the portal (e.g. mysite.cloudapp.net).
When considering a multi-tenant solution, ideally you should design your web-application as a single website that is capable of responding to multiple tenants (each of your customers), as opposed to creating a website/web-application for each one of them. This makes updates across the system manageable.
Your web-application can partition and identity different tenants based on several options such as part of the url (e.g myapp/tenant1 vs myapp/tenant2) or via a host header (e.g. tenant1.myapp.cloudapp.net vs tenant2.myapp.cloudapp.net)
HTH

Slow Orchard Performance on Windows Azure

I have a small Orchard website that I'm hosting on Windows Azure. This website is currently configured to use a FREE web site instance. I've noticed that the first time the site is accessed after a 20-30 minute period, it takes a while (>5 seconds) to load. After that initial load, I can revisit the site, and its fast. I suspect that the app pool is recycling fairly often as its a FREE Azure Web Site instance.
I need this site to load as fast as possible. I'm not opposed to using a different Azure option. I'm just not sure what I should be using.
1) Is there a way in my Orchard site's web.config file to set how often the app pool is recycled? I really need this site to be quick.
2) If I use a "SHARED" Web Site instance, will this get me past the recycling issue?
3) Or, do I need a "RESERVED" Web site instance.
My main goal here is to cost-effectively meet my goal of loading my web site quickly after it hasn't been accessed in a while. I'm just not sure what I can/should do.
Thank you!
I use a combination of the following for performance issues:
I enable Keep Alive module
I enable Warmup module and in Performance settings add my most visited pages
I manually set machine key inside web.config so that sessions last regardless of recycling - this could be an issue if there's not enough memory allocated for the web site inside the IIS
These steps are not related specifically to Azure, but rather to any kind of hosting. Especially when using Azure shared web site instances since they're nothing more than a shared hosting (unlike Azure cloud services)..
Azure web role can easily be made to be fast and avoid the appPool recycle issues, so consider that your plan B after trying all options with Azure websites.
I haven't tried with Azure websites, so it may or may not be possible there. Info is vague as to whether or not you can configure the idle timeout setting for a reserved instance. One thing you can try is to use the warm-up feature (dashboard -> performance). This should periodically load some pages, which would prevent idle timeout of the appPool. You might also try external services like pingdom.com or something similar that would periodically ping your site to prevent it from recycling.
If you end up switching to web roles, you will definitely be able to do this. The latest Orchard builds (v1.6+) set the appPool idle timeout to 0 (never timeout) by default. You will in general get a lot more control over performance and other configuration if you use web role rather than azure websites. The main drawback with this choice is you lose some of the deployment options, and deployments take a lot longer (they are still easy, they just take a while).

Resources