As you may have seen in my previous blog posts, I tend to use several of Microsoft's various editors when I am working on web projects: Visual Studio, WebMatrix, and even FrontPage on occasion. But every once in a while I also use FrontPage's successor: Expression Web 4.Expression Web 4 and PHP
One of the great features about Expression Web was that it contained support for local PHP development before WebMatrix and IIS Express had entered the picture, and it was pretty easy to configure; all that you needed to do was to enter the path to your PHP executable in the Expression Web's Application Options, which you will find under Expression Web's Tools menu:
All that being said, I was working on a PHP project in Expression Web 4 recently, and when I clicked the button to preview my page in a browser, the following error message appeared:"The php.ini file is not configured correctly. Would you like Expression Web to configure this file?"
I had not seen this error before, and it was a little unnerving to me because I had spent a lot of time customizing my PHP.ini file and I didn't want Expression Web (or any other application) making a bunch of unknown changes to my PHP.ini file.
That being said, I was curious what would happen if I answered Yes to that question. With that in mind, I tested several scenarios, and I thought the results of my experiments would make a great blog.Expression Web 4 and PHP.INI Scenario Testing
First of all, clicking the No button for the PHP configuration dialog box listed above will not break anything, and Expression Web 4 will still open your web page for testing with PHP in the Expression Development Server (which is basically the ASP.NET "Cassini" development server).
If you click the More Information link in the PHP configuration dialog box, that will take you to the following page in the Expression Web help file:
Previewing a PHP page
When I clicked the Yes button in the PHP configuration dialog box, Expression Web 4 made a few changes to my INI file that it deemed necessary for local development, and I tested three different scenarios which I will document here:Scenario #1:
Starting with a PHP.ini file that was created when I installed PHP 5.4 through the Web Platform Installer (WebPI), I only noticed one directive in the PHP.ini file that was changed by Expression Web 4:display_errors=On
(Note: This directive was originally set to "Off".)
And I only noticed one directive in the PHP.ini file that was added:cgi.force_redirect=0 Scenario #2:
I ran a script that crawled through my full PHP.ini file which reset every "On" value to "Off" (and vice-versa), and then it reset every "0" value to "1" (and vice-versa). After those changes were completed, Expression Web 4 added only modified the following two directives in the file:display_errors=On
-and-cgi.force_redirect=0 Scenario #3:
If I removed everything from my PHP.ini file and I restarted my testing with a completely blank PHP.ini file, Expression Web 4 only added the following lines to the file:[php] cgi.force_redirect=0 More Information
So in the end, Expression Web 4 made very few changes to my PHP.INI file despite the ominous-sounding dialog that I listed earlier; just the same, it's always a good idea to back up your PHP.INI file before you let any application make changes to it. (This way you can compare the resulting files after any changes have been made and restore settings if necessary.)
Additional information about the two directives which Expression Web 4 modified can be found on the PHP website at the following URLs:
By the way - as of the writing of this blog, Expression Web 4 with Service Pack 2 is available as free download from Microsoft at the following URL:
Microsoft Expression Web 4 (Free Version)
Free stuff is always nice. ;-](Cross-posted from http://blogs.msdn.com/robert_mcmurray/)
Microsoft released the Windows 8.1 Preview on June 26, but some of the articles that the IIS team was working on for IIS 8.5 needed a little more work before we published them. That being said, those articles were published on IIS.net earlier today, and here is a quick preview of those articles and the new features in IIS 8.5 which they describe:
For examples of these technologies in action, you can watch one of the following presentations:
Special thanks go to Gary Ericson for putting together and publishing these articles on IIS.net, and a big round of thanks to the IIS team for adding all of these new features!
(One quick note in closing: functionality similar to IIS 8.5's Enhanced Logging was available in the past by installing separate modules, but IIS 8.5 now makes this functionality available out-of-the-box.)(Cross-posted from http://blogs.msdn.com/robert_mcmurray/)
Did you miss TechEd North America or TechEd Europe this year? Never fear, because although you did miss out on the live interaction of being there, you can watch some of the presentations on Channel 9.
Here's a run-down of 3 IIS-related breakout sessions that you will want to check out:
It's not quite like being in Madrid or New Orleans, but the content is still great. Enjoy.... and hope to see you at TechEd next year!
WebDeploy v3.5 is now available for download, and there are a few features to consider in this minor release.Load Balancer Support with Session Affinity
This feature allows WebDeploy to be used with load balancers like ARR supporting layer 7 (OSI application layer) session affinity. If the load balancer sends a session cookie to WebDeploy, WebDeploy will return this cookie to the load balancer to have it route subsequent requests to the proper publishing endpoint.
Here is an example for configuring the ARR load balancer to generate and send the session cookie to WebDeploy (no specific configuration is required for WebDeploy). Navigate to the server farm to configure using IIS Manager:
Enable client affinity under the server farm’s Server Affinity option:
A new EncryptWebConfig rule handler was created to encrypt connection strings within a web.config file before updating it on the destination. This rule handler applies to the following providers: appHostConfig provider, contentPath provider and <>iisApp provider. The EncryptWebConfig rule handler is disabled by default and can be enabled by clients. When this rule handler is enabled, WebDeploy uses the standard .NET framework RsaProtectedConfigurationProvider which relies on the default key container NetFrameworkConfigurationKey (other KeyContainers can also be used because WebDeploy supports provider name override).
Here is example usage with the default RsaProtectedConfigurationProvider:
msdeploy.exe –verb:sync –source:iisapp=”sourceTestSite” –dest:iisapp=”destinationTestSite” –EnableRule:EncryptWebConfigApp Offline Template
WebDeploy v3.5 adds an enhancement to the existing AppOffline rule which allows you to take an ASP.NET application offline before publishing. In this release, WebDeploy supports specifying the relative path to an app offline template file located on the destination system. This rule handler applies to the following providers: appHostConfig provider, contentPath provider and iisApp provider.The app offline template file can capture any static HTML content to be displayed for users while the app is offline. Here is example usage:
msdeploy.exe -verb:sync -source:iisApp=sourceApp -dest:iisApp=destApp,appOfflineTemplate="offlineTemplate.htm" -enablerule:AppOfflineETW Instrumentation
WebDeploy v3.5 enables ETW logging for improved diagnosability with minimal impact for system resource consumption. The Error and ConnectionInfo channels are enabled by default, and additional Debug, Verbose, Info, and Warning channels can be enabled by Event Viewer configuration.
Here is an example for accessing and enabling Web Deploy ETW channels via Event Viewer under Applications and Services Logs\Microsoft\Windows\WebDeploy
The July Windows Server 2012/Windows 8 update (KB2855336) contains two fixes for Hyper-V scenarios that are likely to be important to a number of customers.
Both of these updates are included in the rollup KB2855336.
KB2853952 - Loss of consistency with IDE-attached virtual hard disks when a Windows Server 2012-based Hyper-V host server experiences an unplanned restart (renamed from Active Directory database becomes corrupted when a Windows Server 2012-based Hyper-V host server crashes)
This issue effects virtualized active directory servers – in the event that the host crashes or looses power the active directory instance may become corrupted. If this occurs on startup active directory will blue screen/bug check the virtual machine with an error of “c00002e2 Directory Services could not start because of the following error: %hs Error Status: 0x%x. Please shutdown this system and reboot into Directory Services Restore Mode, check the event log for more detailed information.”. There may be additional roles or applications impacted by this issue as the underlying cause is that when a guest operating system requests the Hyper-V server to disable disk caching the wrong error is returned making the guest operating system believe that caching has been disabled when it has not.
This update should be installed on the Hyper-V host.KB2854362 - Vmms.exe processes freeze on certain nodes in a Windows Server 2012-based Hyper-V failover cluster
This issue effects clustered Hyper-V servers with virtual machines hosted on a scale-out file server cluster. In the event of a node failure that results in VM’s being failed over and brought online on other nodes the VMMS process on those nodes may freeze resulting in VM’s that remain in the offline state.
This update should be installed on all of the Hyper-V hosts within a cluster.
-Program Manager, Hyper-V
I recently had to do some demonstrations on my laptop – which has a 1366 x 768 display. This made it hard to use Hyper-V virtual machines, which default to 1024 x 768 and only allow you to configure 4 x 3 resolutions.
Luckily, it is actually possible to setup a Hyper-V virtual machine with a widescreen resolution. Though the process is not that intuitive. What you need to do is:
You can also use this method to set the virtual machine resolution to 800 x 600 or 640 x 480 – which is usually not allowed on recent versions of Windows.
I wanted to let everyone know the SQL Server team has just published a shiny new white paper (96 pages long) that discusses all the best practices for managing SQL Server on virtual machines in Windows Server 2012... It's a very well done white paper and definitely worth reading.
Here's a link to it:Best Practices for Virtualizing and Managing SQL Server 2012
-Program Manager, Hyper-V
Azure Web Sites started to support custom domains SSL functionality recently. There are two SSL modes supported:
The SNI SSL setup is pretty simple and is documented in “How to enable SSL web site“. The IP SSL setup is more tricky, and unfortunately an important step is missing from that article. Without performing that step the domain name configured for IP SSL will continue to work as SNI SSL. The Windows Azure team is looking into fixing the documentation and UI workflow to prevent this confusion going forward. Meanwhile this blog post explains how to make sure IP SSL is configured correctly.How to check if IP SSL is working
After enabling IP SSL for your custom domain the simplest way to test it is working is to use IE with TLS 1.0 option DISABLED. Open IE then go to Internet Options –> Advanced and uncheck the “Use TLS 1.0″ checkbox.
This basically emulates the behavior of web browsers that do not support SNI. Browse to your site using the custom domain name. Check which certificate is used. If IP SSL was not configured correctly then you will see the certificate error as below. If you do not see this error then IP SSL is working correctly.
How to fix IP SSL configuration
IP SSL requires a dedicated public IP address to be associated with a domain name. So when you enable an IP SSL binding for a custom domain name in Windows Azure Portal:
a dedicated IP address is assigned to your site. You can find this IP address on the site’s dashboard page in Windows Azure Portal (look for “VIRTUAL IP ADDRESS:“).
This dedicated IP address is different from the default Azure Web Sites IP address that was used when you’ve configured custom domain A record or CNAME. Any HTTP traffic that arrives on this new IP address will be using your custom SSL certificate. Any HTTP traffic that still arrives on the default Windows Azure IP address will continue to use SNI SSL (or default Azure Web Sites SSL certificate if HTTP client does not support SNI).
So to have IP SSL working properly you’ll need to update an A record for your domain name so that it points to the dedicated IP address assigned to your site instead of the default Azure Web Sites IP address. To do that logon to your DNS registrar’s web site, go to the page for managing DNS and configure the domain and IP address as follows:Alias TTL Type Value contoso.com 7200 A <Dedicated IP address assigned to your site>
Note that if your custom domain had a CNAME record pointing to yoursite.azurewebsites.net then you need to remove that CNAME record.
In our recent conversation with customers about Hyper-V Replica, the questions that came up from a few customers was –
The answer is “Yes”. Hyper-V Replica supports an option where you can transport the initial copy of your VM to the Replica site using an external storage medium - like a USB drive. This method of seeding the Replica site is known is Out-of-Band Initial Replication (OOB IR) and is the focus of this blog post.
OOB IR is especially helpful if you have a large amounts of data to be replicated and the datacenters are not connected using a very high speed network. As an example, it will take around 20 days to complete initial replication on 2 TB of data if the network link between the Primary site and Replica site is 10 Mbps.
The following steps walk you through the process of using OOB IR.Steps to take on the Primary Site
From this point onwards the changes that happen to the VM will be replicated over and will be applied on to the placeholder VM on the Replica site. These changes will be merged with the OOB IR data once it is imported at the replica site.
Note: For security of the data, it is recommended that the external storage media be encrypted using encryption technologies like BitLocker.
The same steps can be achieved using PowerShell:
First enable replication for the VM using the following command-letEnable-VMReplication –VMName SQLDB_MyApplication –ReplicaServerName ReplicaServer.Contoso.com –ReplicaServerPort 80 –AuthenticationType Kerberos
Then export the Initial Replica using the following command-letStart-VMInitialReplication –VMName SQLDB_MyApplication –DestinationPath F:\VirtualMachineData\ Steps to take on the Replica Site
The same steps can be achieved using PowerShell
Copy the Initial Replica onto a local drive on the replica server (say D:\VirtualMachineData\) and then run the below command-let to import the initial replica.
Hyper V Replica offers one more method for Initial Replication that utilizes a backup copy of the VM to seed the replication, will cover that in our next blog post.
My site (RuslanY.net) is powered by WordPress and is hosted on Windows Azure Web Sites. I’ve migrated it from a private hosting to Windows Azure last year and since then I am pretty happy about the level or reliability and performance that I got on Windows Azure. The one thing that I’ve been missing though was the regular backups that I used to have when I self-hosted my site. I backed up the site content and the database regularly and those backups have saved me several times. Often when I upgraded some WordPress plugins, the newer plugin version got some bug or change in behavior that I did not like. On those occasions I just restored the site from the most recent backup that I took. I really wanted to have this capability even when hosting my site in Windows Azure.
That’s what prompted me and my friends (Bilal Aslam, Robert Lucero and Michael Dorian Bach) to develop a backup service for Windows Azure web sites. The service is called Cloud Cellar and is now live in beta at
With this service you can schedule regular backups of web sites hosted in Windows Azure along with SQL Azure or MySQL databases. The following walkthrough demonstrates the main capabilities of the service.
Sign up experience is pretty simple and once logged on you will see the main dashboard that shows the status of all the backups that you have scheduled. You can see how much storage all your backup copies take and how many backup jobs you can setup
Creating a new backup job is easy
As soon as backup job is created a first copy will be taken. It may take some time, depending on the size of your site and databases. After it has been created you can see the backup copy details, including the number of backed up files and database tables.
From this page you can download the backup copy, which is a zipped up content of your site and database.
You can also schedule a restore job which will do a full synchronization of the site content with what was in the backup copy.
The Cloud Cellar Service is completely free and very easy to use. We hope it will be useful for people who need this kind of backup capability in Windows Azure. Please try it out and let us know if you have any feedback or feature suggestions.
Yesterday I gave a presentation on new features in Hyper-V in Windows Server 2012 R2. As part of this presentation I did multiple demonstrations – which involved starting and stopping many virtual machines. While I was preparing and practicing for the presentation I noticed something odd.
Whenever I started a virtual machine it spend a long time (5 to 10 seconds) at 2% on starting.
Now let me take a moment to explain something about starting a virtual machine in Hyper-V. The percentages that we display while starting a virtual machine have a reliable meaning. For example: Starting – 10% is when we try to allocate memory for a virtual machine. If you see a virtual machine spend a long time at 10% when starting – your system is running low on memory and it is taking us a while to gather all the memory for the virtual machine to start. But I do not know what is happening at 2%.
On a hunch – I started looking at the network traffic that was being generated when I started a virtual machine. Using NetStat I could tell that we were sending out some network requests – but I could not figure out where these requests were going to. Next, I logged into my DNS server and enabled DNS debug logging (details on how to do this are here: http://technet.microsoft.com/en-us/library/cc759581(v=ws.10).aspx). The DNS logging soon revealed the problem.
Hyper-V was trying to contact “corppki.ben.demo” whenever I started a virtual machine (ben.demo is the private domain that I am using for the demo). Now, corppki.ben.demo does not exist. I do not know why we are looking for it – but I do know how to get rid of this delay. I logged into my demo server and opened the hosts file (%windir%\System32\Drivers\etc\hosts) and added the following line:
Once I did this – we would no longer try and resolve this name, and my virtual machines began starting much more quickly.
Now I just need to get back to the office and figure out why we are trying to talk to corppki.ben.demo in the first place!