We have created a WCF service which is working correctly and we deployed it into a Web Role in Windows Azure.
The problem is, When my colleague uses his machine and publishes the service using Visual Studio (Right Click > Publish), Everything works perfectly fine.
BUT, If I am using my machine and I tried to publish exactly the same service (Same source code) using Visual Studio (Right Click > Publish), The deployment gets completed successfully.
Nevertheless, After a few seconds when I check Windows Azure portal, I see that in the Cloud Services section, The WCF status is "! Running", and when I open its Dashboard it states: One or more role instances are unhealthy. 1 Instance: 1 Unhealthy: Recycling (Stabilizing role... Unhandled Exception: System.NullReferenceException [2013-09-29T19:29:30Z])
Why this is happening? I and my colleague have exactly the same source code, But we use different machines.
I checked the following things:
1) I checked and I can confirm that there are not any missing references.
2) I followed Avkash Chauhan's article, and yes, I am using: "Auto-assign Port".
3) I followed Anton Staykov's article, and yes, I set Copy Local: True.
4) Also, I added Sandrino Di Mattia's code as explained on this thread: (AutoStart a WCF on Azure WebRole).
Nothing has worked at all, and I am still encountering the same issue.
So, Could you please help me out to resolve this issue ?
I would greatly appreciate your inputs !