简体   繁体   中英

Web application: site works on IDE and not on a public server

I have an old site that I left a few months ago and it worked fine, but I decided not to upload it to a real server because I wasn't sure at the time if it was worth it.

Now I have finally decided what I want to do, so I uploaded the site to a free public server but I get an error that I don't get while launching that site with Visual Studio 2010.

This is the link for one of the pages:

http://aspspider.org/thesamy3/MainPages/AluminumPage.aspx

Where you see the error there is supposed to be an iFrame that shows a photo gallery that I get from Flicker with the Flicker.Net API.

Any ideas why this could have happened now?

[WebException: The remote name could not be resolved: 'api.flickr.com']

Your web host does not allow you to connect to other servers.

Does your webserver have a firewall that prevents it from connecting to remote resources?

Looks like it can't reach api.flickr.com .

You can write a test page that does a simple request to test:

// Create a new 'Uri' object with the specified string.
Uri myUri =new Uri("http://www.contoso.com");
// Create a new request to the above mentioned URL.    
WebRequest myWebRequest= WebRequest.Create(myUri);
// Assign the response object of 'WebRequest' to a 'WebResponse' variable.
WebResponse myWebResponse= myWebRequest.GetResponse();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM