Rich Mail URL Error

Rich Mail URL Error

  
Hello



I´m having an error when trying to send an html email with images. the error is on RichMailCreate URL variable assigned with "http://192.168.10.197/inc/RichMailViewIncidentURL.aspx".


It catch this exception "The remote server returned an error: (404) Not Found."



when I try to access to this page from the server everything goes OK.



if the URL variable is empty it works but without images...

Message:
The remote server returned an error: (404) Not Found.
Stack:
at System.Net.HttpWebRequest.GetResponse()
at OutSystems.NssRichMail.CssRichMail.MssHttpBinaryGet(String ssUrl, String& ssContentType, Byte[]& ssContent)
at OutSystems.NssRichMail.CssRichMail.MssRichMailCreate(String ssFrom, String ssTo, String ssCc, String ssBcc, String ssContentType, String ssCharset, String ssSubject, String ssBody, Boolean ssBodyIsHtml, String ssUrl, Boolean ssIncludeImages, String ssInReplyTo, String& ssBoundary, String& ssMail)
at ssinc.RssExtensionRichMail.MssRichMailCreate(HeContext heContext, String inParamFrom, String inParamTo, String inParamCc, String inParamBcc, String inParamContentType, String inParamCharset, String inParamSubject, String inParamBody, Boolean inParamBodyIsHtml, String inParamUrl, Boolean inParamInlineImages, String inParamInReplyTo, String& outParamBoundary, String& outParamMail)
at ssinc.Actions.UserActionSendMail(HeContext heContext, String inParamIn_To, String inParamIn_Subject, Boolean& outParamOut_Fail, String inParamIn_Body, String inParamUrl, Boolean inParamIsHtml, Int32 inParamIncident_Id)

Hi Diogo,

please try to use "http://localhost/inc/RichMailViewIncidentURL.aspx" in the URL parameter.

If it doesn't work, let me know.
Cheers,
Lúcio Ferrão
Hi Diogo

The 404 error usually really means that the file you're retrieving is not there. However, since you use the same URL in the web browser and it works, this means the file exists.

Checkout the IIS logs in order to determine the exact URL request and response code for both request. in order to do that execute the following procedure:

1. Use the application flow that uses RichMail to get the page through the specified URL
2. Then, access the server where the RichMail application is running and open a web browser. In that web browser access the same URL
3. Finally, get to the server were the URL points to, and access the IIS Logs file in the default folder C:\Windows\System32\logfiles\W3SVC*. If you have more than one W3SVC* directories, for each one of them look for the log file correspondent to the same time interval. Find your page requests in the files and post them in here: you should find the request done by the RichMail extension, and the request done by the Web Browser.

Checkout any differences, of client IP, URL and response code.

Thanks

Cheers
2008-05-23 15:30:14 W3SVC1 192.168.10.197 GET /inc/RichMailViewIncidentURL.aspx Incident_Id=17&Code=A5B85BCA8CC6FBFE3161D6E817D2CF00&Feedback=State%20Transition%20From%20Waiting%20Schedule%20To%20In%20Resolution%0D%0A(Q:%20Would%20You%20Like%20To%20Shedule%20The%20Incident%20Resolution%20?%0D%0A%20A:%20No) 80 - 192.168.10.197 RichMail+(OutSystems+Platform) 200 0 0
2008-05-23 15:30:14 W3SVC1 192.168.10.197 GET /inc/web.css - 80 - 192.168.10.197 RichMail+(OutSystems+Platform) 200 0 0
2008-05-23 15:30:14 W3SVC1 192.168.10.197 GET /inc/_image.aspx/Icone/Data/0/ - 80 - 192.168.10.197 RichMail+(OutSystems+Platform) 404 0 0
2008-05-23 15:30:14 W3SVC1 192.168.10.197 GET /inc/RichMailViewIncidentURL.aspx Incident_Id=16&Code=95711C295ECA388FB087AE9E271E0835&Feedback=State%20Transition%20From%20Waiting%20For%20Technician%20To%20In%20Attribution%0D%0A(Q:%20Is%20Incident%20Well%20Assigned?%0D%0A%20A:%20No) 80 - 192.168.10.197 RichMail+(OutSystems+Platform) 200 0 0
2008-05-23 15:30:14 W3SVC1 192.168.10.197 GET /inc/web.css - 80 - 192.168.10.197 RichMail+(OutSystems+Platform) 200 0 0
2008-05-23 15:30:14 W3SVC1 192.168.10.197 GET /inc/_image.aspx/Icone/Data/0/ - 80 - 192.168.10.197 RichMail+(OutSystems+Platform) 404 0 0
2008-05-23 15:30:14 W3SVC1 192.168.10.197 GET /inc/RichMailViewIncidentURL.aspx Incident_Id=11&Code=AD44725A74DF0D3D7C340F9C04E971D7&Feedback=State%20Transition%20From%20Waiting%20Schedule%20To%20In%20Resolution%0D%0A(Q:%20Would%20You%20Like%20To%20Shedule%20The%20Incident%20Resolution%20?%0D%0A%20A:%20No) 80 - 192.168.10.197 RichMail+(OutSystems+Platform) 200 0 0
2008-05-23 15:30:14 W3SVC1 192.168.10.197 GET /inc/web.css - 80 - 192.168.10.197 RichMail+(OutSystems+Platform) 200 0 0
2008-05-23 15:30:14 W3SVC1 192.168.10.197 GET /inc/_image.aspx/Icone/Data/0/ - 80 - 192.168.10.197 RichMail+(OutSystems+Platform) 404 0 0




