Category Archives: Cloud

IP filtering in IIS running in the Amazon cloud

You can setup highly scalable webservices very easily in the Amazon EC2 cloud: just create two new virtual machines, connect them to a load balancer and you’re done! The dark clouds will begin to gather over your head, when you realize that the carefully setup IP filtering does not work in IIS, and anyone can access your website.

The problem is that the IIS running in the virtual machine sees the load balancer as the client, and not the original browser. (Obviously, IP filtering would work perfectly for that internal address, but I’m pretty sure you don’t need that.) If you don’t believe me, check your IIS log files.

Thankfully Amazon load balancers support the Proxy protocol which forwards the IP address of the real client in the X-Forwarded-For HTTP request header. By default IIS doesn’t log the value of this field, but you can add it to your logs with a few clicks:

iis-proxy-logging

The second good news is that you can configure IIS to use the X-Forwarded-For header for IP filtering. In IIS 7 you can do this with the Dynamic IP Restriction module, and from IIS 8 you can get this functionality built into the IP Address and Domain Restrictions module. It is not enabled by default, but you can activate it with a single click:

iis-proxy-mode

 

Technorati-címkék: ,,
Advertisements

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: ,,

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: ,,,

Launching Lync Web App instead of the Lync client

Sometimes happens that you receive a Lync meeting request, but when you click on the meeting URL the Lync client cannot join the external SIP domain. In these cases the simplest solution would be to launch the Lync Web App, however it won’t start in the browser if you have the Lync client installed.

The quick solution is to append ?sl=1 to the end of the meeting URL.

For example: https://FQDN/organizerID/meetingID?sl=1

You can read more about the internal launch logic of the Lync Web App: Launching Lync Web App.

I am not sure that this is a best practice to follow in 2013.

 

Technorati-címkék: ,

tfspreview.com

The Team Foundation Server has a cloud-based (of course it runs on Azure), subscription-based version, called Team Foundation Service. Because this service is currently in preview, you can register for free on http://tfspreview.com. For this price you got not only a source control, but all the nice features of TFS.

tfspreview

I use this service since the first internal preview release, and I really like it. It takes no time to start my browser and create a brand new team project, and in 1 minute it’s ready and you can connect to it. I use it even for 1-person projects, because I believe in this online service more than an SVN installed onto my own computer. So I think the message below is quite correct. Mosolygó arc

love this

 

MS Days 2012 Bulgaria

MS Days 2012 BulgariaThanks for joining us in Sofia at the Microsoft Days 2012 conference!

You can download the presentations and the demos for both sessions:

Feedback and comments are more than welcome, and we would really appreciate if you would tell us how you liked our sessions. Just leave a comment here or send us an e-mail!

Thanks,

György Balássy and Zoltán Dávid