I have a webservice which is created in C# and we have integrated that webservice into a Website.
We have published that website too.
Now the problem is when we call this webservice from some browsers it will work, but when we call it from some it doesnt.
Mainly what I figured out was...
On machines which was having a internal Proxy(LAN) connected to Internet it was not working. But on Normal machines connected to internet it was working.
Another issue was Mozilla throwing error and IE and Chrome doesnt had any issue in calling the Service.
But the machine on Which the website is hosted doesnt have any kind of Proxy settings or any thing and the website works fine with some machines also..
WebRequest.DefaultWebProxy = new WebProxy("http://yourproxyserver:80/",true);
You can try checking the 'Automatically detect settings' (Tools-> Internet Options->Connections->LAN settings) for local area network (LAN) settings and doesn't use proxy server, and see whether it runs fine.
smilu.net
Member
157 Points
84 Posts
Problem in calling Webservices remotely
Feb 12, 2012 10:16 AM|LINK
I have a webservice which is created in C# and we have integrated that webservice into a Website.
We have published that website too.
Now the problem is when we call this webservice from some browsers it will work, but when we call it from some it doesnt.
Mainly what I figured out was...
On machines which was having a internal Proxy(LAN) connected to Internet it was not working. But on Normal machines connected to internet it was working.
Another issue was Mozilla throwing error and IE and Chrome doesnt had any issue in calling the Service.
But the machine on Which the website is hosted doesnt have any kind of Proxy settings or any thing and the website works fine with some machines also..
Why it is behaving like this?
Has anyone come across problems like this.
Kindly let me know if you have any solution
Peter pi - M...
Star
12871 Points
1786 Posts
Re: Problem in calling Webservices remotely
Feb 14, 2012 01:26 AM|LINK
Hi,
If you need to access web service through a proxy server, then add the following to your web.config.
For example:
<system.net> <defaultProxy> <proxy proxyaddress="http://yourproxyserver:80" /> </defaultProxy> </system.net>You can also do it by using code in your program.
WebRequest.DefaultWebProxy = new WebProxy("http://yourproxyserver:80/",true);You can try checking the 'Automatically detect settings' (Tools-> Internet Options->Connections->LAN settings) for local area network (LAN) settings and doesn't use proxy server, and see whether it runs fine.
Regards,
Peter
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework