![]() |
| | #1 |
| Registered User Join Date: Mar 2009
Posts: 1
| [Remoting] HttpWebRequest/Response isn't remotable? 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;
}
}
}
|
| arcozz is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Remotable types | conor20_ie | C# Programming | 0 | 06-18-2008 09:33 AM |