I have a weird issue in my Windows Azure project (c#)
My C# Azure app uses the Exchange Managed API to communicate with an Exchange 2010 server across the web.
Exchange 2010 itself is running in an Azure VM. I've opened up the firewall so that the Exchange EWS webservice is available on port 443.
When running locally in the Azure Emulator, my app works perfectly. I can see all the folders and emails in my account. It communicates with the Exchange VM across the web perfectly.
However, as soon as I publish my app to my staging environment, the app does not work properly.
The first call to the server works but after that, I receive this message:
"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond [IPADDRESS]:443"
As I say, it works the first time (my Index page appears with the content I need) but if I refresh that page, it then gives me that error.
Therefore, I don't think it's a firewall issue, otherwise it wouldn't work the first time.
It's driving me to despair - I can't see what's wrong!
Hope you can help,
Simon.
[EDIT] Here's the stack trace:
[SocketException (0x274c): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond]
System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult) +136
[IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.]
System.Net.Security._SslStream.EndRead(IAsyncResult asyncResult) +7911429
System.Net.TlsStream.EndRead(IAsyncResult asyncResult) +2691856
System.Net.Connection.ReadCallback(IAsyncResult asyncResult) +79
[WebException: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.]
System.Net.HttpWebRequest.GetResponse() +7864676
Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(HttpWebRequest request) +130
[ServiceRequestException: The request failed. The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.]
Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(HttpWebRequest request) +447
Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest(HttpWebRequest& request) +647
Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute() +72
Microsoft.Exchange.WebServices.Data.ExchangeService.BindToFolder(FolderId folderId, PropertySet propertySet) +201
Microsoft.Exchange.WebServices.Data.CalendarFolder.Bind(ExchangeService service, WellKnownFolderName name) +83