Click here to Skip to main content
15,899,754 members
Home / Discussions / C#
   

C#

 
GeneralRe: Writing a Trailware for an Application Pin
Samar Aarkotti22-Oct-05 6:06
Samar Aarkotti22-Oct-05 6:06 
GeneralRe: Writing a Trailware for an Application Pin
Samar Aarkotti22-Oct-05 7:35
Samar Aarkotti22-Oct-05 7:35 
QuestionHow to save a hotkey assignment Pin
mav.northwind21-Oct-05 3:54
mav.northwind21-Oct-05 3:54 
AnswerRe: How to save a hotkey assignment Pin
sebastud21-Oct-05 7:20
sebastud21-Oct-05 7:20 
GeneralRe: How to save a hotkey assignment Pin
mav.northwind21-Oct-05 23:39
mav.northwind21-Oct-05 23:39 
QuestionRemoting server crashes when client quits Pin
polisen21-Oct-05 3:53
polisen21-Oct-05 3:53 
AnswerRe: Remoting server crashes when client quits Pin
Tom Larsen21-Oct-05 5:01
Tom Larsen21-Oct-05 5:01 
GeneralRe: Remoting server crashes when client quits Pin
polisen21-Oct-05 6:28
polisen21-Oct-05 6:28 
Sorry for not posting any code. As I said before, all the samples from tutorials fail in the same manner.

Heres the service:
public class HelloService : MarshalByRefObject<br />
	{<br />
		public string hello()<br />
		{<br />
			Console.WriteLine("Hello!");<br />
			return "Hello";<br />
		}<br />
	}


Here's the server:

class HelloServer<br />
	{<br />
		static void Main(string[] args)<br />
		{<br />
			Console.WriteLine("Hit any key to exit at any time");<br />
<br />
			try<br />
			{<br />
				TcpServerChannel channel = new TcpServerChannel(8088);<br />
<br />
				ChannelServices.RegisterChannel(channel);<br />
				RemotingConfiguration.RegisterWellKnownServiceType(typeof(HelloService), "HelloService", WellKnownObjectMode.SingleCall);<br />
			}<br />
			catch (Exception e)<br />
			{<br />
				Console.WriteLine(e.Message);<br />
			}<br />
<br />
			Console.ReadKey();<br />
		}<br />
	}


And here's the client:
class HelloClient<br />
	{<br />
		static void Main(string[] args)<br />
		{<br />
			Console.WriteLine("Press any key to exit at any time");<br />
<br />
			try<br />
			{<br />
				TcpClientChannel channel = new TcpClientChannel();<br />
<br />
				ChannelServices.RegisterChannel(channel);<br />
				HelloService service = (HelloService)Activator.GetObject(typeof(HelloService), "tcp://localhost:8088/HelloService");<br />
<br />
				if (service != null)<br />
					Console.WriteLine(service.hello());<br />
			}<br />
			catch (Exception e)<br />
			{<br />
				Console.WriteLine(e.Message);<br />
			}<br />
<br />
			Console.ReadKey();<br />
		}<br />
	}

AnswerRe: Remoting server crashes when client quits Pin
Rob Graham21-Oct-05 8:02
Rob Graham21-Oct-05 8:02 
GeneralRe: Remoting server crashes when client quits Pin
Anonymous21-Oct-05 8:06
Anonymous21-Oct-05 8:06 
QuestionScroll A Control Manually Pin
Ali Beirami21-Oct-05 3:06
Ali Beirami21-Oct-05 3:06 
AnswerRe: Scroll A Control Manually Pin
Gulfraz Khan21-Oct-05 3:12
Gulfraz Khan21-Oct-05 3:12 
GeneralRe: Scroll A Control Manually Pin
Ali Beirami21-Oct-05 12:30
Ali Beirami21-Oct-05 12:30 
QuestionSets Dcom Security For A Specified Application, in .net Pin
joaoPaulo21-Oct-05 2:32
joaoPaulo21-Oct-05 2:32 
QuestionBreaking a string into separate words Pin
hasanali0021-Oct-05 1:51
hasanali0021-Oct-05 1:51 
AnswerRe: Breaking a string into separate words Pin
MoustafaS21-Oct-05 1:58
MoustafaS21-Oct-05 1:58 
AnswerRe: Breaking a string into separate words Pin
S. Senthil Kumar21-Oct-05 2:01
S. Senthil Kumar21-Oct-05 2:01 
Questionuse a file stream just in memory Pin
Sasuko21-Oct-05 1:14
Sasuko21-Oct-05 1:14 
AnswerRe: use a file stream just in memory Pin
S. Senthil Kumar21-Oct-05 1:49
S. Senthil Kumar21-Oct-05 1:49 
AnswerRe: use a file stream just in memory Pin
whizzs21-Oct-05 11:14
whizzs21-Oct-05 11:14 
QuestionImageList not working Pin
Green Fuze21-Oct-05 1:02
Green Fuze21-Oct-05 1:02 
AnswerRe: ImageList not working Pin
S. Senthil Kumar21-Oct-05 2:03
S. Senthil Kumar21-Oct-05 2:03 
GeneralRe: ImageList not working Pin
Green Fuze21-Oct-05 2:48
Green Fuze21-Oct-05 2:48 
GeneralRe: ImageList not working Pin
S. Senthil Kumar21-Oct-05 21:25
S. Senthil Kumar21-Oct-05 21:25 
GeneralRe: ImageList not working Pin
Green Fuze22-Oct-05 0:10
Green Fuze22-Oct-05 0:10 

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.