2008-05-23 15:36:40 W3SVC1 192.168.10.197 GET /inc/RichMailViewIncidentURL.aspx - 80 - 192.168.10.197 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+3.0.04506.648) 200 0 0
2008-05-23 15:36:40 W3SVC1 192.168.10.197 GET /inc/web.css - 80 - 192.168.10.197 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+3.0.04506.648) 304 0 0
2008-05-23 15:36:40 W3SVC1 192.168.10.197 GET /inc/_OSGlobalJS.js - 80 - 192.168.10.197 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+3.0.04506.648) 304 0 0
2008-05-23 15:36:40 W3SVC1 192.168.10.197 GET /inc/_osvalidators.js - 80 - 192.168.10.197 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+3.0.04506.648) 304 0 0
2008-05-23 15:36:40 W3SVC1 192.168.10.197 GET /inc/img/EmailHeader.jpg - 80 - 192.168.10.197 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+3.0.04506.648) 304 0 0
2008-05-23 15:36:40 W3SVC1 192.168.10.197 GET /ServiceCenter/img/logo_smaller.gif - 80 - 192.168.10.197 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+3.0.04506.648) 304 0 0
2008-05-23 15:36:40 W3SVC1 192.168.10.197 GET /inc/img/Header_Background.jpg - 80 - 192.168.10.197 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+3.0.04506.648) 304 0 0
2008-05-23 15:36:40 W3SVC1 192.168.10.197 GET /inc/_image.aspx/Icone/Data/0/sss - 80 - 192.168.10.197 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+3.0.04506.648) 404 0 0


2008-05-23 15:38:44 W3SVC1 192.168.10.197 GET /inc/RichMailViewIncidentURL.aspx Incident_Id=16&Code=95711C295ECA388FB087AE9E271E0835&Feedback=Attribuition%20to%20Paulo%20Figueiredo&IsTechnician=True 80 - 192.168.10.197 RichMail+(OutSystems+Platform) 200 0 0
2008-05-23 15:38:44 W3SVC1 127.0.0.1 POST /inc/diogo_nesbitt/_debugger.asmx wsdl 80 - 127.0.0.1 SOAP+Toolkit+3.0 200 0 0
2008-05-23 15:38:44 W3SVC1 127.0.0.1 POST /inc/diogo_nesbitt/_debugger.asmx wsdl 80 - 127.0.0.1 SOAP+Toolkit+3.0 200 0 0
2008-05-23 15:38:44 W3SVC1 127.0.0.1 POST /inc/diogo_nesbitt/_debugger.asmx wsdl 80 - 127.0.0.1 SOAP+Toolkit+3.0 200 0 0
2008-05-23 15:38:44 W3SVC1 127.0.0.1 POST /inc/diogo_nesbitt/_debugger.asmx wsdl 80 - 127.0.0.1 SOAP+Toolkit+3.0 200 0 0


any ideas?
Hi Diogo

Thanks for the logs.

Do you see the 404 log for the request /inc/_image.aspx/Icone/Data/0/?

This is a database image HTTP request, for the icone entity, Data column. However, the ID is 0. That's why the HTTP Get is returning a 404 error for the image, and it returns back to the entire request.

From the logs, this also happens in the Web Browser, but instead of getting a full 404 error page, you'll just get a broken image link instead.

Check your application and make sure there can't be no IconeId equal to 0. Don't forget that richmail HTTP Get is sessionless.

Hope this information is helpful

Cheers