Hi i wrote in c# simple app to get HTML code by httpwebreqest/response. Main definition of this method is implemented in serwer exe file. So when I using it by calling this method from client then server application gets from internet this html code. But I want to force client to get this html code from WWW. I tried to make it Marshal by value but simple Serialization doesn't working. How to do that the object who gets this html code is activated from server but is used local by client. You can download my project file with all files. I hope it will be easy to undersnad my problem

RapidShare: Easy Filehosting

thanks a lot

Code:
remotable object class libary(interface):
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.IO;

namespace Interfejs
{
    public interface IPobierz
    {
        string KodHTML(string URL);
    }
}

definitions for this interface(in serwer)
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.IO;
using Interfejs;

namespace Serwer
{
    class Definicje : MarshalByRefObject, IPobierz
    {
        public string KodHTML(string URL)
        {
            HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(URL);
            HttpWebResponse res = req.GetResponse() as HttpWebResponse;
            Stream data = res.GetResponseStream();
            StreamReader sr = new StreamReader(data);
            string html = sr.ReadToEnd();
            return html; 
        }
    }
}