Web service name resolving error when attempting to call a web method

I have a website that calls an interal login web method at webservice.mycompany.local/login.asmx

Every once in a while I get the following error:

System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Net.WebException: The remote name could not be resolved: 'webservice.mycompany.local'

Sometimes just trying the call over and over again will not work and I have to wait about 10 minutes for the name to be resolved, or if I go to the server and do an "ipconfig /flushdns" it usually fixes this issue.

 Any idea what is going on? I've experienced this problem in another intranet environment as well and can't seem to figure it out. I'm don't want to have to resort to changing all of the web references in my code to a hard-coded IP address. Thanks

0
tribune
6/29/2007 4:31:36 PM
asp.net.xml-web-services 7071 articles. 0 followers. Follow

7 Replies
709 Views

Similar Articles

[PageSpeed] 42

You shouldn't have to change your code to use an IP address.  Instead, change the computer/server to use a static IP Address.  This way, it will always have the same IP, and DNS update lags wouldn't affect you.


---------------------------------------
MCP - Web Based Client Development .NET 2.0
0
ps2goat
6/29/2007 4:43:45 PM

The server hosts both the asp.net website and the web service and has a static IP. The server also runs the DNS service. It doesnt' make sense why the website can't resolve the name to the web service...

0
tribune
6/29/2007 5:02:40 PM

What is the first dns server listed for the server?  It should list itself as the primary DNS, as it holds all the information for domain machines (i.e., mypc.mydomain.local).  Set the primary DNS to 127.0.0.1, to tell the PC to ask itself where things are, then set the Alternate DNS server to your gateway (or whatever else you may have acting as a bridge between the two).

 


---------------------------------------
MCP - Web Based Client Development .NET 2.0
0
ps2goat
6/29/2007 5:16:38 PM

The server already lists one of its own externally routable IP addresses as its DNS server. The alternate DNS IP is 4.2.2.2. Why would changing the primary DNS server to 127.0.0.1 help if the current IP 70.182.etc is already assigned to the machine? Thanks

0
tribune
6/29/2007 5:23:15 PM

127.0.0.1 is just a loop back address.  I'm not saying it's any better than using the actual IP of the machine, just giving you the suggestion of making the computer look internally for the file.

One other problem you may be having (since you said "one of its own externally...IP addresses") could be IIS configuration (this is deployed, right?).  In IIS, you can assign a specific IP address to handle web resources, and if only one is assigned, that could be your problem. 

If your server has 3 IP addresses, and you attempt to connect to the web resource with any IP other than what IIS is set up to handle, you won't be able to access the resource.  I'm not sure if using a loop back address would be any better at handling this or not, but you could try.

If IIS is your problem, open it up and right-click your website, choose 'Properties'.  Click the 'Web Site' tab, and at the top is a dropdown list labeled "IP address:".  If this shows a specific IP, that could be a problem. You can either a) select "[All Unassigned]" from the dropdown list, or click the "Advanced" button and add the rest of your IP addresses to the table.

 

Let me know if this helps.


---------------------------------------
MCP - Web Based Client Development .NET 2.0
0
ps2goat
6/29/2007 5:55:53 PM

ps2goat,

 

Yes these services are deployed in a live environment. The web service is configured to [All Unassigned] IP addresses with the host header webservices.mydomain.com, which is correct.

 Again, this problem is intermittent so I dont think the IIS properties for the IP address are the issue. The server has about 6 IP addresses. and the web service URL resolves to an IP assigned to the machine.

 I've searched and searched online and have only found a few other reports of this issue, however, I do know that one of my IT buddies had the same problem and he created a complex workaround to do an IPconfig /flushdns from the asp.net application itself when it detects this error, but I would rather resolve the problem at its source.

 Here is another person who is encountering the same issue:

 

http://geekswithblogs.net/mnf/archive/2006/08/14/87859.aspx

0
tribune
6/29/2007 6:43:11 PM

Here is some more info that may help out:

 The server has 6 ip addresses...70.etc.etc.etc

One of those 70 addresses is the primary dns, the secondary dns is 4.2.2.2

 The web service name is in the format webservices.companyname.local, which the DNS server resolves to 10.10.10.2, the internal IP of the machine hosting the web service/website, and DNS.

The webservices record in webservices.companyname.local is a CNAME that points to the A record "mybox" which is 10.10.10.2.

I'll go ahead and try the 127.0.0.1 suggestion. Please let me know if you have any more thoughts on this issue. Thanks so much for your replies, I appreciate it!

0
tribune
6/29/2007 6:50:53 PM
Reply:

