does elmah send errors to mail even if they got filtered ? - elmah

I have a web site mvc4 c# using elmah error logging. in my web config I declared email send on error from elmah and error filtering in code in global.asax :
void ErrorLog_Filtering(object sender, ExceptionFilterEventArgs e)
{
if (e.Exception.GetBaseException() is InvalidOperationException)
{
if (e.Exception.Message.StartsWith("The connection id is in the incorrect format"))
e.Dismiss();
}
}
when I go to my http://mydomain/elmah.axd I see no more errors that got filtered.
but I get them to mail.
i.e - if the application has error ""The connection id is in the incorrect format" ,I get notify on email by elmah, and I don't want to be notify ... is there a way to filter it also in mail notifications ?

I had the same issue. You have to define a second function to filter out the Emails separately. The signature of this function is:
void ErrorMail_Filtering(object sender, ExceptionFilterEventArgs e)
{
}
Calling e.Dismiss() within this method will prevent the Exception from being e-mailed.
See https://code.google.com/p/elmah/wiki/ErrorFiltering

Related

WhatsApp Business API not sending /message endpoint or test messages to phone

I've setup a WhatsApp Business to test their new WhatsApp API for sending messages. I've followed the getting started guide, but I'm running into an issue when trying to send a test message to my phone.
I tested sending messages using the test message call in the business settings as shown in the guide and I've created my own /messages call in Postman using a permanent token. Both calls return a 200 status, but neither of them actually sends a message to my phone.
To double check my setup, I added a colleagues phone to the setup and he receives the messages and can interact with my webhook via WhatsApp just fine.
Some posts on Stackoverflow mention having to send a message to the test number first, but I was unable to get this to work and my colleague didn't have to do this.
Is there some kind of setting or issue that could explain why I'm not receiving the messages? I've even tried re-installing WhatsApp and setting up my phonenumber again, but that didn't change anything either.
Updates:
I tried validating my phonenumber via the /contacts endpoint, but it keeps returning an auth error. Updating my token to include all Whatsapp permissions did not change this, whatsapp_business_api_data isn't an option to include.
{
"error": {
"message": "(#100) The parameter whatsapp_business_api_data is required.",
"type": "OAuthException",
"code": 100,
"fbtrace_id": ""
}
}
I noticed that my webhook included a status object in change.value.statuses.[0] this mentioned the following:
{ status: 'failed', errors: [{ code: 131000, title: 'Failure due to an internal error. Please retry.' }]}
Next I created a new app and added the Whatsapp integration, I added and validated my phonenumber via a text and tried to send a test messsage. This also doesn't start a conversation nor does it give me any feedback. If I try to add my phonenumber again, by adding it as another number, I cant and get the error Reason: VERIFIED
So it's not the best answer to the issue, but I got a new phonenumber to test this out on. I added it to my test numbers, validated the number, sent a test message to the new number and received it just fine.
I'm not sure if the issue was caused by a privacy setting or an issue on Facebook side, but the old number still doesn't receive the messages.
You can only send a template type message as your first message to a user.
From the error message, it looks like you're hitting the Graph API version lower than v12.0. Try with V12.0 and higher.
Also, it will be helpful if you can paste the response you get from your API request and in your Webhook.
I had the same error code but with a different message:
I fixed it by deleting the whatsapp number here and adding it again.
Check the company code. It should be prefixed.
{ "messaging_product": "whatsapp", "to": "91xxxxxxxx", "type": "template", "template": { "name": "hello_world", "language": { "code": "en_US" } } }
Some colleagues weren't receiving any messages.
In my case, the problem was that they haven't accepted the WhatsApp's Terms and Condition.
To accept the terms, they had to start a new conversation with the business.
A popup appears to review and accept the terms.
Once accepted, they received the messages without problem.
PS: I'm in Spain, maybe it's a European Union thing...
I got the same issue, resolved it by sending the message multiple times through the api in watsapp setup, getting started page. Also accepted the number in personal watsapp by allowing it to continue.

Issue with sending test email - Sitecore Email Campaign Manager 3.3

When I try to send test email(all templates except Plain Text) I see this error in the log:
ERROR Exception: System.Net.WebException
Message: The connection to the remote server can not be established.
Source: System
at System.Net.HttpWebRequest.GetResponse ()
at Sitecore.Modules.EmailCampaign.Core.WebContent.DownloadString (String url, Boolean useIisCredentials, String user agent)
nested exception
Exception: System.Net.Sockets.SocketException
Message: It could not be established because the target machine actively refused
When I test it with Plain Text message all works fine.
On the ecm.requestbody page I see this exception:
exception: The connection to the remote server can not be established.
    at System.Net.HttpWebRequest.GetResponse ()
    at ASP.sitecore_admin_ecm_requestbody_aspx.DownloadString (String url, Boolean useIisCredentials, String iisUser, String iisPass)
