|
Please help
I have:
1) the class
public class UppCoordinator : MarshalByRefObject
{
public UppCoordinator()
{
}
//Вечно живущий объект
public override object InitializeLifetimeService()
{
return null;
}
public void ShowMessage(String msg)
{
MessageBox.Show("UppCoordinator: "+ msg);
}
}
2) Server application code
static void Main(string[] args)
{
System.Runtime.Remoting.Channels.
ChannelServices.RegisterChannel(new System.Runtime.Remoting.Channels.Http.HttpChannel(50050));
UppCoordinator.UppCoordinator rmUppCoord = new UppCoordinator.UppCoordinator();
ObjRef refUppCoord = RemotingServices.Marshal(rmUppCoord, "UppCoordinator");
Console.WriteLine("Сервер запущен. Введите Exit для остановки сервера");
String Str = "";
do
Str = Console.ReadLine();
while(Str != "Exit");
}
3) Client code
HttpChannel Chnl = new HttpChannel();
ChannelServices.RegisterChannel(Chnl);
UppCoordinator rmCoordinator = (UppCoordinator)Activator.GetObject(
typeof(UppCoordinator), "http://almaz-mebel.ru:50050/UppCoordinator");
rmCoordinator.ShowMessage("Hello!");
Why calling rmCoordinator.ShowMessage("Hello!") raises exception "Error 407, proxy authentication required"????
modified on Thursday, April 23, 2009 4:45 AM
|
|
|
|
|
Hi
I am implementing a Dynami GridView with 1 custom itemtemplate. and i am binding my gridview with a datatable.
what my concern is, my GridView is not handling pages. all data that i am binding through datatable is getting displayed on first page and 1 page.
when i made GirdView.paging=true and given pagesize property, it is throwing exception at the time of binding datatable whose count is greater than my pagesize.
can any one help me out in getting solution for handling data on gridview with multiple pages.
Thanks
Raj
|
|
|
|
|
What is the exception being thrown?
|
|
|
|
|
hi
my problem was solved. by making some code lines positions swap. Due to the sequence that i wrote for this task it is throwing exception. and i corrected my sequence of steps in code and now its working fine.
Thank you all.
|
|
|
|
|
Hi, you can try this one input this code in your Grid paging
GridView1.pageindex=e.newpageindex
GridView1.Datasource= dt
GridView1.Databind
Hope this one can help.
Thanks
|
|
|
|
|
Thanks a lot Sayrecollado.
|
|
|
|
|
|
Hi,
you could watch the result of Path.Combine and see why it would not work.
or you could go and read a short page of documentation on the subject. (no, no link is offered here).
OTOH asking such a brainless question on a forum is easier...
|
|
|
|
|
What will happen if you put a
public static void Main() inside a class and why would you do it ?
Always Keep Smiling.
Yours Pankaj Nikam
|
|
|
|
|
It's an entry point. This is where program execution starts. If there are multiple Main()s, then there'll be a conflict, and the program can't be run until you either rename the method or the removal of 'static'
|
|
|
|
|
Hmm... interesting...
Always Keep Smiling.
Yours Pankaj Nikam
|
|
|
|
|
Hi,
How can i perform Alt+T operation through programming in c#.net 3.5 Windows application.
Thanks In Advance
--Naren
|
|
|
|
|
Please do not post the same question in two different places, it is considered to be rude and actually lessens the chances of getting a useful reply.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi, Experts
In my c#.net 3.5 windows application i have a .hlp file.
how can i open that .HLP file through .net
Please help me.
Thanks In Advance
--Naren
|
|
|
|
|
Help.ShowHelp(this,path of file);
using this i got
|
|
|
|
|
I remember seeing an advert on one of the Code Project newsletters for a web site that offers online programming exercises.
I'm looking for something that isn't beginners stuff - something that goes beyond the basics and covers some more advanced features of .NET like reflection, remoting and also perhaps covers things like object oriented patterns (preferrably in C#).
Does anyone know of anything like this out there? I'm not interested as much in tutorials as I am in actual exercises that you can do yourself. Thanks.
|
|
|
|
|
Hello everyone,
Ok, I've got a HWnd (the HWND was returned from an ActiveX control). I pass the HWND to a .NET control. I try to pass the HWND using Control.FromHandle() function and I get a null in response.
Why?
I want to make a .NET control become a child of the ActiveX control (this is so I can cover it, if you really want a full explanation, see below), so if there is another way of doing this, please let me know.
Thanks,
Adrian
--
Full Explanation:
Using a language called LabVIEW 7.0. Doesn't allow for .NET controls, but does allow for .NET objects. Want to put control on a front panel of a LabVIEW window. LabVIEW doesn't expose the window handles, so created an AX control which is to return the handle of the AX control so that I can paste the .NET control on top of it. What a work around eh?
|
|
|
|
|
|
>SMACK!<
"Bumping" a post does you no good around here and will actually decrease your chances of getting any kind of useful answer.
|
|
|
|
|
adrianh wrote: I pass the HWND to a .NET control.
How?? Using what?? Your statement makes no sense without specific information.
adrianh wrote: I try to pass the HWND using Control.FromHandle() function and I get a null in response.
Control.FromHandle will only work with controls based on the .NET Framework's Control class. It will NOT work with Win32 handles. You cannot write a control in native Win32 and force the Control class on top of it.
Your best solution would be to contact LABView support and see if they have a .NET compatible library that does what you need, or if they even have a workaround for this.
|
|
|
|
|
As I am using a Stored Procedure named 'HP_FindToken'
I want to get the value of @Token ,@FileNO,@SpOPNO
Is it possible to give any message box or any popup for finding what values are coming at the time of running without using output parameter.
|
|
|
|
|
There isn't a MessageBox command in SQL, but you can use the PRINT command in SQL Server to write some values that you're interested in
I are troll
|
|
|
|
|
|
Hello,
I'm having a very big problem with the serialport class and I need some help to solve this.
we're using multiple serialports in a generic list since we need to connect to multiple devices.
This is what our basic code looks like...
List<serialport> ports = new List<serialport>();
private void button1_Click(object sender, EventArgs e)
{
ports.Add(new SerialPort("COM6"));
ports.Add(new SerialPort ("COM7"));
ports.Add(new SerialPort("COM8"));
foreach (SerialPort port in ports)
{
port.Open();
}
}
Now,after the button is clicked,...if one of the devices(mobile phone in our case) is switched off or if its cable is disconnected from the USB port,there is an immediate massive memory leakage.
Please help us with a solution.
I have noticed a similar thread here...
http://www.experts-exchange.com/Prog..._23315204.html
and a couple of bug reports in Microsoft Connect.
But,right now I need some IMMEDIATE URGENT solution....Would really appreciate if someone helps.
Thanks so much
|
|
|
|
|
I have never seen a memory leak while using serial ports.
What are the exact symptoms?
Can we see code for your asynchronous handlers (DataReceived, ErrorReceived, PinChanged)?
Are you logging (or at least counting) them? Noticed anything peculiar?
|
|
|
|