Similar Artilces:

How to call a .net web service from another .net web service?
Hi all,I have developed two asp .net web services using visual studio .net 2003.I wish to call one web service from another web service.I tried adding a web reference of the web service in another web service and was able to do so.but i m not able to access the web methods provided by the web servicecould you please suggest a way to go about itExpecting quick replyThanxCharmy try to make sure that you reference it in the web reference and call it properly this is sample  [WebMethod()] public double CalcDistance(int x1, int y1, int x2, int y2) { Calculator.Service1 calc = new...

Calling a Web Service from a Web Service
Hello,I was looking for some feedback on calling a web service from within a web service. I've heard that it's not good practice (or not possible). I have a scenario where I think it might make some sense.Within our infrastructure, we've created a web service that handles incoming updates on the statuses of all processes. This has proven to be a good thing since it allows applications to communicate across server to make status updates. It's also used by third party developers and applications to communicate with our infrastructure.Along these lines ... we are planning to create a new compon...

asynchronous call of web service method from another web service
I am calling a web service method from within another web service.  Both are called asyncrhonously. Webservice 1 is invokde from a consumer app and its completed event is assigned an event handler, this works ok  The webservice being called is itself invoking another webservice and asynchronously calling another web method, again Ive assigned an event handler to its completed event, which works.  My problem is how do i expose the ouput (a dataset) of the second web method to the first web method ? Hi, Please have a look at this article: http://msdn2.microsoft.com/en-us/li...

REST Web Service : How to call a web service method by REST way ?
Hi buddy,Can anyone tell me that how do i call a method through a web service by a REST way.I have one local application (with C#.NET, ASP.NET 2.0, SQL Server 2005) and I want to call a Web Service method which is created on a remote machine. I have to call that method from my web application by using a REST (Representational State Transfer) way. I have a WSDL file.Please provide me technical details to make this happen.I want exact code to achieve this.Please please its urgent....Thanks in advance.Thanks,Mitesh.Please Mark this as an Answer if it resolves your problem. Which Version of .n...

xml web service --uploading the file to the xml web service
how can we upload the file in the xml web service 1.i mean what will be the return value in the proxy class 2.and how am i going to send the file to the xml web service----regards Bipul Kumar Here are some links to articles that helped us get this done: http://msdn.microsoft.com/webservices http://www.microsoft.com/downloads/details.aspx?familyid=06255a94-2635-4d29-a90c-28b282993a41&displaylang=en https://www.sys-con.com/dotnet/article.cfm?id=458 Hope this helps....

Web service in .NET from Java Web Service
Hi there,I'm pretty new to .net (although i have years of experience with the old vb 6, access 2k, as well as java)... and need some with perhaps either some syntax or something.Here is the wsdl.<wsdl:definitions targetNamespace="http://www.dynix.com/schema/book">−<wsdl:types>−<schema targetNamespace="GetBookInfoByISBN">−<complexType name="BookInfoType">−<sequence><element maxOccurs="1" minOccurs="0" name="Title" nillable="true" type="xsd:string"/><element maxOccurs=&quo...

Can you call a web service from a web service?
I am trying to create a web service that itself consumes a 3rd party web service outside of our corporate firewall - so basically a web service consuming another web service.  I can consume this outside web service directly in an ASP.NET application without a problem.  But because the code is long and cumbersome, I wanted to provide our GUI developers an easy way to get all of the data they need from one source.  So I thought I could create an internal web service that would do a lot of things (query internal systems, for example) as well as consuming this external service.&nb...

Ajax error calling Web Service from Web Application Project vs Web Site
I am implementing the code from the Asp.Net Ajax Video Demo “How Do I: Make Client-Side Network Callbacks with ASP.NET AJAX?”  The Web page is generating a javascript error (‘SimpleService’ is undefined) and is unable to recognize the Web service.  The downloaded examples work, however I have created the Demo (both the page and the web service) in a Web Application Project, rather than a Web Site.  The demo uses a Web site.  Because of this the page does not recognize the Web service. To ask the question another way: What needs to be done differently in a Web Service...

How i create web services & call web services?
Give me the solution of how i create webservices & call it and what is purpose of web services ?? PlsGuree  >how i create webservicesVery much the same as creating a new web site site - it is just a different project type. > & call it andAdd a web reference to an existing project to consume the web service.>what is purpose of web services ??To send and receive data.Don't forget to click "Mark as Answer" on the post that helped you.This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped. &...

When creatign a web service how do you specify the Web Service Name?
Well when I create a web service it always defaults to the name WebReference, which I think is the default if no Web Service Name is provided. But when I use other people's web services there is another name there, so there has to be a way to provide a name so no default WebReference will be used. How do you do that? Actually I think there is no way, because it takes it after the URL. So if you have a web service from a place like so http://www.webservices.com then the WebRefrence chosen by Visual Studio will be com.webservices.www I'm not sure what you are asking, but you can rena...

.NET web services Vs Java Web Services
Hello, does anyone know of a book or good source of information that compares .NET and Java Web Services? (I would like soemthing neutral if possible). I am thinking of approaching this subject for my dissertation? Many Thanks Rob Hi Rob, Last year I had to give a powepoint presentation on Web Services. I noticed some good books at barnes and noble that discussed the subject. These books were specific to Java and discussed Web Services in a very clear fashion. They gave some elementary examples that were easy to understand. I have not yet had the pleasure of creatin .NET Web Servi...

Web Site Project: How to configure web service URL in web.config (web service defined in a referenced DLL)
I have a web site that references a business logic DLL project. In the business logic project, there is a web service defined in its app.config file something like this: <applicationSettings>  <MyNamespace.BLL.Properties.Settings>    <setting name="MyNamespace_BLL_MyServer_ServiceName" serializeAs="String">    <value>http://blah.blah.blah.asmx</value>  </setting>  </MyNamespace.BLL.Properties.Settings></applicationSettings> When the web site is published, the web ...

DynamicPopulateExtender: Web Service call failed: 12152, Web Service call failed: 12031
Hi, I'm using a DynamicPopulateExtender to take the value of a SELECT dropdown and pass it to an onpage web service (defined with <System.Web.Services.WebMethod()> _ '<System.Web.Script.Services.ScriptMethod()>) and as PUBLIC SHARED FUNCTION myfunction(contextKey as string) as string. The function returns the html for a listbox. Everything seems to fire properly on the client but when the web service is called by the Javascript function, I get Web Service call failed: 12152 or Web Service call failed: 12031 Any pointers would be appreciated.  Do...

Xml file mapper using Web Service
Hi all, I am tasked with creating a web service that maps a number of files to a relational database.  I have a good idea of how I might do this but need to make sure that a list of files get mapped to the database or else they are all rolled back.  Here is the scenario of what should happen. 1. Call an initializing method with the list of files to process as a parameter 2. This method would return a unique identifier to the caller 3. Everytime the caller calls a mapping function also pass the identifier as a parameter 4. If a mapping function fails call a rollback function wit...

Web resources about - Web service name resolving error when attempting to call a web method - asp.net.xml-web-services

Facebook Seeks Detailed Information From Users Attempting To Block Or Report Other Users
Facebook continued down the path of seeking more information when users report potentially troublesome situations, following up its dialog box ...

Texas Tribune - "I was attempting to block a bill that... - Facebook
"I was attempting to block a bill that would have harmed thousands of women across the state of Texas,” Davis said of her filibuster. “Never ...

Video of Sen. Wendy Davis Attempting to put on Back-Brace During Filibuster - YouTube
If state Sen. Wendy Davis, D-Fort Worth, is charged with one more violation of the filibuster rules, her attempt to talk Senate Bill 5 to death ...

Two arrested attempting to smuggle heroin into the UAE
Two of the 'most active and dangerous' drug smugglers in the UAE were arrested in April in possession of 55 kilograms of heroin by a team of ...

Mother of woman attempting to flee ISIL says she is now at 'great risk'
The family of notorious Islamic State fighter Khaled Sharrouf is seeking to return to Sydney, according to a report.

Attempting to procure a murder charge against AC/DC drummer Phil Rudd withdrawn
AC/DC drummer Phil Rudd's charge of attempting to procure a murder has been withdrawn.

Eight teenage girls arrested after attempting to rob woman in Shellharbour
Eight teenage girls have been arrested after a 19-year-old woman was threatened with a knife at a bus stop in the NSW Illawarra region.

Andrew Davidson arrested after attempting to have sex with drinks trolley
... was ever a reason to quit alcohol, it's this. A 25-year-old Scottish man has been arrested after making a complete fool of himself while attempting ...

Abbott, Attempting To Order Coffee, Declares The Boats Have Stopped.
Prime Minister Tony Abbott has been at the forefront of a ruckus this morning during an incident in which Mr. Abbott was attempting to order ...

Islamic State recruit lived in Sydney before attempting to travel to Syria
Asher Abid Khan was restless and living in Sydney when he began researching ways to travel to Syria or Iraq to join terror group Islamic State, ...

Resources last updated: 11/22/2015 9:27:42 AM