ASP Hosting sale!
Double disk space and transfer for FREE!
Limited time offer! Act Now!

aspdev | articles | tutorials | forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

underlying connection was closed:unable to connect to remote

 
Post new topic   Reply to topic    ASPdev.org Forum Index -> .NET Programming (ASP.NET, VB.NET, C#)
View previous topic :: View next topic  
Author Message
beachbum714



Joined: 02 Feb 2006
Posts: 2

PostPosted: Thu Feb 02, 2006 2:40 pm    Post subject: underlying connection was closed:unable to connect to remote Reply with quote

I have been receiving this exception for over a week with a .NET remoting app and can't find a solution anywhere that works. Below I'll paste my config files and the client code calling the remote method. I'd really appreciate some assistance. The Server code and files are on a remote server within our facility and have been told more than once there is no firewall between my workstation and it. So firewalls are out of the question as the source of the problem. I assume its somewhere in my config files but I've tried everything I've seen on the net.

I receive the Net.WebException: underlying connection was closed:unable to connect to remote server exception message.

Any thoughts?



--------------------------------------------------------------------------------


client config:



<?xml version="1.0" encoding="utf-8" ?>

<configuration>

<system.runtime.remoting>

<application>


<!-- <channels>

<channel ref="http" port="1234" />

<channel ref="http" port="1235" />

</channels> -->


<client url="http://agiledev2.sanmina-sci.com/DataExtractService">

<wellknown type="AgileExtractNegotiator.ITNSManager, AgileExtractNegotiator"

url="http://agiledev2.sanmina-sci.com:1234/DataExtractService/TNSManager.soap" />

<wellknown type="AgileExtractNegotiator.IDataExtractManager, AgileExtractNegotiator"

url="http://agiledev2.sanmina-sci.com:1234/DataExtractService/DataExtractManager.soap" />

</client>

<channels>

<channel ref="http" />

</channels>

</application>

// <customErrors mode="off"/>

</system.runtime.remoting>

</configuration>




--------------------------------------------------------------------------------


server config:



<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application>
<channels>
<channel ref="http" port="1234"/>
</channels>
<lifetime leaseTimeout="20M"
renewOnCallTime="20M"
leaseManagerPollTime="3M" />
<service>
<WellKnown mode="SingleCall"
type="DataExtractServer.DataExtractManager, DataExtractServer"
objectUri="DataExtractManager.soap" />
<WellKnown mode="SingleCall"
type="DataExtractServer.TNSManager, DataExtractServer"
objectUri="TNSManager.soap" />
</service>
</application>
<customErrors mode="Off" />
</system.runtime.remoting>
</configuration>



--------------------------------------------------------------------------------


client code:

Dim app As Windows.Forms.Application

Dim rc As RemotingConfiguration

Dim strConfigFile As String = app.StartupPath.Trim & "\DataExtractLogin.exe.config"

rc.Configure(strConfigFile.Trim)

rc.CustomErrorsEnabled(False)

Dim rh As RemotingHelper = New RemotingHelper

Dim tnsm As ITNSManager = CType(rh.GetObject(GetType(ITNSManager)), ITNSManager)

Dim props As IDictionary = ChannelServices.GetChannelSinkProperties(tnsm)

props("username") = "*********"

props("password") = "********"

Dim TNS As TNSGeneral = New TNSGeneral

Try

TNS = tnsm.GetTNSInfo

Catch rEx As RemotingException

MessageBox.Show("Remoting Exception: " & rEx.Message.Trim, _

"Remoting Service Error", MessageBoxButtons.OK, MessageBoxIcon.Stop, _

MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification)

Exit Sub

Catch argEx As ArgumentException

MessageBox.Show("Exception: " & argEx.Message.Trim & argEx.InnerException.Message)

Exit Sub

Catch aEx As ApplicationException

MessageBox.Show("Exception: " & aEx.Message.Trim & aEx.InnerException.Message)

Exit Sub

Catch nrEx As NullReferenceException

MessageBox.Show("Exception: " & nrEx.Message.Trim & nrEx.InnerException.Message)

Exit Sub

Catch nwEx As Net.WebException

MessageBox.Show("Net Web Exception: " & nwEx.Message.Trim)

Exit Sub

Catch Ex As Exception

MessageBox.Show("Exception: " & Ex.Message.Trim & Ex.InnerException.Message)

Exit Sub

End Try
Back to top
View user's profile Send private message
paul



Joined: 11 Oct 2004
Posts: 128

PostPosted: Thu Feb 02, 2006 2:53 pm    Post subject: Reply with quote

Is your local machine behind a proxy server? Check the post below, it might help you solve your problem:

http://p2p.wrox.com/topic.asp?TOPIC_ID=4858&whichpage=1




Paul
_________________
World Countries | Survival Skills
Back to top
View user's profile Send private message
beachbum714



Joined: 02 Feb 2006
Posts: 2

PostPosted: Thu Feb 02, 2006 3:03 pm    Post subject: Reply with quote

paul

no its on our internal network. there's no firewall nor proxy between my workstation and the server. thanks for responding.
Back to top
View user's profile Send private message
paul



Joined: 11 Oct 2004
Posts: 128

PostPosted: Thu Feb 02, 2006 4:13 pm    Post subject: Reply with quote

I don't have much experience with .NET remoting and I won't be able to help you Sad. You can try the the asp.net forums - http://forums.asp.net/



Paul
_________________
World Countries | Survival Skills
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ASPdev.org Forum Index -> .NET Programming (ASP.NET, VB.NET, C#) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group

SQL Tutorial