.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

WebException , the remote name could not be resolved

Posted By:      Posted Date: September 06, 2010    Points: 0   Category :ASP.Net
I am working on  Smart Device Application, using web services in it.I am able to connect with web service, but when the response comes from the method that is called, i.e. dataset is returned. it throw this exceptionWebException , the remote name could not be resolvedif i test it on local machine, it works fine. but if i use web service from a remote PC, i got this exception.I have gone to many websites, each talking about this error, but i am not able to find any solution.....Please advice on this issue..Regards

View Complete Post

More Related Resource Links

SSRS 2008 - report manager: System.Net.WebException: Unable to connect to the remote server

I have an instance of Reporting Services 2008 running on Windows 2003 server.  So, the webservice URL is running on port 801, and runs fine (I can browse reports from that directory, and upload / deploy new reports and overwrite existing reports. Report manager is set to use port 800 (IIS is also on that machine running port 80).  When I attempt to connect to report manager, I get the following error, with a link to "Home" in report manager (which brings me back to the existing error page):    Unable to connect to the remote server  In the logfiles for reporting services, the following error is there: " System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it.   Any ideas? Windows Firewall is NOT running on this machine.   Thanks, Chrisrjp

System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketExcept


I have a scenario where there is a web service (WS2) which resides behind WSLX authentication. There is another web service (WS1) which is outside of this WSLX authentication. Now we have blackberry application which calls WS1 & send its login credentials which gets passed to WS2 & token is returned back to the blackberry app. For subsequent request the same token is passed in order to ensure that it is the same session. I have seen the similar error as mentioned below earlier in the log but now after migration to SQL 2005 from SQL 2000 this has become more frequent. The error is:


System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond     at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)     at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)     at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)    

System.Net.WebException: The remote server returned an error: (500) Internal Server Error.


I have written a web service and tested it and it works fine from the .asmx test page.

However, when I attempt to call it with a post I get this error: 

The remote server returned an error: (500) Internal Server Error.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.WebException: The remote server returned an error: (500) Internal Server Error.

Source Error:

Line 164:            myStream.Close()
Line 165:
Line 166:            Dim SomeResponse As WebResponse = XmlHttp.GetResponse()
Line 167:            Dim strm As Stream = SomeResponse.GetResponseStream()
Line 168:            Dim sr As StreamReader = New StreamReader(strm)

Source File: c:\inetpub\wwwroot\SCNet\App_Code\SCClientSvc.vb    Line: 166

Why does the test work fine but give a 500 error when I just try and get the response?

System.Net.WebException: The remote server returned an error: (401) Unauthorized.


Hi there,

I'm having a bit of trouble with the rss ticker web part from SP elements. The web part itself is fine because it displays a BBC feed properly but I keep getting this error when trying to display the xml file.

System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at SPElements.Utils.Helper.NetHelper.DownloadDataWeb(String link, ICredentials cred, IWebProxy webProxy)
at SPElements.Utils.Helper.NetHelper.DownloadData(String link, ICredentials cred, IWebProxy webProxy)
at SPElements.Utils.Rss.RssFeed.DownloadCurrentItemList()
at SPRssTicker.WebPartSPRssTicker.CreateChildControls()

I can open my xml page from the sharepoint server in IE (And from my own PC)  which displays it correctly but when I try to display  the xml using the same path using rss ticker I get the error.
If I save the xml file to a document library in sharepoint and point to that it works .
The application pool identity is set to Network Service, which has read, write and modify permissions on the file and containing folder.

We're running WSS 3.0 on Windows Server 2003


I'm not sure what else to try, any tips gratefully received.

WebClient: "The remote name could not be resolved"

"The remote name could not be resolved"


I am trying to use WebClient.DownloadData function. the URL I am trying to download from is a non-english charachters.

so, whenever I am trying to download the data I am getting  



Any suggestions?

How to Acess VSS from a remote Computer


i acess vss from lan with no problems and now i want acess from a remote computer not in a Lan

I need access over the Internet

What are settings i need to set up in the server and my client machine

VS2010 Professional .NET 4.0 Remote Debugging ASP Website Project


Trying to remote debug ASP website from VS2010 Pro to Windows Server 2003 machine.  Specifically, trying to debug a Web Service, but breakpoint says, "The breakpoint will not currently be hit. No symbols have been loaded for this document."  This happens for all compiled code though.  I have read this is due to missing PDB files and the work around is to manually copy them, as noted here.  Problem is, I cannot find any PDB files for my project, except referenced libraries, which I can remote debug.


  • web.config has <compilation debug="true">
  • Debugger is attached to wewp.exe process on remote server
  • Installed VS2010 remote debugger from DVD (as I can remote debug referenced libraries)

This is beyond frustrating.  I migrated my code from VS2008 .Net3.5 to VS2010 .Net4.0 to take advantage of the inherent multithreading framework.  Debugging works when using local host and was stable until deployment to test server.

Thanks in advance,


How do I preserve __viewstate between cross domain posts or how do I get a __viewstate of a Remote S


Here is what I want to do:
I have a local site in which I want to display data from a remote site
Lets say: I want to display data of http://www.abc.com/Default.aspx on my localhost

Now Default.aspx requires some post-data which it sends to itself. Thus the __viewstate and __eventvalidation are posted back to it by itself. I want to directly post the data to Default.aspx from localhost without opening Default.aspx and display the Default.aspx's response on my localhost.