Fields IIS.User and IIS.Password in the file Sitecore.EmailExperience.Core.config is also filled
Check your Base URL setting on your EXM manager root - it should be the URL of your Sitecore instance.
More on manager roots here:
https://doc.sitecore.net/email_experience_manager/30/setting_up_exm/the_manager_root/the_manager_root_settings
If that doesn't fix your issue there's a good knowledge base article here:
https://kb.sitecore.net/articles/553662
It was a stupid issue with wrong hostname in my hosts(system32/driver/etc/hosts) file

Could not connect to host - try to setup connection from SAP to Magento

I need to setup a connection from SAP to Magento (unidirectional).
From the SAP part i get a wsdl file and a message (xml file with specific data) which is sent via SOAP. My problem is to receive the data which comes with the xml.
My attempt is to load the wsdl file, try to get a connection and load a delivered method.
You can see my attempts here:
$wsdl = 'url-to-the-wsdl.wsdl';
try {
$client = #new SOAPClient($wsdl);
$response = $client->method();
} catch (Exception $e) {
echo $e->getMessage();
}
die(var_dump($response));
The problem is I still get the error Message: Could not connect to host.
Honestly I'm still confused if this is the right way to get this done. If anyone could give me a hint that at least this part is correct so far I would be relieved. If not, any suggestions or tipps would be appreciated.

Links in EXM emails are broken for some users

We experience the following problem: when we send an email via EXM, links inside the email body doesn't work for some users.
Links inside email body are always converted by default to something like:
http://domainname/sitecore/RedirectUrlPage.aspx?ec_contact_id=xxxx84B137D2037C7D180&ec_message_id=xxxxB4CEAA3FD1A3B&ec_url=%2fthelinkpath
that is obviously done for tracking reasons.
However, some users experience 404 error when navigate the link. The Log always says the following:
ERROR EmailCampaign: Object reference not set to an instance of an object.
Exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: Sitecore.Analytics
at Sitecore.Analytics.Tracking.StandardSession.InitializePage(ICurrentPageContext currentPageContext, ICurrentPageContext oldPage)
at Sitecore.Analytics.Tracking.StandardSession.Identify(String userName)
at Sitecore.Modules.EmailCampaign.Core.Pipelines.RedirectUrl.IdentifyContact.Process(RedirectUrlPipelineArgs args)
at (Object , Object[] )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Modules.EmailCampaign.UI.RedirectUrlPage.HandleMessageEvent(ID messageId, ID contactId)
at Sitecore.Modules.EmailCampaign.UI.MessageEventPage.OnLoad(EventArgs e)
The only way to fix this error for the user is to clear his cookies or use another browser or use incognito mode. The user is currently logged out from the website.
Sitecore version 8.0 + EXM
Has anyone faced this problem before?
Indeed, this is because of cookies stored from previous sessions, thanks Tchami.
Sitecore Support answer was the same:
This error occurs when you open multiple mails with multiple
contactId's in the same browser.
But they didn't propose any solution except for clearing cookies or using another browser.
However, we don't want to break user experience even for this rarely appeared cases.
So, in order to handle the exception, we have found that the following pipeline processor should be rewritten:
<processor type ="Sitecore.Modules.EmailCampaign.Core.Pipelines.RedirectUrl.IdentifyContact, Sitecore.EmailCampaign" />
You can have a look at the code of custom processor here.

Not able to send mail from ColdFusion 10

In my application I am using ColdFusion 10. I am not able to send any mail using the cfmail tag.
When I log into the administrator and click on the Undelivered Mail button, it is throwing the following error:
Error retrieving markup for element mailBody : Client verification failure. [Enable debugging by adding 'cfdebug' to your URL parameters to see more information]
Error invoking CFC /CFIDE/administrator/mail/undeliveredmail.cfc : Client verification failure. [Enable debugging by adding 'cfdebug' to your URL parameters to see more information]
Can anyone tell me what is wrong?
It sounds like you have a bad CF installation. The admin should not be throwing errors, this looks like a permissions issue at first glance.
Have you tried setting all the params within the cfmail tag (eg, mailserver, username, pwd) instead of using the values set in CFadmin?
Do you get an error when you create a single CFM page with just a CFMAIL tag in it?
You need to ensure your CF install is up to date with all the hotfixes and that they are installed correctly.
see http://forums.adobe.com/thread/884947
or post the error message you are getting when you use your CFMAIL tag