Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Henrik Kulterud 9 posts 29 karma points
    Mar 26, 2012 @ 14:09
    Henrik Kulterud
    0

    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:

    [WebException: The remote server returned an error: (400) Bad Request.]
       System.Net.HttpWebRequest.GetResponse() +6038435
       NewsletterStudio.Helper.DownloadWebPage(String Url) +59
       NewsletterStudio.Services.RenderUrlRenderTask.GetNiceUrl(Match match) +56
       System.Text.RegularExpressions.RegexReplacement.Replace(MatchEvaluator evaluator, Regex regex, String input, Int32 count, Int32 startat) +198
       System.Text.RegularExpressions.Regex.Replace(String input, MatchEvaluator evaluator, Int32 count, Int32 startat) +33
       System.Text.RegularExpressions.Regex.Replace(String input, MatchEvaluator evaluator) +38
       NewsletterStudio.Services.RenderUrlRenderTask.ProcessPreRender(RenderResult renderResult, Newsletter newsletter) +84
       NewsletterStudio.Services.RenderEngine.PreRender() +141
       NewsletterStudio.Services.SendNewsLetterService.Start() +442
       NewsletterStudio.Pages.NewsletterSendout.ServiceStart() +399
       NewsletterStudio.Pages.NewsletterSendout.btnConfirm_Click(Object sender, EventArgs e) +828
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
       System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
    



    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

  • Markus Johansson 1925 posts 5832 karma points MVP 2x c-trib
    Mar 29, 2012 @ 05:52
    Markus Johansson
    0

    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

  • Henrik Kulterud 9 posts 29 karma points
    Apr 09, 2012 @ 15:09
    Henrik Kulterud
    0

    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

  • Markus Johansson 1925 posts 5832 karma points MVP 2x c-trib
    Apr 10, 2012 @ 11:31
    Markus Johansson
    0

    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?


  • Henrik Kulterud 9 posts 29 karma points
    Apr 12, 2012 @ 09:33
    Henrik Kulterud
    0

    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.

  • Markus Johansson 1925 posts 5832 karma points MVP 2x c-trib
    Apr 13, 2012 @ 08:45
    Markus Johansson
    0

    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

  • Floris Robbemont 57 posts 89 karma points c-trib
    Apr 18, 2012 @ 12:09
    Floris Robbemont
    0

    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

  • Markus Johansson 1925 posts 5832 karma points MVP 2x c-trib
    Apr 18, 2012 @ 21:17
    Markus Johansson
    0

    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

  • Markus Johansson 1925 posts 5832 karma points MVP 2x c-trib
    Apr 25, 2012 @ 17:56
    Markus Johansson
    0

    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?

     

  • Floris Robbemont 57 posts 89 karma points c-trib
    Apr 26, 2012 @ 09:33
    Floris Robbemont
    0

    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

  • Markus Johansson 1925 posts 5832 karma points MVP 2x c-trib
    Apr 26, 2012 @ 10:00
    Markus Johansson
    0

    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...

  • Floris Robbemont 57 posts 89 karma points c-trib
    Apr 26, 2012 @ 10:06
    Floris Robbemont
    0

    Indeed, the preview fails with the following message:

    The remote name could not be resolved: 'dev-staging.webshop.nlhttp'

  • Markus Johansson 1925 posts 5832 karma points MVP 2x c-trib
    Apr 26, 2012 @ 11:04
    Markus Johansson
    0

    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?

     



  • Floris Robbemont 57 posts 89 karma points c-trib
    Apr 26, 2012 @ 12:31
    Floris Robbemont
    0

    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

  • Markus Johansson 1925 posts 5832 karma points MVP 2x c-trib
    Apr 26, 2012 @ 12:44
    Markus Johansson
    0

    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?

  • Gordon Saxby 1453 posts 1874 karma points
    Apr 26, 2012 @ 16:52
    Gordon Saxby
    0

    I have this problem as well (at least, it looks the same).

    The HTML view of the newsletter editor is 

    <p>[RenderUrl:http://www.domain.com/newsletter-content/]</p>

    (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).

  • Gordon Saxby 1453 posts 1874 karma points
    Apr 26, 2012 @ 17:00
    Gordon Saxby
    0

    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.

     

  • Markus Johansson 1925 posts 5832 karma points MVP 2x c-trib
    Apr 26, 2012 @ 21:10
    Markus Johansson
    0

    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

  • Markus Johansson 1925 posts 5832 karma points MVP 2x c-trib
    Apr 26, 2012 @ 21:15
    Markus Johansson
    0

    Good news!

    I've reproduced the bug and we're going to work hard to fix it asap.

    // Markus

  • Gordon Saxby 1453 posts 1874 karma points
    Apr 27, 2012 @ 10:12
    Gordon Saxby
    0

    That is good news!! I am here ready to test the fix once you have it...

  • Markus Johansson 1925 posts 5832 karma points MVP 2x c-trib
    Apr 27, 2012 @ 10:33
    Markus Johansson
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft