Welcome Guest Search | Active Topics | Sign In | Register

ASP_0219_:_80004005|Invalid_LCID Options
George Brockman
Posted: Sunday, July 29, 2012 3:52:52 PM
Rank: Newbie
Groups: Member

Joined: 7/28/2012
Posts: 2
I am getting the error message "ASP_0219_:_80004005|Invalid_LCID" when I pull a page that works when run directly - into the HTML to PDF using EO.PDF tool. The message is from the weblogs, the client code merely says ~500 error from web server~.

After researching, I believe the issue is from a lack of "culture" information passed to the web server from the tool. The page in question is one with several calls to format currency and dates based on "current culture" from the client (a british user would see dates one way, while US would another).

How do I either pass culture settings like a normal brower would OR configure my server to a default culture (not my preference). I would rather pass the info that assign a default.

Or am I completely misdiagnosing the issue.

Thx
eo_support
Posted: Sunday, July 29, 2012 6:19:57 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

You can specify the language by adding an additional header. For example, the following code will pull the Danish Google site:


Code: C#
//Set the language to "da" --- danish
HtmlToPdf.Options.AdditionalHeaders = new string[]
{
    "Accept-Language: da",
};

//Now run the converter, this will pull the Danish Google homepage
HtmlToPdf.ConvertUrl("www.google.com", "danish_google_homepage.pdf");

You can find the complete language code list here:

http://www.w3schools.com/tags/ref_language_codes.asp

Hope this helps. Please let us know if this works for you.

Thanks!
George Brockman
Posted: Monday, July 30, 2012 12:36:23 AM
Rank: Newbie
Groups: Member

Joined: 7/28/2012
Posts: 2
Thank you, but I am afraid it did not. I get the same response.
eo_support
Posted: Monday, July 30, 2012 7:24:09 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

In that case you may want to look into your code and see what it is looking for. Accept-Language is the "standard" way of passing the browser's language preference. Of course, if it is looking for something else, then you need to pass it something else --- the bottom line is whatever you need you just pass it through AdditionalHeaders. If you do not know the corresponding header entry that your code is looking for, try to create a small test app/page to demonstrate the problem and we will find it out for you.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.