C# Windows application call web service error "Unable to connect to the remote server"
When I write a c# windows application try to call a web service which is running on my local machine.
In Visual Studio 2005, in Solution Explorer, I right click reference --> add web reference....
I input URL at text box like this" http://localhost:82/cuahsi_1_0.asmx",
then I hit GO button, I got following error message:
There was an error downloading 'http://localhost:82/cuahsi_1_0.asmx'.
Unable to connect to the remote server
An attempt was made to access a socket in a way forbidden by its access permissions
Lots of you may got the same problem as mine,
I got the solution to this by replacing "localhost" by my machine name.
The correct URL should be like this ( ling is my machine name, you should replace it by your machine name)
http://ling:82/cuahsi_1_0.asmx
Success!!!
--------------------编程问答-------------------- 英文。。 --------------------编程问答-------------------- 都是很好的建议! 值得学习 --------------------编程问答--------------------
补充:.NET技术 , Web Services