Newsletter Studio - Insert url content & RenderTask
Hi,
We are recently updated the Newsletter version to 1.4.5,2 and upgraded site from HTTP to HTTPS.
Issue : We are trying to add site content using "Insert url Content" option in newsletter studio. we are able to insert the url but when send/preview the newsletter, it is showing as "could not load
We are facing this issue only for the content within the site but 3rd party urls are rendering without any issue.
Please advise us.
Is it possible to render the page content using RenderTask(company.RenderTask) ? if so, Please let us know how to use it to render the page content using it and share few samples for it.
Or
Is the any other way to customise to render the url content within the newsletter body.
System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.NetworkStream.BeginRead(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
--- End of inner exception stack trace ---
at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at ASP.masterpagespagerubyconnectionmastermaster._RenderContent1(HtmlTextWriter _w, Control parameterContainer)
---> (Inner Exception #0) System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.NetworkStream.BeginRead(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
--- End of inner exception stack trace ---
at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
Can you please share your thoughts, how to proceed further. either need to work on newsletter studio plugin level or in server level. Because your server team confirmed, there is no block on server level especially to TCP port 80,443.
It's really hard to say why this does not work since it's a simple HttpWebRequest that downloads the content of the URL that you point it to. It works in 3 different environments that I've tried to reproduce the issue in.
The error message says: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
Which indicates that there is something wrong somewhere in your local setup,
I'll share the code that we use for the render task, you could try this on you local machine and maybe find out why this does not work.
Newsletter Studio - Insert url content & RenderTask
Hi,
We are recently updated the Newsletter version to 1.4.5,2 and upgraded site from HTTP to HTTPS.
Issue : We are trying to add site content using "Insert url Content" option in newsletter studio. we are able to insert the url but when send/preview the newsletter, it is showing as "could not load
We are facing this issue only for the content within the site but 3rd party urls are rendering without any issue.
Please advise us.
Is it possible to render the page content using RenderTask(company.RenderTask) ? if so, Please let us know how to use it to render the page content using it and share few samples for it.
Or
Is the any other way to customise to render the url content within the newsletter body.
Regards, Murugan H
Hi!
Is this only for local https-urls or for external as well?
Do you have the same issue in your local dev-enviroment?
// m
We have issue with local url (within the site) , not for external urls.
We do not have issue in local dev environment (its not in https).
Please also suggest us how to write custom code to render the data from RenderUrl(insert url content) option.
Hi!
Okey, do you see any errors in the trace log or in the umbraco log table in the database? Please share them if you can.
Reg. custom render tasks, you can find documentation here: https://www.newsletterstudio.org/help/develop-with-newsletter-studio/control-content-with-render-tasks/
We are getting the below error :
System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host at System.Net.Sockets.NetworkStream.BeginRead(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state) --- End of inner exception stack trace --- at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult) at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar) --- End of inner exception stack trace --- --- End of inner exception stack trace --- at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at ASP.masterpagespagerubyconnectionmastermaster._RenderContent1(HtmlTextWriter _w, Control parameterContainer) ---> (Inner Exception #0) System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host at System.Net.Sockets.NetworkStream.BeginRead(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state) --- End of inner exception stack trace --- at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
Do you have the same issue with 3-party HTTPS-urls or only request to the local server?
We do not have any issue with 3rd party HTTP & HTTPS url.
We have issue only in local server for both HTTP & HTTPS.
Hi Markus,
Can you please share your thoughts, how to proceed further. either need to work on newsletter studio plugin level or in server level. Because your server team confirmed, there is no block on server level especially to TCP port 80,443.
-- Murugan H
Hi!
It's really hard to say why this does not work since it's a simple HttpWebRequest that downloads the content of the URL that you point it to. It works in 3 different environments that I've tried to reproduce the issue in.
The error message says: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
Which indicates that there is something wrong somewhere in your local setup,
I'll share the code that we use for the render task, you could try this on you local machine and maybe find out why this does not work.
https://www.dropbox.com/s/1mirz5b3h0fpfq4/RenderUrlRenderTask.txt?dl=0
https://www.dropbox.com/s/fboowkkgenvrrj9/WebPageDownloader.cs.txt?dl=0
Please let me know if you find out something with our implementation that could be improved to support your use case.
is working on a reply...