English 中文(简体)
The remote name could not be resolved: twitter.com problem
原标题:

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

问题回答

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

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.

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





相关问题
Getting all twitter followers using twitterizer

I am using Twitterizer 2. in general it does the job very well, but I have one thing missing. I need to get all the followers of my user. and the method brings Twitterizer.TwitterFriendship.Followers(...

how to test a twitter api on your local machine

i am using twitterizer to have a web front end to twitter data. I m trying to figure out how i can test on a localmachine when you have to put in a valid public callback url in your application ...

Twitterizer API Questions

I ve recently been playing around with the awesome Twitterizer Twitter API using C# WPF in Visual Studio 2008. It s been working the most part, but I do have some questions about it. 1) How can I ...

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

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 ...

热门标签