Azure Website: ERROR_PROXY_GATEWAY in deploying an Azure website using MSDeploy from TeamCity

Error Message

[14:33:45][VSMSDeploy] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(4270, 5): error ERROR_PROXY_GATEWAY: Web deployment task failed. (Could not connect to the remote computer (“[yoursite]”) using the specified process (“Web Management Service”). This can happen if a proxy server is interrupting communication with the destination server. Disable the proxy server and try again. Learn more at:


There is an official page that contains the list of error codes and possible resolution from IIS. What was suggested for ERROR_PROXY_GATEWAY is as below.

Diagnosis – A proxy gateway is preventing Web Deploy from communicating with the remote Web Deploy endpoint.Resolution – Web Deploy does not read system proxy settings. As a workaround, try disabling the system proxy:

  • Start Internet Explorer
  • Click Tools > Options
  • Click Connection
  • Click LAN Settings
  • Disable all checkboxes

It didn’t really help me directly because my build server is on Azure data center in same region where I host my test site and it used to work all the time since long time back. But when I tried to rdp the server then I found that there is a alert for the server restart. So, it seems to me that when the server needed to be restarted then it might limit the connection or something. I was still able to connect the team city website but it was just that msdeploy didn’t work so I did the restart and everything’s back to normal again.

So, if you are getting the same error all of a sudden, try to rdp to your server and see whether there is a restart alert or not. 

Azure WebJob Issue after package update – Host is not running

It took me a while to get the solution for this problem and Google gave me nothing when I search the error (warning) message so I thought its worth to share it here with you all.


Error Message: Host is not running; requests will be queued but not execute until the host is started


Web Job Issue


It happened because of the breaking changes in Beta 0.5 version. Azure used to have the problem with same name in different region due to their caching. I beleive that some parts of Azure tools like ‘Visual Studio’s publish dialog to azure’ and ‘SCM’ were not built to support the “same name/multiple regions” or multiple subscriptions in mind. I reported about “Problem: Issue with multiple Azure subscriptions with same name” before.

The solution for this issue is to make the class and method public. It’s an unusual practice for console programs but it’s how it is and it works.

public class Program {

private static Logger _logger = LogManager.GetCurrentClassLogger();

public static void Main(string[] args) {
_logger.Info("Test Main Started");
var host = new JobHost();
_logger.Info("Test Main Ended");

public static async Task TestAsync([QueueTrigger("testqueue")] string _) {
_logger.Info("TestAsync Started");
await Task.Delay(30);
_logger.Info("TestAsync Ended");

And if you toggle the output of your webjob in SCM, you will see this log below. Then you will know that you need to make the class and methods public.

INFO] No functions found. Try making job classes public and methods public static.

So, That’s it. Hope it helps saving some of your time.


Gmail password leaks download? For real? Tvskit – btcsec

A lot of people are changing their Gmail passwords since the news on 5 million Gmail passwords leaked widely spread all over the internet today. According to the new, the user “Tvskit” posted the zip file with the following screenshots in Russion Bitcoin forum.

Tvskit - Gmail Password Leak

Some sources said that the passwords in that file are 60% accurate but old passwords. I followed a few links to get the zip files from different source (including the original btcsec website) and extracted them on a VM. Here is the list of links that I downloaded the files. (Note: I intentionally didn’t link them from my blog. ) Gmail Password Downloads

Here is the size of those Gmail passwords files that I downloaded. Gmail Password Download Sizes

If you are planning to download those files from those websites that I posted in screenshot and the size are the same, don’t bother downloading it. Because those files don’t contain any password and it’s just the list of user names. (4929083 accounts in totals)

Gmail password leaks but no password

A user “cDull” from reddits also shared what they think about what happened as below in this post “5 Millions of “Gmail” passwords leaked [RUS], most likely it’s a compilation of passwords from other sites

That is pretty smart of you, and there are many others that had same idea. Just do a grep for ‘+’ in the gmail account dump and you see a lot of eharmony, filedrop, friendster, bravenet, bioware, savage, xtube, and others if you do the command below. There might be more than 20 different website references in there. This is definitely a compilation and a bunch of bullshit FUD.

grep '+' google_5000000.txt | cut -d+ -f2 | cut -d@ -f1 | sort | uniq -c | sort -h | tail -n 21
18 bravenet
18 filesavr
19 policeauctions
25 4
27 eh
28 3
32 freebiejeebies
40 hon
51 bryce
52 savage2
54 bioware
57 spam
60 2
62 savage
63 friendster
64 eharmony
66 daz3d
88 filedropper
125 1
132 daz
176 xtube

If you managed to get the file then don’t forget to use a VM before extracting the file. Of course, you have the file with passwords then let me know..

Most annoying thing in Visual Studio

Here is my most annoying thing in Visual Studio. What about yours?

I have my MVP MSDN subscription, Dreamspark (Ya, I am still a student), BizSpark (with my friends)  for many years. This dialog pop-up once in a while to annoy me. Ya. it happened with VS express version that is totally free as well. Who the fuck are you to keep on validating your own royal customers? Is it your best marketing strategy?

I guess some program managers who decided to force (instead of encourage) VS users should be a part of this year’s cut (18K? )

It doesn’t matter how much I love Microsoft technology. but I hate when I am being forced.

Most anoying things in VS


Status of FxCop/Code Analysis! – Is FxCop still being maintained?

Short version

The old version IL-based FxCop/CA are dead but the new version of CA that based on source-code instead of IL will be in VS “14”.  (You can scroll down and see the reply from Alex Turner, the owner for Diagnostics in managed languages. )

Long version

Yes, I was a huge fan of FxCop/Code Analysis. I forced encouraged everyone in my team to make FxCop/CA happy for every single line of code before they commit. FxCop/CA does help to make sure your code is still following Framework Design Guidelines without assigning some experts to do the manual code review for every commits.

Note: If you are not familiar with FxCop/CA then you can read about them in the following links (FxCopCode Analysis and FxCop Vs. Code Analysis)

We all know that Microsoft has released a few versions of .NET framework. When was FxCop’s last release? I reported the following issues that we have with FxCop/CA but I didn’t see those issues are being addressed.

The worst part is that some teams (e.g. MVC/Web API team) from Microsoft are not even following the FxCop’s rules. I posted this questions “Why a fresh new MVC project couldn’t pass the Code Analysis? One-Microsoft” in MSDN forum as well.

I am the one who is encouraging the team to follow FxCop in company but I wasn’t sure why the issues that have been reported a while back are still not being addressed. I wasn’t even sure whether Microsoft is still maintaining the FxCop or not so I tried to reach out to Microsoft team internally and luckily, I got the answer.

Here is the unedited reply from Alex Turner, the owner for Diagnostics in managed languages. I am sharing his email with everyone (including my teams) with his permissions. 

Hi Michael,

FxCop has indeed been dormant for a while, and it’s certainly become stale in the face of new C# language features like async. My favorite instance of that is the cyclomatic complexity rule – FxCop will complain that an empty async method has too branches for you to easily maintain, even when it contains no code J

This is all due to FxCop analyzing IL rather than source. That worked great in the C# 1.0/2.0 days when the code you wrote mapped almost directly to IL – rules could look at that IL and work out what the source was. However, heavier transforms like LINQ and async get you too far from the code that was written to give good guidance on anything except method/type naming and IL-level performance tweaks. In the face of such decaying rules, it’s unfortunate but not surprising to me that other Microsoft teams are skipping the dance required to stay FxCop-clean.

For VS “14”, we’re investing heavily in source-based code analysis, built using Roslyn. This not only gives back the fidelity we’ve been missing in async methods and other high-level constructs – it also lets us surface code analysis issues live as you’re typing, even before your code fully builds, since we’re operating on the same syntax trees and symbols that IntelliSense uses. We’re also surfacing a supported API for plugging such rules into the compiler as you build, so that API authors and other third parties finally have a supported way to build such analysis, rather than hacking it into FxCop.

As Christoph pointed out, we’re proving out our new Roslyn-based diagnostics by reimplementing the high-value, low-false-positive FxCop rules using Roslyn. We haven’t yet decided when to pull the switch and officially swap out the IL-based FxCop rules for rules built on Roslyn, but the new live analysis engine will be built into the C#/VB compilers in VS “14” (it’s already in the CTP). At a minimum, we’ll ship this set of rules online, as an opt-in package you can use instead of the built-in VS support.

Alex Turner
Senior Program Manager
Managed Languages


The conclusion is that the old version IL-based FxCop/CA are dead but the new version that based on source-code analysis instead of IL will be in VS “14”.

[Quora] – Advice from someone who made $15 millions after selling the tech startup.

I came across this awesome answer to the question “Is getting rich worth it?” on Quora site. I have no idea who posted this great answer but I just feel like it’s worth sharing with you all.  (Note: I did read the terms of service from quora and I am allowed to share it with the link to the original post.)

I made $15m in my mid-20s after I sold a tech startup. I talked to a lot of people about this question, and thought a lot about how to stay the same person I was before and after making money.

Here’s my answer: being rich is better than not being rich, but it’s not nearly as good as you imagine it is.

The answer why is a bit more complicated.

First, one of the only real things being rich gives you is that you don’t have to worry about money as much anymore. There will still be some expenses that you cannot afford (and you will wish you could), but most expenses can be made without thinking about what it costs. This is definitely better, without a doubt.

Being rich does come with some downsides, though. The first thing you are thinking reading that, is, “cry me a river”. That is one of the downsides. You are not allowed to complain about anything, ever. Since most people imagine being rich as nirvana, you are no longer allowed to have any human needs or frustrations in the public eye. Yet, you are still a human being, but most people don’t treat you like one.

There’s the second downside. Most people now want something out of you, and it can be harder to figure out whether someone is being nice to you because they like you, or they are being nice to you because of your money. If you aren’t married yet, good luck trying to figure out (and/or always having self doubt) about whether a partner is into you or your money.

Then you have friends & family. Hopefully your relationship with them doesn’t sour, but it can get harder. Both can get really weird about it and start to treat you differently. They might come and ask for a loan (bad idea: if you give, always give a gift). One common problem is that they don’t appreciate Christmas presents the way that they used to, and they can get unrealistic expectations for how large a present should be and be disappointed when you don’t meet their unrealistic expectations. You have to start making decisions for your parents on what does and does not cost too much, and frankly, it’s awkward.

Add all of these up and you can start to feel a certain sense of isolation.

You sometimes lay awake at night, wondering if you made the right investment decisions, whether it might all go away. You know that feeling standing on a tall building, the feeling you might lose your mind and jump? Sometimes you’re worried that you might lose your mind and spend it all.

The next thing you need to understand about money is this: all of the things you picture buying, they are only worthwhile to you because you cannot afford them (or have to work really hard to acquire them). Maybe you have your eye on a new Audi — once you can easily afford it, it just doesn’t mean as much to you anymore.

Everything is relative, and you are more or less powerless to that. Yes, the first month you drive the Audi, or eat in a fancy restaurant, you really enjoy it. But then you sort of get used to it. And then you are looking towards the next thing, the next level up. And the problem is that you have reset your expectations, and everything below that level doesn’t get you quite as excited anymore.

This happens to everyone. Good people can maintain perspective, actively fight it, and stay grounded. Worse people complain about it and commit general acts of douchebaggery. But remember this: it would happen to you, too, even though you might not think so. You’ll just have to trust me on this one.

Most people hold the illusion that if only they had more money, their life would be better and they would be happier. Then they get rich, and that doesn’t happen, and it can throw them into a serious life crisis.

If you’re part of the middle class, you have just as many opportunities to do with your life what you want of it. If you’re not happy now, you won’t be happy because of money.

Whether you’re rich or not, make your life what you want it to be, and don’t use money as an excuse. Go out there, get involved, be active, pursue your passion, and make a difference.