货币转换器有时停止工作!解决这个问题 [英] currency convertor some times stop working! solve this problem

查看:76
本文介绍了货币转换器有时停止工作!解决这个问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

远程服务器返回错误:(503)服务器不可用。



第40行:Dim url As String = String.Format(http:// www .google.com / ig / calculator?hl = en&q = {2} {0}%3D%3F {1},fromCurrency.ToUpper(),toCurrency.ToUpper(),amount)

第41行:昏暗的响应因为String = web.DownloadString(url)





指导我如何解决这个问题,我有一个货币转换器。 www.abbasiandcompany.com/currencyconvertor.aspx

The remote server returned an error: (503) Server Unavailable.

Line 40: Dim url As String = String.Format("http://www.google.com/ig/calculator?hl=en&q={2}{0}%3D%3F{1}", fromCurrency.ToUpper(), toCurrency.ToUpper(), amount)
Line 41: Dim response As String = web.DownloadString(url)


guide me how can I solve this problem, I have a currency convertor. www.abbasiandcompany.com/currencyconvertor.aspx

推荐答案

确保您始终拥有有效的互联网连接!



在web.DownloadString(url)周围试一试,并在catch部分显示服务不可用等消息。



当使用像谷歌这样的第三方服务时,由于缺少互联网连接而无法以任何其他方式解决问题
Make sure that you have an active internet connection at all times!

Put a try/catch around "web.DownloadString(url)" and show a message like "Service not available" in the catch part.

When using a 3rd party service like Google you cannot solve the problem in any other way when it''s not available because of missing internet connection


这是一个你可能无法解决的问题: a href =http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html>这里的解释 [ ^ ]。
That is a problem you probably cannot solve: an explanation here[^].


这篇关于货币转换器有时停止工作!解决这个问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