Using the new "Insert URL-content" feature is causing an error when trying to send a newsletter. When I send a testmail, it is working ok. Any suggestions?
The error:
Server Error in '/' Application.
The remote server returned an error: (400) Bad Request.
Description: An unhandled exception occurred during
the execution of the current web request. Please review the stack trace
for more information about the error and where it originated in the
code.
Exception Details: System.Net.WebException: The remote server returned an error: (400) Bad Request.
Source Error:
An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
There is no difference in the way that the render url-task works in preview/test and send out. Dose it work when you preview? Could you send over the HTML thats causing the problems?
Dose this happen all the time or just with a certain render url? Are you 100% sure that it's a valid url? Seems that the server returns 400 (bad request).
It always work when i do preview, and allways give me the error message when I send out using the mailinglist (but only when I use the Insert url-content feature). When I copy the html from the url into the newsletter-editor it works fine. I have also tried to do it with a blank template with only one word in it, and no html, and it still gives me the error message. I have tried this on two different sites as well.
I'm sorry but i can't reproduce this problem. It looks like the problem accours inside the System.Net.HttpWebRequest.GetResponse()-method. I'm wondering if there may be some other problem. Could you use Fiddler (http://www.fiddler2.com/fiddler2/) or something to make sure that the requested url is the same as the one that you are entering in the HTML? Or can you find any information in the logs of the web server?
Seems like I found what causes the error. The newsletter-nodes is located in a "folder" (regular document type) in the content section. The folder is on the root level. I don't know exactly how this works, but even when the the architecture is root>folder>newsletternode, the url of the document is domain.no/newsletternode.aspx, probably an url-rewriting or something like that. This, as far as I can see, gives the bad request error.
I recognized this when I tried to send an other node from the website (level 3). As far as I can understand it will not be possible to send nodes where the Umbraco-engine has done url-rewriting. I should maybe have understand this before, but I didn't think this to be an issue.
Thanks for your help!
I thought I had the sollution, but it seems like it was sending the root URL instead of the page I picked. So: when I send the root url, it works. When I use other urls, or external urls, it fails. When I send a testmail it works perfectly, but when I send using the mailinglist-option without changing anything, it fails. I will try more using the fiddler-tool to find out if I can get any more information.
The render url-content feature works with all both internal and external urls - if it works in the browser it should work with the render url-feature. The requests are med using the HttpWebRequest-class with the standard .NET-librarys.
Like I said it's the exact same code that runt both in test and the "real" send out. have to made any changes to web.config and moved the rendertasks? Have you added any render task?
I'm experiencing the same problems. I have the following RederUrl task: [RenderUrl:http://dev-staging.webshop.nl/en/mailing/producten-20-april/]
This is a internal url only (using my hosts file). When I send a test-email, everything works fine. When I try to send the mail 'for real', it fails.
Using fiddler & ELMAH I discovered that the actual error message is: A potentially dangerous Request.Path value was detected from the client (<). I think the system is trying to execute the following path:
What happens when you preview? I quess that URL is invalid? That should not work in any situation, test, preview or send out. I can't say why the root url (http://dev-staging.webshop.nl) is repeated....
Henrik - Your stuff works in preview but not when doing an accual send out Floris - Your stuff never works?
Henrik Do you have any custom render tasks? Have you changed the order in which the render tasks happens (in web.config)? How does your code look in the html-view of TinyMce?
Floris This sounds lika some kind of javascript issue. When you pick something in the node-tree, does the display look currect there?
Floris, this sounds like a javascript bug but I can't reproduce it. In my enviroment the path in the href-property is relative yours are not relative. Is that due to the "use domain prefixes"?
Your resualt: {localLink:4980}|http://dev-staging.webshop.nl/en/brochures/|Brochures}
My resualt: {localLink:4980}|/en/brochures/|Brochures}
The javascript is inside this file if you want to play around:
(not actually, but I can't put the real URL on here!)
Sending a test newsletter works perfectly, but I can't send to a mailing list (which only has my email address in at the moment). Unfortunately, I was demo-ing to the client when I found this out!
This is a demo version - I assume it doesn't need to be licenced in order to use the mailing list?
I am using version 1.2, which was installed over a previous version (1.1.2? ... sorry, can't remember).
It seems like your problem is the same as Henrik. You do have the right url inside the tag but something breaks during send out. I guess i must has something to do with some render task that change your html-body before the renderurl task takes place. Could you help me and look inside your database and have a look at the HTML that are stored inside the nsNewsletter-table, is the [RenderUrl:yada yada] correct in there?
Gordon (and other interested), could you drop me an email at markus [at] enkelmedia.se and I'll provide you with a beta of version 1.2.2. Where currently corking on the mysql-support and will not ship the next stable version until that has been tested, but if you get the beta you could test it out in your enviroment - the beta should be stable if you runt sql server.
Insert URL-content problem
Hi!
Using the new "Insert URL-content" feature is causing an error when trying to send a newsletter. When I send a testmail, it is working ok. Any suggestions?
The error:
Server Error in '/' Application.
The remote server returned an error: (400) Bad Request.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Net.WebException: The remote server returned an error: (400) Bad Request.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Hi Henrik!
There is no difference in the way that the render url-task works in preview/test and send out. Dose it work when you preview? Could you send over the HTML thats causing the problems?
Dose this happen all the time or just with a certain render url? Are you 100% sure that it's a valid url? Seems that the server returns 400 (bad request).
// Markus
Hi!
It always work when i do preview, and allways give me the error message when I send out using the mailinglist (but only when I use the Insert url-content feature). When I copy the html from the url into the newsletter-editor it works fine. I have also tried to do it with a blank template with only one word in it, and no html, and it still gives me the error message. I have tried this on two different sites as well.
The last url i have tried looks like this: http://nrf.mellombels.no/test.aspx
The html in the e-mail (in the newsletters editor) looks like this: <p>[RenderUrl:http://nrf.mellombels.no/test.aspx]</p>
Any advice or other things I can try to solve the problem is appriciated, thank you for your answer.
/ Henrik
Hi Henrik!
I'm sorry but i can't reproduce this problem. It looks like the problem accours inside the System.Net.HttpWebRequest.GetResponse()-method. I'm wondering if there may be some other problem. Could you use Fiddler (http://www.fiddler2.com/fiddler2/) or something to make sure that the requested url is the same as the one that you are entering in the HTML? Or can you find any information in the logs of the web server?
Hi!
Seems like I found what causes the error. The newsletter-nodes is located in a "folder" (regular document type) in the content section. The folder is on the root level. I don't know exactly how this works, but even when the the architecture is root>folder>newsletternode, the url of the document is domain.no/newsletternode.aspx, probably an url-rewriting or something like that. This, as far as I can see, gives the bad request error.
I recognized this when I tried to send an other node from the website (level 3). As far as I can understand it will not be possible to send nodes where the Umbraco-engine has done url-rewriting. I should maybe have understand this before, but I didn't think this to be an issue.
Thanks for your help!
I thought I had the sollution, but it seems like it was sending the root URL instead of the page I picked. So: when I send the root url, it works. When I use other urls, or external urls, it fails. When I send a testmail it works perfectly, but when I send using the mailinglist-option without changing anything, it fails. I will try more using the fiddler-tool to find out if I can get any more information.
Hi!
The render url-content feature works with all both internal and external urls - if it works in the browser it should work with the render url-feature. The requests are med using the HttpWebRequest-class with the standard .NET-librarys.
Like I said it's the exact same code that runt both in test and the "real" send out. have to made any changes to web.config and moved the rendertasks? Have you added any render task?
// M
Hi,
I'm experiencing the same problems. I have the following RederUrl task: [RenderUrl:http://dev-staging.webshop.nl/en/mailing/producten-20-april/]
This is a internal url only (using my hosts file). When I send a test-email, everything works fine. When I try to send the mail 'for real', it fails.
Using fiddler & ELMAH I discovered that the actual error message is: A potentially dangerous Request.Path value was detected from the client (<).
I think the system is trying to execute the following path:
C:\Repositories\FolatWebshop\1 - Code\UmbracoRuntime\en\mailing\producten-20-april\]<br \><img src="http:\dev-staging.folat.nl\umbraco\newsletterstudio\tracking\trackpixel.aspx
Which would explain the error message. I am using the 'useDomainPrefixes' setting though.
Also, when I add a Content-URL from the editor, it inserts a wrong piece of HTML. The following is on my page after I insert the Content-URL:
Dit is een test<br /><br />[RenderUrl:http://dev-staging.webshop.nlhttp://dev-staging.webshop.nl/en/mailing/producten-20-april/]<br />
I think this is all related to useDomainPrefixes though, but i could be wrong.
Could I caontact you though e-mail? There is some other (financial) stuff I would like to discuss.
Floris Robbemont
Lucrasoft BV
Hi Floris!
Thank you very much for sharing your research!
We'll try to reproduce this bug and make sure to solve it asap.
Of course, my email is markus [a sign goes here] enkelmedia.se
// Markus
Hi Floris!
If you open the newsletter in tinymce and click on the HTML-button. What do you se in the source-code there?
[RenderUrl:http://dev-staging.webshop.nl/en/mailing/producten-20-april/]
or something else?
Do you have skype or something so that we could chat?
Hi Markus,
In the source-code view the render URL is as follows:
[RenderUrl:http://dev-staging.webshop.nlhttp://dev-staging.webshop.nl/en/mailing/producten-20-april/]
It appends the current URL to the page I have chosen.
You can chat with me on skype, my skype name is: florisrobbemont
What happens when you preview? I quess that URL is invalid? That should not work in any situation, test, preview or send out. I can't say why the root url (http://dev-staging.webshop.nl) is repeated....
Strage stuff...
Indeed, the preview fails with the following message:
The remote name could not be resolved: 'dev-staging.webshop.nlhttp'
I looks like there is two different problems.
Henrik - Your stuff works in preview but not when doing an accual send out
Floris - Your stuff never works?
Henrik
Do you have any custom render tasks? Have you changed the order in which the render tasks happens (in web.config)? How does your code look in the html-view of TinyMce?
Floris
This sounds lika some kind of javascript issue. When you pick something in the node-tree, does the display look currect there?
The href property on the nodes is:
javascript:openContent('{localLink:4980}|http://dev-staging.webshop.nl/en/brochures/|Brochures');
The double domainname is inserted to the Url box as wel
Floris, this sounds like a javascript bug but I can't reproduce it. In my enviroment the path in the href-property is relative yours are not relative. Is that due to the "use domain prefixes"?
Your resualt: {localLink:4980}|http://dev-staging.webshop.nl/en/brochures/|Brochures}
My resualt: {localLink:4980}|/en/brochures/|Brochures}
The javascript is inside this file if you want to play around:
/umbraco/newsletterstudio/pages/plugin/dialog.aspx
I'm going to try to reproduce and fix this asap.
Henrik: Are your problems due to the same bug?
I have this problem as well (at least, it looks the same).
The HTML view of the newsletter editor is
(not actually, but I can't put the real URL on here!)
Sending a test newsletter works perfectly, but I can't send to a mailing list (which only has my email address in at the moment). Unfortunately, I was demo-ing to the client when I found this out!
This is a demo version - I assume it doesn't need to be licenced in order to use the mailing list?
I am using version 1.2, which was installed over a previous version (1.1.2? ... sorry, can't remember).
I have this setup
Would that make any difference? The url shown on the node properties tab works fine, and is what is in the RenderUrl above.
Hi Gordan!
It seems like your problem is the same as Henrik. You do have the right url inside the tag but something breaks during send out. I guess i must has something to do with some render task that change your html-body before the renderurl task takes place. Could you help me and look inside your database and have a look at the HTML that are stored inside the nsNewsletter-table, is the [RenderUrl:yada yada] correct in there?
// Markus
Good news!
I've reproduced the bug and we're going to work hard to fix it asap.
// Markus
That is good news!! I am here ready to test the fix once you have it...
Gordon (and other interested), could you drop me an email at markus [at] enkelmedia.se and I'll provide you with a beta of version 1.2.2. Where currently corking on the mysql-support and will not ship the next stable version until that has been tested, but if you get the beta you could test it out in your enviroment - the beta should be stable if you runt sql server.
// m
is working on a reply...