The WebApp on http://www.abc.com is configured for __eventvalidation i.e. I cannot post-data to it from my localhost without getting a __viewstate from it. I also have to post the current __viewstate of http://www.abc.com/Default.aspx to itself

How can I accomplish it?

Security negotiation failed because the remote party did not send back a reply in a timely manner. T



Dear All i have created one simple service

like this

namespace WcfService2
        public class Service1 : IService1
        public string ShowEmpName(string strFirstName, string strLastName)
            return strFirstName + strLastName;

after executing in .net command promt i got 2 files

service.cs & output.config

after that i create one class file like this

namespace WcfService2
    public class clientcs

        static void Main(string[] args)
            Service1Client client = new Service1Client();
            string strResult = client.ShowEmpName("Pradeep", "Deokar");

Web Deployment with IIS settings of remote server


Im trying to deploy a web application project (VS 2010) via team build (TFS 2010), i got to use IIS settings of development server for deployment. So from the project properties I configured the web projects to use Custom web server, (enabled radio button), once i do this the Option in the tab Package/Publish Web "Include all IIS Settings as configured in IIS manager" gets disabled and as a result the deployed web project does not have this IIS settings.

What am I missing here, Im not using the option "Use local IIS Web Server" because the build happens in a build server and would try to take local IIS settings for packaging which is not present.

If this is not possible, suggest me any workaround. Any help on this is greatly appreciated.

Automatic Batch Printing in ReportViewer Remote Mode


Please help me, i have a properly working codes that is capable of the following:

1. Printing of Reports from ReportViewer without using the build-in print ICON in the actual ReportViewer. to view the working for the printing alone please click here.

2. Batch Printing by making a loop and placing a checkbox on the gridview where the needed paramerter (DataKeyNames ID) is retrieved then pass to the ReportViewer

This is my Code

foreach (GridViewRow row in GridView1.Rows)
            CheckBox chk = (CheckBox)row.FindControl("CheckBox2");
            if (chk.Checked)
                ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://TestServer/ReportServer");
                ReportViewer1.ServerReport.ReportPath = @"/Tavern/StudPaymentReport";
                ReportViewer1.ProcessingMode = ProcessingMode.Remote;
                ReportParameter[] rptParams = new ReportParameter[1];

                rptParams[0] = new ReportParameter("ClientID", GridView1.DataKeys[row.RowIndex].Value.ToString());


Toolbox: Static Analysis Database Tools, Managing Remote Computers, And More


If you want to apply static analysis to your databases, connect to remote computers, find out more about the Entity Framework, or just check into some cool podcasts for your daily commute, then you'll want to read more about these latest tools and resources.

Scott Mitchell

MSDN Magazine July 2009

Remoting: Managing the Lifetime of Remote .NET Objects with Leasing and Sponsorship


Leasing and sponsorship is the solution for managing the lifecycle of a remote object in .NET. Each object has a lease that prevents the local garbage collector from destroying it, and most distributed applications rely upon leasing. There are several ways in which objects and clients can extend the lease, including dedicated sponsor objects. In this article, the author explains leasing, shows how to configure it, and how it relates to the various remoting activation models. He then discusses design guidelines and options, along with their impact on throughput and performance. Additionally, he introduces a helper class used to automate the management of lease sponsors.

Juval Lowy

MSDN Magazine December 2003

Using Remote Data Access with SQL Server CE 2.0

Microsoft SQL Server CE edition is the database server built by Microsoft to run on mobile devices. Besides being a standalone database for mobile applications, SQL Server CE also allows you to connect to your desktop SQL Server 2000 and perform remote data access and merge replication. In this article, you will learn how to build a .NET Compact Framework mobile application using Visual Studio .NET 2003 and how it can perform remote data access using SQL Server CE 2.0.

For more information on .NET Compact Framework, see my previous article, "Developing Pocket PC Apps with SQL Server CE."
Features of SQL Server CE 2.0

Figure 1 shows the main components in SQL Server CE and its relationship to SQL Server 2000 (on the desktop).

An existing connection was forcibly closed by the remote host


I get this message when I try to launch a report (.rdl) from Windows Sharepoint 2007.  I have followed the steps to integrate SQL 2005 SP2 with Sharepoint 2007.  I can launch the report by navigating to "http://server:880/reportserver/.."  I am using a shared datasource that I created within sharepoint.  Any help would be appreciated.

How to Establish a Remote Web Site Connection in SharePoint Designer 2007


I am modifying a SharePoint site and so far so good.  Some of the objects were created using Visual Studio 2008 (C#).  I was able to modify these objects and implement them on the targete machine without issue.  The final step is to implement the ASPX pages that were modified using SharePoint Designer 2007.  These are aspx pages that are used to modify items in lists.  All the pages involved in this upgrade are customized.  I need to upgrade the target site with the modified version of these pages.  My intent is to copy the code from the page in the source site and past it into the same page on the target site.  I tried using the Remote Web Site connection tool in SharePoint Designer 2007 but received the following error message:

"Unable to open 'https://(site address)'.  Server Error:  Could not find a Web server at 'website'.  Please check to make sure that the Web server name is valid and your proxy settings are set correctly.  If you are sure that everything is correct, the Web server may be temporarily out of service."

I am not sure how to first check to see if the Web Server is temporarily out of service.  I would appreciate your input on how to verify this.

Background information of target machine:  WinServer 2008, IIS 7, Sharepoint (MOSS2007), site on port 80

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend