|
Thanks for the reply
Regards
DilipRam
|
|
|
|
|
Hello everyone,
I have got a webpage, a webservice and a client program. Is it possible to, when something changes in the webpage the webservice sends a method call with some parameters to the client program and the client starts to execute whatever method is called ?
Best regards...
.:: Something is Wrong ::.
|
|
|
|
|
Yes, but not easily. The browser is a sandbox, so you can't do this client side, as you rightly assumed. You would need to install a listener on the client, listening to a particular tcp port. The web page, would then post back to the server (or call a webservice) which would, via remoting calls, connect with the listener on the client. The remote and client side need to be 'aware' of each other, ie names, ports etc.
Read Nish's article here[^] to get a basic understanding of what can be achieved.
This will only work on a LAN / Intranet unless you want to do battle with firewalls etc.
I've just done something very similar today....I've used it to implement a sign in / sign out deputy system. If the current 'on call' support signs out, the webserver sends a message to the next support person on the rosta. A small exe on there machine is listening on a particular port for this call and pops up a message. Saves them constantly checking the webpage.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
|
|
|
|
|
Thanks for your help. I think we can overcome the firewall problem by configuring all firewalls where the clients are installed.
But I like your approach to the problem. May be I should try it.
When the page refreshes and there are some changes the webservice sends a message to a specified ip and port and when the client receives this message the method starts to work.
The only problem is what if we have more than 1 method.
Well then we may specify more messages, each message can invoke one method so a simple switch statement should do the job
Hmm..
Sounds simple and it should work.
Thank you very much...
.:: Something is Wrong ::.
|
|
|
|
|
pashje wrote: The only problem is what if we have more than 1 method.
This is the server side portion....
IMyChecker checker = (IMyChecker)Activator.GetObject(
typeof(IMyChecker), "tcp://localhost:9000/CheckListener");
checker.RunMethod1();
checker.RunMethod2();
Here, CheckListener is the name of the class on the remote machine. checker is an instance of that class, and can now call any exposed methods.
I'm no expert on this, as I've only picked this stuff up today, so DO check out what I've said, but the above works for me.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
|
|
|
|
|
Hello,
I would like to know what lines in c# replace the following lines in C++:
LCID lcid = ::GetUserDefaultLCID();
m_lcid = LANGIDFROMLCID(lcid);
Thanks!!!
|
|
|
|
|
use the System.Globalization.CultureInfo class. The user default is, I think, System.Threading.Thread.CurrentCulture.
-----
If atheism is a religion, then not collecting stamps is a hobby. -- Unknown
|
|
|
|
|
|
Hai Everybody,
Can any one please tell me how to debug the windows service even though i used the try catch block i couldn't find out the error point please give me solution to overcome this problem.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Hi,
Set the debugger in your code.........
and then run your project...........use keys of F10 and F11...
Nisar Inamdar
Always For U.
|
|
|
|
|
When developing a windows service I'll normally make it as a self contained class library. I'll then develop most of it using a console frontend and only when I'm done transfer it into a windows service and test it in place.
When you have to debug a windows service you can open a new Visual Studio and use Tools >> attach to process to attach the debugger.
|
|
|
|
|
Can you please give me a link how to perform debugging usign "Attach Process"
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
|
This link tells how i can test the service but i want to debug the service
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
|
hi,
Do one thing...........
In properties window of textbox select events tab (shown like lighting)...
there is keypress event.............just doble click on it..........it will goes to code the function...........
Nisar Inamdar.............
Always for U..........
|
|
|
|
|
There are two ways you can create the event handler routines for the key press event.
Firstly in your initialisation routine type the following: (where "textBox1_KeyPress" will become the event handler routine)
textBox1.KeyPress += new KeyPressEventHandler(textBox1_KeyPress);
(As you are using Visual studio as soon as you type the "+=" part Visual Studio should prompt you with an auto complete option - press tab twice and it will create both the above line and the event handler routine)
2nd way is through the form designer. Click on the textbox and go to the textbox properties window. Click on the events button (the little lightning icon) then simply double click inside the KeyPress item in the list. This will create the routine for you and should take you to the code.
|
|
|
|
|
yep i like the second one, easy and gud... thanks dudes
Becoming Programmer...
|
|
|
|
|
HI:
i want to develop an application in which when i write text in textbox in english it converts into unicode and displays text in urdu.
anybody have idea about it
Thanx in advance
Farhan Ali
|
|
|
|
|
|
|
Is it me or is the documentation on setting up a secure tcp channel in remoting particularly opaque?
Please, can someone explain to me in words (preferably) of one syllable how to use the .Net remoting 2.0 tcp security model to do the following:
Cause authentication and encryption to be required on calls to a singleton remoted object.
The scenario is: I have a huge LED display board in a call centtre. The server it is connected to (by RS232 (quaint)) exposes it's interface as a remote object. A web site on the intranet remotes in to set the text on the display. The web site is Windows authenticated, but obviously anyone with the URL of the display server could remote in and put rude messages up in the call centre.
So, how to secure?
I've got this far
IDictionary properties = new Hashtable();
properties.Add("port", 12000);
properties.Add("secure", true);
properties.Add("impersonate", true);
IChannel channel = new TcpChannel(properties, null, null);
ChannelServices.RegisterChannel(channel, true);
RemotingConfiguration.RegisterWellKnownServiceType(
typeof(LaserDisplayBoardDriver),
"LDB",
WellKnownObjectMode.Singleton);
but I don't know how to consume this in the client, nor how to pass credentials.
Please help!
|
|
|
|
|
|
I am working on a small game , and i have a problem --
when the user win a message box appear asking him if he want to play again if he answered -yes- the form must be shown again as it was in the beginning of the game , and i do not know how to reload the form
thanks ,
Mona
LA ELAH ELA ALLAH MOHAMED RASOL ALLAH
|
|
|
|
|
Hi,
AFAIK you can load a form only once. But you can show and hide it many times
using either Show()/Hide() methods or setting Visible property true/false.
Apart from that, you could create a new instance of your form, which would give you its
initial state automatically (wanted or not).
|
|
|
|