0

I started to use twitterizer API for my blog. I post my tweet from my cms system. I get this error

The remote name could not be resolved: 'twitter.com'

In the .cs file my code goes here

Twitter t = new Twitter("emrekiyak", "*****"); t.Status.Update(textbox1.Text);

and web.config configuration is that :

< trust level="Medium" originUrl="https?://(www.)?twitter.com/.+"/ >

How can i solve this problem.

Thank you all

3 Answers3

0

I had this problem recently with a desktop application which accesses the Twitter API and it was api.twitter.com which could not be resolved. The application was created with Visual C# on Vista. The problem is intermittent, and when it occurs, the Vista machine cannot ping api.twitter.com. A Mac sitting next to the Vista machine had no problem so I concluded that it must be a Vista bug. I thought the solution would be to just put the IP address in the Vista hosts file so I pinged again on the Mac to get the IP address. I noticed that pinging api.twitter.com yielded several different IP addresses, and it is clear that the DNS system couldn't possibly follow that, and I couldn't see how the Mac was able to handle that. Probably the only final solution is to dump Windows and develop on the Mac with Java, but this doesn't seem to help your problem with ASP.NET.

Hal
  • 1
0

Try updating your web.config entry to: <trust level="Medium" originUrl="https?://(www.|api.)?twitter.com/.+" />

In the newer versions of the framework, we've changed the domain name used (at Twitter's documentation), but I've not updated the article on the code project.

Also, if you need help, you'll get a faster answer from me if you post your question on our mailing list.

Ricky
Founder
Twitterizer

Ricky Smith
  • 2,379
  • 1
  • 13
  • 29
0

The error message indicates that your server cannot resolve the DNS entry for that host. Make sure that your server is configured correctly and can resolve 'api.twitter.com' in dns. Also, verify that no proxy is used/needed. If you need a proxy, you can specify setting in the server's internet settings, or by providing a default proxy element in your web.config.

Here is the docs for the proxy settings in your application config: http://msdn.microsoft.com/en-us/library/kd3cf2ex.aspx

Ricky Smith
  • 2,379
  • 1
  • 13
  • 29