How to host a remote object in IIS server(2)

Console Application တစ်ခုကို အရင်လုပ်ပါမယ်။ TestClient.cs ဆိုပြီးနာမည်ပေးပါမယ်။ Reference မှာ System.Runtime.Remoting နဲ့ c:\Inetpub\wwwroot\ ထဲက HelloWorldObject.dll ကို add ပါမယ်။


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Http;
using HelloWorldObject;
using System.EnterpriseServices;

namespace Client
{
class TestClient
{
static void Main(string[] args)
{
Hello obj = (Hello)Activator.GetObject(typeof(Hello),
"http://localhost/HelloWorldWeb/SimpleHelloWorld.soap");
Console.WriteLine(obj.HelloWorld(" Client APP: "));
Console.ReadLine();
}
}
}


ပြီးရင် run ပါ။ ရပါပြီ..IIS server က ကွန်ပြူတာကို ဖွင့်ကတည်းက started ပြီးသားဖြစ်ပါတယ်။
MORE INFO ===>http://support.microsoft.com/kb/312107

No Response to "How to host a remote object in IIS server(2)"

Post a Comment

powered by Blogger