Discussion:
MAPPOINT WEB SERVICE v 4.5 SDK / " A connection attempt failed " error
(too old to reply)
p***@gmail.com
2008-09-27 14:22:46 UTC
Permalink
Hi,

Plz help..
i have used the commonservice clas in my VS 2005 / ASP.NET 2.0 /c#
env.
buf am getting the follow. error?
cud anybody from this group help me to sort out this issue??
i am having an mappoint acount , and credentials have been verified
via CSS site.

//////////////******************error
******///////////////////////////////

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)
////////////////////////
this is my code
///////

{
GMD3net.mappoint.staging.CommonServiceSoap commonService =
new CommonServiceSoap();

try
{

string mpusrname =
ConfigurationManager.AppSettings["mpusrname"].ToString();
string mppwd =
ConfigurationManager.AppSettings["mppwd"].ToString();
NetworkCredential nc = new NetworkCredential(mpusrname,
mppwd, "Partners");
commonService.Credentials = nc;

int[] entityIDs = new int[1];
entityIDs[0] = 244;


//Declare the return variable, call the service, and
//output the name of the found CountryRegion
CountryRegionInfo[] myCountryRegionInfos;
myCountryRegionInfos =
commonService.GetCountryRegionInfo(entityIDs);
Response.Write(myCountryRegionInfos[0].FriendlyName);

}
catch (Exception exps)
{
Response.Write(exps.InnerException);
}


any help is highly appreciated...
Derek Chan
2008-10-01 15:29:01 UTC
Permalink
Hi,

Have you tried disabling your firewall (if you are behind one)? You could
also try removing the web reference and rebuilding it again in vs 2005 to see
if that works. If you are getting the "error: 200/400 Bad request" error
that occurs only in vs 2005 when adding web reference you can try downloading
the .wsdl and manually referencing it from your local copy.

Hope that helps,
--
Infusion Development
http://www.infusion.com
Post by p***@gmail.com
Hi,
Plz help..
i have used the commonservice clas in my VS 2005 / ASP.NET 2.0 /c#
env.
buf am getting the follow. error?
cud anybody from this group help me to sort out this issue??
i am having an mappoint acount , and credentials have been verified
via CSS site.
//////////////******************error
******///////////////////////////////
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)
////////////////////////
this is my code
///////
{
GMD3net.mappoint.staging.CommonServiceSoap commonService =
new CommonServiceSoap();
try
{
string mpusrname =
ConfigurationManager.AppSettings["mpusrname"].ToString();
string mppwd =
ConfigurationManager.AppSettings["mppwd"].ToString();
NetworkCredential nc = new NetworkCredential(mpusrname,
mppwd, "Partners");
commonService.Credentials = nc;
int[] entityIDs = new int[1];
entityIDs[0] = 244;
//Declare the return variable, call the service, and
//output the name of the found CountryRegion
CountryRegionInfo[] myCountryRegionInfos;
myCountryRegionInfos =
commonService.GetCountryRegionInfo(entityIDs);
Response.Write(myCountryRegionInfos[0].FriendlyName);
}
catch (Exception exps)
{
Response.Write(exps.InnerException);
}
any help is highly appreciated...
Loading...