0

Whenever I try to access a website from my ASP.NET application, using the System.Net.WebClient.DownloadString method or even using HtmlAgilityPack to read HTML code from a different website, I come across an issue.

The information I receive is based on my globalization settings (e.g country and language of the site being displayed).

I am trying to force a globalization for the English language and USD currency for every website I will be accessing through my application.

So far I came up with the next configuration within my web.config file:

<globalization
           fileEncoding="utf-8"
           requestEncoding="utf-8"
           responseEncoding="utf-8"
           culture="en-US"
           uiCulture="en-US"
        />

Sadly it does not seem to do the trick.

Also, setting the 'AcceptLanguage' header doesn't work either.

Any suggestions?

Tommy Naidich
  • 752
  • 1
  • 5
  • 23

0 Answers0