473,395 Members | 1,637 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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..
TcpServerChannel tcp1 = new TcpServerChannel(49157);
ChannelServices.RegisterChannel(tcp1);
RemotingConfiguration.RegisterWellKnownServiceType (typeof(RemotableClass.DbConnect),"DbConnect",Well KnownObjectMode.SingleCall);

Here is my client code...
TcpClientChannel tcpClient = new TcpClientChannel();
ChannelServices.RegisterChannel(tcpClient);

RemotingConfiguration.RegisterWellKnownClientType( typeof(DbConnect),"tcp://10.236.230.117:49157/DbConnect");

Here is my remotable object...

public class DbConnect : MarshalByRefObject
{
public DataSet ExecuteQuery(string strQuery)
{
Console.Write("Starting to execute " +
"the query...");
// Create a SqlCommand object
// to represent the query
sqlConn.Open();
SqlCommand sqlcmd =
sqlConn.CreateCommand();
sqlcmd.Connection = sqlConn;
sqlcmd.CommandType = CommandType.Text;
sqlcmd.CommandText = strQuery;
// Create a SqlDataAdapter object
// to talk to the database
SqlDataAdapter sqlda = new SqlDataAdapter();
sqlda.SelectCommand = sqlcmd;
// Create a DataSet to hold the results
DataSet ds = new DataSet();
try
{
// Fill the DataSet
sqlda.Fill(ds, "Results");
}
catch (Exception ex)
{
Console.WriteLine(ex.Message,
"Error executing query");
}
Console.WriteLine("Done.");
return ds;

}}

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

Nov 19 '05 #1
1 987
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*@discussions.microsoft.com> wrote in message
news:59**********************************@microsof t.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..
TcpServerChannel tcp1 = new TcpServerChannel(49157);
ChannelServices.RegisterChannel(tcp1);
RemotingConfiguration.RegisterWellKnownServiceType (typeof(RemotableClass.DbConnect),"DbConnect",Well KnownObjectMode.SingleCall);

Here is my client code...
TcpClientChannel tcpClient = new TcpClientChannel();
ChannelServices.RegisterChannel(tcpClient);

RemotingConfiguration.RegisterWellKnownClientType( typeof(DbConnect),"tcp://10.236.230.117:49157/DbConnect");

Here is my remotable object...

public class DbConnect : MarshalByRefObject
{
public DataSet ExecuteQuery(string strQuery)
{
Console.Write("Starting to execute " +
"the query...");
// Create a SqlCommand object
// to represent the query
sqlConn.Open();
SqlCommand sqlcmd =
sqlConn.CreateCommand();
sqlcmd.Connection = sqlConn;
sqlcmd.CommandType = CommandType.Text;
sqlcmd.CommandText = strQuery;
// Create a SqlDataAdapter object
// to talk to the database
SqlDataAdapter sqlda = new SqlDataAdapter();
sqlda.SelectCommand = sqlcmd;
// Create a DataSet to hold the results
DataSet ds = new DataSet();
try
{
// Fill the DataSet
sqlda.Fill(ds, "Results");
}
catch (Exception ex)
{
Console.WriteLine(ex.Message,
"Error executing query");
}
Console.WriteLine("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
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"...
0
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...
8
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...
4
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...
0
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...
15
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...
5
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...
4
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...
0
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. ...
0
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);...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.