Requirements
1.Microsoft Visual Studio
2.IIS server
1.Building a simple remote object
using System;
using System.Runtime.Remoting;
namespace HelloWorldObject
{
public class Hello:MarshalByRefobject
{
public string HelloWorld(string str)
{
return "HelloWorld received"+str+"from client";
}
}
}
Hello.cs နဲ့ remote object တစ်ခုလုပ်ပါ။
2.Host the remote object in IIS server

1.Create new folder called "HelloWorldWeb" in C:\Inetpub\wwwroot\ .
2.Create a sub folder named "bin" in this "HelloWorldWeb".
3.HelloWorldObject.dll ဖိုင်ကို Visual Studio မှကော်ပီကူးပါ။ "bin" folder အထဲကိုထည့်ပါ။
4.Web.config ဖိုင်ကိုရေးပါမယ်။ notepad မှာရေးပြီး Web.config နဲ့ သိမ်းပါ။
<?xml version="1.0" encoding="utf-8" ?>
< configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
< system.runtime.remoting>
< application>
< service>
< wellknown mode="Singleton" type="HelloWorldObject.Hello,HelloWorldObject"
objectUri="SimpleHelloWorld.soap" />
</service>
< channels>
< channel ref="http" />
< serverProviders>
< formatter href="binary" />
</serverProviders>
</channels>
</application>
</system.runtime.remoting>
</configuration>
5.Start => Programs => Administrative Tools => Internet Service Manager
6.In tree view ... go to Internet Information Services => local computer => Web Sites =>Default Web Site => HelloWorldWeb
7.Right click on it and choose Properties => in Directory tab => Create => Apply
8.Then virtual directory is created.
Sunday, January 03, 2010
min that thant
Posted in 
No Response to "How to host a remote object in IIS server(1)"
Post a Comment