473,625 Members | 3,249 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Test Web Method from remote machine from browser

Hello,
I have a webservice(call ed MyService) which exposes one method(called
MyMethod)
On the local machine, it can be tested by accessing
http://MyServerName/MySite/MyService.asmx/MyMethod

But it doesn't work if I access the above one from a remote machine. IS
there any setting I can change in the web.config to make it work remotely?

Thanks,
Jan 17 '06 #1
2 7562
This should work remotely straight off. Is the remote machine on a domain? Or
are they home networked? If they're home networked then the name of the
machine may not be translated to an IP Address by a DNS server.

Have you tried: http://192.168.2.1/MySite/MyService.asmx
(where 192.168.2.1 is the IP address of MyServerName)

What happens if you visit the above? Do you get any page displaying or an
error message?

If you get an error message what is the error message? It could be that for
the virtual directory, it's somehow become configured to allow traffic only
from a specific IP Address range, along the same lines the WebSite may have
only been configured to received HTTP requests on a particular IP Address
(127.0.0.1 / localhost) instead of "All unassigned IP Addresses".

If you could give me some more information regarding the above then I may be
able to help further.

Hope the suggestions help anyway.

--
Kurt Farrar
..NET Developer & Computer Enthusiast

"Jazz" wrote:
Hello,
I have a webservice(call ed MyService) which exposes one method(called
MyMethod)
On the local machine, it can be tested by accessing
http://MyServerName/MySite/MyService.asmx/MyMethod

But it doesn't work if I access the above one from a remote machine. IS
there any setting I can change in the web.config to make it work remotely?

Thanks,

Jan 19 '06 #2
The most common reason is that on a remote server ASP.Net Webservice allows
only SOAP calls. To access your webservice from another machine on your
domain Add the following to your

Web.config to enable response to Http calls

<webServices>

<protocols>

<add name="HttpGet"/>

<add name="HttpPost"/>

</protocols>

</webServices>

Hope this helps

"Jazz" <Ja**@discussio ns.microsoft.co m> wrote in message
news:ED******** *************** ***********@mic rosoft.com...
Hello,
I have a webservice(call ed MyService) which exposes one method(called
MyMethod)
On the local machine, it can be tested by accessing
http://MyServerName/MySite/MyService.asmx/MyMethod

But it doesn't work if I access the above one from a remote machine. IS
there any setting I can change in the web.config to make it work remotely?

Thanks,

Feb 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
993
by: jinu | last post by:
hello I am developing a vb.net application in my machine and need to test the program in a remote machine. I now use to upload the BIN directory fully to the remote machine and test the exe there. But if can know what all files in the bin directory other than the exe which is necessary to make the exe run in a remote machine, i can save uploading time. Please tell me what all dlls and other files necessary to make the exe run
0
1890
by: Just D. | last post by:
Does anybody knows the solution if this problem? If we wrote the ASPX page and send the request to the remote browser the remote client browser returns the remote machine IP using by this machine on the remote LAN, but the remote router of this LAN substitutes the LAN address by the correct external, public one and we receive the correct public IP of the remote network. I want to get the same IP using the remote Windows Application, not...
1
3320
by: monsteruk | last post by:
Hi, Seems like a few people are having debug problems, mine seems subtley different though! I have a win2003 svr with my c# ASP.NET web site running all ok. I have setup all the permissions and installed the "full" remote debugger on the server. I then open the project using "File, Open, Project from web". All works fine, using "built-in" version control, all my files appear no problem.
3
1460
by: Just D. | last post by:
I know that writing ASPX app we easily can get all required information about remote machine and network right from the user's browser using this request: NameValueCollection coll = Request.ServerVariables; But what if we write a Web Service? What can we do in this case? How can we get the remote machine IP and the HostName for example? Do we have any way that can be used from the Web Service for that? I know that I probably can get...
1
2635
by: david | last post by:
Wehen locally access it, the browser can show me the test form for the Webmethod. But when I access it from remote machine, I get: The test form is only available for requests from the local machine ------------------------ readTextFromFile Open, read the file, and return it as a string Test The test form is only available for requests from the local machine.
5
5742
by: felecha | last post by:
I have a VB.Net application that runs as a Windows Service and monitors a MessageQueue on another machine. At times that machine will have to be rebooted, so I've been working on how to get my Service to re-establish the connection after the remote machine is back. I found that as soon as the remote machine goes down, the BeginReceive() method and the ReceiveCompleted() event handler start throwing an exception, for QueueNotAvailable,...
4
4806
by: Abhi | last post by:
Hi All, I have a web service method which works fine when called from my local machine i.e. from localhost but when I publish the web services to a remote machine it throws an invalid cast soap exception. That web service method access Active Directory to get the group names for the given user. Following is the code. DirectorySearcher dirSearcher = new DirectorySearcher();
3
5459
by: Ing. Davide Piras | last post by:
Hi there, I use Visual Studio 2005, c# projects... I like the new unit test framework very much, it helps a lot mantaining and growing up a project with the test driven paradigm, that's so good! I'm looking for a way to detect if the program is running under the TEST enviroment or running normally, let's say I need something like #if TESTING
0
4610
by: mina | last post by:
My application which is written in vb.net 2005 uses sql server 2005 express as a database, this application is multi-user. So i am used 3 xp machine to install my application i can say machine1,machine2 ,machine3 on which i have install my application. On machine1 i also install SQL Server 2005 express. Then run mu application from machine1 which is locally its work fine. But i am facing problem when i am trying to connect from the...
0
8189
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8694
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8635
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8497
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7184
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4089
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2621
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1500
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.