2

We have hosted our sitecore CMS on to azure web apps. The HTTP is disabled on NSG layer, so only HTTPs is allowed.

We use azure provided certificate (i.e. azurewebsite wild card cert.) Noticed that URL agent isn't working with SSL. Read few posts below but didn't help: https://community.sitecore.net/developers/f/8/t/3984

Below is the exception that's been logged.

ManagedPoolThread #6 00:13:05 INFO Job started: Sitecore.Tasks.UrlAgent ManagedPoolThread #6 00:13:05 INFO Scheduling.UrlAgent started. Url: https://cms.myasite.azurewebsite.com/sitecore/service/keepalive.aspx ManagedPoolThread #6 00:13:05 ERROR Exception in UrlAgent (url: https://cms.myasite.azurewebsite.com/sitecore/service/keepalive.aspx) Exception: System.Net.WebException Message: The underlying connection was closed: An unexpected error occurred on a send. Source: System
at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) at System.Net.WebClient.DownloadData(Uri address) at Sitecore.Web.WebUtil.ExecuteWebPage(String url, NameValueCollection headers) at Sitecore.Tasks.UrlAgent.Run()

Nested Exception

Exception: System.IO.IOException Message: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. Source: System at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) at System.Net.ConnectStream.WriteHeaders(Boolean async)

Nested Exception

Exception: System.Net.Sockets.SocketException Message: An existing connection was forcibly closed by the remote host Source: System at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)

It looks related to azure certificate but not having any luck on how to resolve. Buying a proper certificate is not an option as we have no plan to setup custom domain for CMS.

Any suggestions will be good.

0

Ok managed to solve this issue by adding this line as part of application startup:

System.Net.ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

More detail on this issue is here:

https://stackoverflow.com/questions/28286086/default-securityprotocol-in-net-4-5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.