473,811 Members | 2,851 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

remoting error

AVL
Hi,
I'm getting the following message.when trying to connect to the server from
my client...

"No connection could be made as the server refused it".

Here is my serverside code..
TcpServerChanne l tcp1 = new TcpServerChanne l(49157);
ChannelServices .RegisterChanne l(tcp1);
RemotingConfigu ration.Register WellKnownServic eType(typeof(Re motableClass.Db Connect),"DbCon nect",WellKnown ObjectMode.Sing leCall);

Here is my client code...
TcpClientChanne l tcpClient = new TcpClientChanne l();
ChannelServices .RegisterChanne l(tcpClient);

RemotingConfigu ration.Register WellKnownClient Type(typeof(DbC onnect),"tcp://10.236.230.117: 49157/DbConnect");

Here is my remotable object...

public class DbConnect : MarshalByRefObj ect
{
public DataSet ExecuteQuery(st ring strQuery)
{
Console.Write(" Starting to execute " +
"the query...");
// Create a SqlCommand object
// to represent the query
sqlConn.Open();
SqlCommand sqlcmd =
sqlConn.CreateC ommand();
sqlcmd.Connecti on = sqlConn;
sqlcmd.CommandT ype = CommandType.Tex t;
sqlcmd.CommandT ext = strQuery;
// Create a SqlDataAdapter object
// to talk to the database
SqlDataAdapter sqlda = new SqlDataAdapter( );
sqlda.SelectCom mand = sqlcmd;
// Create a DataSet to hold the results
DataSet ds = new DataSet();
try
{
// Fill the DataSet
sqlda.Fill(ds, "Results");
}
catch (Exception ex)
{
Console.WriteLi ne(ex.Message,
"Error executing query");
}
Console.WriteLi ne("Done.");
return ds;

}}

Can anyone help me out.???????/ it's urgent......... ..

Nov 19 '05 #1
1 995
Does the server have a firewall installed? ie. Is the port you are using
open?

--
- Paul Glavich
MVP ASP.NET
http://weblogs.asp.net/pglavich
ASPInsiders member - http://www.aspinsiders.com
"AVL" <AV*@discussion s.microsoft.com > wrote in message
news:59******** *************** ***********@mic rosoft.com...
Hi,
I'm getting the following message.when trying to connect to the server
from
my client...

"No connection could be made as the server refused it".

Here is my serverside code..
TcpServerChanne l tcp1 = new TcpServerChanne l(49157);
ChannelServices .RegisterChanne l(tcp1);
RemotingConfigu ration.Register WellKnownServic eType(typeof(Re motableClass.Db Connect),"DbCon nect",WellKnown ObjectMode.Sing leCall);

Here is my client code...
TcpClientChanne l tcpClient = new TcpClientChanne l();
ChannelServices .RegisterChanne l(tcpClient);

RemotingConfigu ration.Register WellKnownClient Type(typeof(DbC onnect),"tcp://10.236.230.117: 49157/DbConnect");

Here is my remotable object...

public class DbConnect : MarshalByRefObj ect
{
public DataSet ExecuteQuery(st ring strQuery)
{
Console.Write(" Starting to execute " +
"the query...");
// Create a SqlCommand object
// to represent the query
sqlConn.Open();
SqlCommand sqlcmd =
sqlConn.CreateC ommand();
sqlcmd.Connecti on = sqlConn;
sqlcmd.CommandT ype = CommandType.Tex t;
sqlcmd.CommandT ext = strQuery;
// Create a SqlDataAdapter object
// to talk to the database
SqlDataAdapter sqlda = new SqlDataAdapter( );
sqlda.SelectCom mand = sqlcmd;
// Create a DataSet to hold the results
DataSet ds = new DataSet();
try
{
// Fill the DataSet
sqlda.Fill(ds, "Results");
}
catch (Exception ex)
{
Console.WriteLi ne(ex.Message,
"Error executing query");
}
Console.WriteLi ne("Done.");
return ds;

}}

Can anyone help me out.???????/ it's urgent......... ..

Nov 19 '05 #2

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

Similar topics

15
3999
by: anders | last post by:
Hi! I have a config file that looks like this: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.runtime.remoting> <application> <service> <wellknown mode="SingleCall" type="Interfaces, IMyFirstRemotableObj" objectUri="ControlCenter" /> </service>
0
3296
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool including SourceOffSite, SourceAnyWhere and VSS Remoting This article makes a detailed comparison among SourceAnyWhere, SourceOffSite, VSS Remoting and possible others.
8
2701
by: Richard Bell | last post by:
I have a class in a seperate dll which I want to remote. I have referenced the class and registered it using a simple exe. I can connect to the class's interface using Activator.GetObject and call it's methods. However, when I use soapsuds to extract meta data, I get the following error: Error: Unable to retrieve schema from url: http://localhost:1234/RemoteObject.soap?WSDL, The remote server returned an error: (500) Internal Server...
4
3120
by: Uchiha Jax | last post by:
Hello everyone, I am a plenty silly person who is trying to learn .NET remoting through trial and error (all articles I read are going over my head at the moment (mostly) so I thought i'd give it a go). What I want to do is this: Have a server instance of the program, this server instance will receive communication from client programs (as demonstrated in the AddMessage()
0
2465
by: Martijn Damen | last post by:
Hi, At the moment I am trying to develop an application that uses another app over .net remoting and having some problems with it (ok, that is ofcourse why I am here), hope somebody can shine a light on the following: I have been given a sample winforms app, which works without problem, I can connect, send queries and become response from the other application. When I try to implement this in webforms, this unfortunately does not...
15
2418
by: Ron L | last post by:
We are working on a distributed VB.Net application which will access a SQL database located on a known server. Each client will run on the user's local machine. To implement this, we are trying to use remoting for our access to the SQL server, with the remoting being via IIS. Since all of our users will have accounts in the destination domain, we want to have IIS handle the security for us and not allow anonymous. We have set this up...
5
1917
by: LGHummel | last post by:
I'm trying to host a remoting app in IIS and am getting the following error: Failed to execute the request because the ASP.NET process identity does not have read permissions to the global assembly cache. Error: 0x80070005 Access is denied. I tried adding ASPNET to the Administrators group with no success. The error is preceded by the following warning:
4
2268
by: Sharon | last post by:
Hi, I'm using the remoting, and I have a remoting object that has a public event that other processes should register to it. But when the client process is registering to the remote event, it throw the following exception: System.Runtime.Serialization.SerializationException {“Cannot find the assembly Tester, Version=1.0.2164.27180, Culture=neutral, PublicKeyToken=null.”}
0
755
by: Kirk | last post by:
I'm trying to use a Web Service to be a Remoting client of an existing ..NET 2.0 server. But I get the following error when I try to use System.Runtime.Remoting.Channels.Http in my WebService. The same code works fine in a standalone app. I have inspected System.Runtime.Remoting.dll with ildasm, and I can see the ....Channels.Http namespace there. I verified that the virtual directory is configured to use v2.0.50727 (the error message...
0
3406
by: Kristian Reukauff | last post by:
Hi I have a problem with the .Net-Securty-Functions. I've got a client and a server. When I try to register a channel at the server with this line: ChannelServices.RegisterChannel(chan, false); I get the following error - doesn't matter if I try it local from my machine or from a remote machine. (After the Errormessage is more text ;))
0
9722
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
10124
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
9200
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 projectplanning, coding, testing, and deploymentwithout 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...
1
7664
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6882
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
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...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
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.