Click here to Skip to main content
16,005,181 members
Home / Discussions / C#
   

C#

 
Questionhow to clear only few rows from a datagrid Pin
samithas14-Jul-04 21:34
samithas14-Jul-04 21:34 
AnswerRe: how to clear only few rows from a datagrid Pin
exhaulted14-Jul-04 22:28
exhaulted14-Jul-04 22:28 
Generalreverse Pin
sreejith ss nair14-Jul-04 21:14
sreejith ss nair14-Jul-04 21:14 
GeneralRe: reverse Pin
Syed Abdul Khader14-Jul-04 23:40
Syed Abdul Khader14-Jul-04 23:40 
Generalreverse-engineered Pin
sreejith ss nair14-Jul-04 21:13
sreejith ss nair14-Jul-04 21:13 
GeneralRe: reverse-engineered Pin
Alexandru Savescu14-Jul-04 21:56
Alexandru Savescu14-Jul-04 21:56 
Generalactive directory user password Pin
vcorn14-Jul-04 21:10
vcorn14-Jul-04 21:10 
GeneralFile Transfer using .NET Remoting Pin
joelwu14-Jul-04 19:34
joelwu14-Jul-04 19:34 
How I can transfer a file from the host to the client using .NET Remoting?

I try the following but not success.

Server Code:
static void Main(string[] args)
{
HttpChannel chnl = new HttpChannel(1403);
ChannelServices.RegisterChannel(chnl);

RemotingConfiguration.RegisterWellKnownServiceType(
typeof(ObjectCreation), "ObjectCreation.soap", WellKnownObjectMode.Singleton);

Console.WriteLine("Press key to terminate server");
Console.ReadLine();


}
public override object getAssembly()
{
string fileEntries = AppDomain.CurrentDomain.BaseDirectory + "HelloWorldClass.doc" ;

return LoadBinary(fileEntries);
}


private object LoadBinary(string Path)
{
object tAsm;
FileStream fs = new FileStream(Path,FileMode.Open,FileAccess.Read);
BinaryFormatter bf = new BinaryFormatter();

tAsm = bf.Deserialize(fs);
fs.Close();
return (object)tAsm;

}


Client Code:
private void cmdConnect_Click(object sender, System.EventArgs e)
{
ChannelServices.RegisterChannel(chnl);
obj = (BaseRemoteObject) Activator.GetObject(typeof(BaseRemoteObject),
"http://localhost:1403/ObjectCreation.soap");
MessageBox.Show("Channel to Server has connected");
}

private void cmdCallClass_Click(object sender, System.EventArgs e)
{


string fileEntries = AppDomain.CurrentDomain.BaseDirectory + "HelloWorldClass.dll" ;
object tAsm = obj.getAssembly();
FileStream fs = new FileStream(fileEntries,FileMode.Create,FileAccess.Write);
BinaryFormatter bf = new BinaryFormatter();



try
{

bf.Serialize(fs,tAsm);
fs.Close();
}
catch (Exception err)
{
MessageBox.Show(err.Message);
}

lAss = Assembly.LoadFrom(fileEntries);

Type[] FrmType = lAss.GetTypes();
foreach (Type typ in FrmType)
{
object lObj = Activator.CreateInstance(typ);
MethodInfo mi = typ.GetMethod("HelloWorld");
mi.Invoke(lObj , null);

}

}
GeneralMethodology for Switch based on an object Pin
Shayne Husson14-Jul-04 18:14
Shayne Husson14-Jul-04 18:14 
GeneralRe: Methodology for Switch based on an object Pin
exhaulted14-Jul-04 22:17
exhaulted14-Jul-04 22:17 
GeneralRe: Methodology for Switch based on an object Pin
Werdna16-Jul-04 5:54
Werdna16-Jul-04 5:54 
QuestionHow to decide Page Break insertion criteria in RTF doc? Pin
sachinkalse14-Jul-04 16:38
sachinkalse14-Jul-04 16:38 
AnswerRe: How to decide Page Break insertion criteria in RTF doc? Pin
Nick Parker14-Jul-04 17:07
protectorNick Parker14-Jul-04 17:07 
GeneralRe: How to decide Page Break insertion criteria in RTF doc? Pin
sachinkalse14-Jul-04 20:32
sachinkalse14-Jul-04 20:32 
GeneralGENERIC SINGLETON (using... err... generics.) Pin
Anonymous14-Jul-04 16:01
Anonymous14-Jul-04 16:01 
GeneralRe: GENERIC SINGLETON (using... err... generics.) Pin
Nick Parker14-Jul-04 16:53
protectorNick Parker14-Jul-04 16:53 
Generalubiquitous error Pin
Anonymous14-Jul-04 15:23
Anonymous14-Jul-04 15:23 
GeneralRe: ubiquitous error Pin
Nick Parker14-Jul-04 17:00
protectorNick Parker14-Jul-04 17:00 
GeneralCrystal Report Pages Pin
Saktya14-Jul-04 14:29
Saktya14-Jul-04 14:29 
GeneralRe: Crystal Report Pages Pin
Pain_Elemental14-Jul-04 21:44
Pain_Elemental14-Jul-04 21:44 
QuestionFree menu/toolbar library? Pin
Arun Bhalla14-Jul-04 12:46
Arun Bhalla14-Jul-04 12:46 
AnswerRe: Free menu/toolbar library? Pin
Werdna16-Jul-04 5:58
Werdna16-Jul-04 5:58 
GeneralRegistering subclasses with their base Pin
khan200014-Jul-04 12:11
khan200014-Jul-04 12:11 
GeneralProblem accessing a function in a nested class Pin
crushinghellhammer14-Jul-04 11:07
crushinghellhammer14-Jul-04 11:07 
GeneralRe: Problem accessing a function in a nested class Pin
Nick Parker14-Jul-04 11:42
protectorNick Parker14-Jul-04 11:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.