Monthly Archives: November 2013

IIS configuration auditing

It is not difficult to find an IIS configuration setting that you can flip and make your webserver instantly insecure. For this reason it is very important to monitor and track the changes of the IIS configuration. Fortunately IIS provides this feature, but you cannot turn it on in IIS Manager.

Instead start Event Viewer, and navigate to the Application and Services Logs –> Microsoft –> Windows –> IIS Configuration –> Operational branch. Right click on this log and click Enable Log to turn on auditing:

iis-config-audit-log

From now on all IIS configuration changes appear in this log:

iis-config-audit-general

The General view doesn’t provide too much information beside the modified setting, the modification date and the user, but you can find more in the Details view:

iis-config-details

It’s important to know that only those changes show up in the log that are done via IIS Manager, appcmd or the object model; if you use Notepad and edit the applicationHost.config directly it won’t be logged.

 

Technorati-címkék: ,,,

Git Extensions: Syntax error near unexpected token

You may receive the following error message when you try to clone a GIT repository with a freshly installed GIT Extensions:

git-credential

This is the exact error:

\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/
git-credential-winstore.exe\" get: -c: line 0:
syntax error near unexpected token `('

You can find the root cause of the issue in the C:\Users\<UserName>\.gitconfig file in this line:

[credential]
helper = !\\\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\\\"

To fix the problem just remove 2-2 backslashes from the start and the end of the line, so there should remain 1 in the beginning and 1 in the end:

helper = !\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\"

Now cloning should succeed without any error.

 

Technorati-címkék: ,

Visual Studio editions

The recently announced Visual Studio Online (formerly Team Foundation Service) extended the Visual Studio offering with three new editions. This is the complete list now (excluding the Express editions):

Comparison tables:

You can find detailed information and the FAQ about licensing in the 34-page Visual Studio and MSDN Licensing White Paper, which was also updated in this month.

 

Technorati-címkék: ,,

IIS remote management from Windows 8.1

One of the coolest features of the Internet Information Services (IIS) Manager (inetmgr.exe) is that you can run it locally on your client computer, and you can remotely manage your IIS server with it on a graphical user interface. Just start inetmgr.exe, then click the Connect to a Server item in the File menu:

inetmgr-connect-to-file-menu

This starts a simple wizard, and if the server has the Web Management Service installed, you can instantly connect to your server, to your website or to your web application.

It is very quick and simple, if and only if you have that menu item. Because it doesn’t exist neither on Windows 7, nor on Windows 8 or 8.1 by default. (Wait, you have a Save Connections (well, in disabled state), but why?)

inetmgr-default

In case of Windows 7 I understand the historical reasons, but I couldn’t find any logical explanation for the newer client operating systems. If if has to be a separate download it could be a part of RSAT.

Stop whining and let’s fix this issue instead. Start Web Platform Installer where you can search for example for “remote” to find the IIS Manager for Remote Administration v1.1:

inetmgr-webpi-search

Don’t be shocked by the 2011 release date, it is exactly the tool what you need. Click Add in the row, then Install on the bottom, and finally click I Accept in the next dialog to accept the license terms. The download and the installations starts, but suddenly stops with the following error:

inetmgr-webpi-sorry

The installation failed because it requires Windows 7 or newer. Come on, I’m on Windows 8.1, dude!

OK, try it again, but at this time click the Direct Download Link link in the license dialog:

inetmgr-webpi-licence

This triggers your default browser which downloads the MSI installer into the folder you select. By the way you can find the download URL in the installation log as well by clicking the View log here link in the previous error dialog. In my case the installer was downloaded from here:

http://download.microsoft.com/download/D/A/5/DA588562-C4A4-4337-AE36-3A4548700CDF/inetmgr_amd64_v1.1_en-US.msi

Before starting the installer, open the Properties dialog of the MSI file and check the Run this program in compatibility mode checkbox:

inetmgr-compatibility

Click through the wizard, restart IIS Manager and now you can connect to your remote webserver. On the first connection IIS Manager may download additional modules just as usual:

inetmgr-features

 

Technorati-címkék: ,

Publishing a multiproject solution to Azure

One of the great features of the Windows Azure Websites is that you can directly connect the site to your source control repository. When you change your source code, it will be automatically deployed to the Azure cloud.

It is only a few clicks to set it up, just start the New –> Compute –> Web Site –> Custom create wizard:

multisite-new

Enter a URL for your website and don’t forget to check the Publish from source control checkbox:

multisite-name

This activates the second step of the wizard where you can select your preferred source control provider, for example GitHub:

multisite-where

In case of GitHub you have to authenticate yourself via OAuth, then you can select which repository and which branch you want to publish (master is the default, but you can change that to any branch name!):

multisite-repo

Within a few seconds your website will be up and running, and Azure will start deploying your application to it.

But what if you have a Visual Studio solution which contains multiple web projects or websites, which one will be deployed? The first one.

Well, that’s great for most cases, but sometimes you want to change that behavior.

If you always want to deploy the same project/site to the cloud, you can create a .deployment file in the root of your repo, in which you define which project you want to deploy:

[config]
project = MySolution/MyWebProject.csproj

But if you have multiple Azure websites, you may want to deploy different projects of your solution to them. In this case you cannot hardwire the setting into the repo, instead you have to set on the Azure management portal. Navigate to the CONFIGURE page and scroll down to the app settings section. Create a new setting with the name Project and set the repo-root relative path to the .csproj or the folder of the website as its value:

multisite-appsettings

Just save the setting and voila, next time when you change your source code only the preset project will be deployed to this website.

 

Technorati-címkék: ,,,

Rename your Visual Studio window title

If you often run multiple instances of Visual Studio to edit multiple branches of the same project from different folders, you may find annoying how difficult it is to discover which branch do you currently edit. All instances looks the same on the Windows taskbar:

vs-rename-similar

The Rename Visual Studio Window Title extension may ease your pain by prepending the names of the parent folders into the Visual Studio title bar:

vs-rename-title

Of course the same names appear on the Windows taskbar as well:

vs-rename-taskbar-branches

You can customize the behavior of the extension in the Options dialog:

vs-rename-options

Tiny, but very useful tool.

 

Technorati-címkék: ,