Category: Troubleshooting

Crystal Reports Problem With an Arabic Letter

I’m a part of the team developing a web (ASP.NET) project used by a number of customers in the Middle East. We use Crystal Reports for reporting purposes, and for the most part, it works great. However, from time to time, we run into some issues related to CR support for Arabic language.

Couple of days ago, I got to deal with a problem regarding a report that worked perfectly for several months. The report is used on daily basis by our clients and it was odd that the problem would occur now, since nothing has been changed in neither Crystal Reports file, nor the data filling it.

The issue was strange, since for some data, the report would be displayed as usual, and for the other, some characters (e.g. all zeroes in the document) were replaced with ProblemArabic1symbol. So, for example, this is how the date was shown in pdf file:

ProblemArabic

To make the issue even stranger, when that same date was copied to the clipboard and pasted into notepad, this was the result:

25-08-2014 

To my surprise, the date was there, just not properly displayed!

I was banging my head against the wall trying to understand why this was happening, until I found out that ProblemArabic1is actually a diacritic in Arabic. Then I thought the problem might have something to do with a specific letter contained in the file. Further investigation led me to alif tanwin (اً), which is basically letter alif (ا) with the tanwin diacritic. Now, I don’t speak Arabic, but I was told that alif can be used without tanwin, and that it won’t change the word meaning. After replacing اً with ا, everything started working fine!

I couldn’t find much help on the Internet, except for some forum posts stating the same thing – that the replacement should be made. Other than that, as for why the issue occurs, and is there a way to fix it, I didn’t get the answer. If anyone can shed some light on the issue, I would be grateful! :)

GMail, GoDaddy and Me Giving Up

In one of my previous posts, I have explained how to send mail through GMail using ASP.NET C#. Well, for me it all looked good until I wanted to upload the application to GoDaddy server. I have Windows hosting plan there, and wanted to set the app for test purposes on it.

I’ve uploaded to GoDaddy both the application and the Web service I use to send mail. In service Web.config, the settings were something like this:

<system.net>
    <mailSettings>
        <smtp from="TEST" >
            <network host="smtp.gmail.com" port="587" userName="someuser@gmail.com" password="somepassword" defaultCredentials="false" />
        </smtp>
    </mailSettings>
</system.net>

But, I received the error message:
System.Web.Services.Protocols.SoapException: Server was unable to process request. —> System.Configuration.ConfigurationErrorsException: Insufficient permissions for setting the configuration property ‘port’.

So, I’ve Googled the exception in ‘GoDaddy context’ and learned that you can’t send e-mail through Gmail account using GoDaddy servers. Apparently, they want to prevent using their servers for sending spam. But, it wasn’t all so easy to understand it since I found some (for me) pretty vague answers. At first, I was convinced that you CAN send e-mails through GMail, because I found posts explaining how – but it just didn’t work for me! I even spoke to some friends who were sure this was working some time ago, when they needed to set up mail sending on GoDaddy. I tried several different configurations, but kept getting exceptions, different from the one I mentioned here.

Hours and hours later, I finally decided to give up on trying to use GMail. After all, this was all supposed to be just for testing. (When I make release version, I will buy ‘proper’ hosting.) I’ve created new e-mail account on my domain (also hosted on GoDaddy). I found out that, if you have the shared hosting plan, you must use their relay-hosting.secureserver.net on port 25. It’s important to say that this server doesn’t support SSL. So, in C# code, instead of

mailClient.EnableSsl = true;

it should be:

mailClient.EnableSsl = false;

In Web.config, the configuration will now be:

<system.net>
    <mailSettings>
      <smtp from="TEST" >
        <network host="relay-hosting.secureserver.net" port="25" userName="someuser@yourdomain" password="somepassword" defaultCredentials="false" />
      </smtp>
    </mailSettings>
  </system.net>

Make sure to use the e-mail from your domain as sender, not the GMail! Also, set both username and password! I’ve found couple of comments from GoDaddy support team, explicitely saying you DON’T have to use credentials when configuring relay-hosting.secureserver.net. However, I couldn’t make it all work until I’ve set both username and password.

I must say that it took me a while to figure this out. I haven’t even thought of contacting GoDaddy support since I’ve been doing it a lot in last couple of months on various subjects and I’m pretty much tired of their responses ‘within 12 hours’. This is my first time trying to send mail from their server and it was all new to me, but I’ve discovered that this is a well known problem.

Hope this post will help people not to waste their precious time on a configuration issue like this.