[Mono-list] WebClient.OpenRead not working
Ivan Hawkes
blackhawk@ivanhawkes.com
Sun, 6 Jul 2003 00:59:18 +0100
=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
So close now to getting this CMS working under Mono...in fact, a sample web=
=20
page has displayed just once, every other time however it times out. i may=
=20
take a photo of that successful run just to remind myself it worked :-)
My current problem is this. Within the program there is a section that load=
s=20
an XSL files and uses it to transform some XML into XHTML. This code works=
=20
perfectly from the sample.exe program I am using to test things. When I try=
=20
and use the same code in an ASPX page in the Page_Load event it fails - the=
=20
code never returns from the GetEntity call in XmlUrlResolver.cs. I cut that=
=20
section of code out and dropped it into a test app (see code below).
using System.Net;
using System.IO;
Console.WriteLine ("Getting test file");
Stream s =3D null;
using (s) {
WebClient wc =3D new WebClient ();
s =3D wc.OpenRead ("file:///home/ivan/christinahawkes/StyleSheets/news.xsl=
");
wc.Dispose ();
}
Console.WriteLine ("Got test file");
This worked just fine from the test application (.exe). I then cut this int=
o=20
an ASPX file and it failed to return a result.
Is there something different about using it from ASPX? Are these routines n=
ot=20
initialised properly at the Page_Load event stage? I'd be grateful if some=
=20
other people could try it out and see if it is a bug.
NOTE: The code is being used from a compile .dll library that is shared wit=
h=20
both the test app and the ASPX...it's a weird bug.
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iQIVAwUBPwdmVvr1e7bH1pzBAQJwwg//WK5kUxVPifwFsqzmSzx543OyAGeLX2rP
yq8kU0lucS6hs+x3v7uL9qLdaJxGCqiloEhjsCzzchRyeJd2k5kCYHolSMUZQhAN
Di0tRHlAOzXqC2wu5OKPN6/VkuOIQBX/70dDqqUUi3fMIqZiEtnQGF8w9deASkUn
GAH2z9YOMOrL+LJQxvDmouCyVfrt0FqDzrDzpUwy7YbEFX3hoI0iWOxdronHWPjQ
tcMftv0FPiHrEyFReDdJdnQprkLjfnPn+bCj50TRDfUOsNrETlzdPwoZmxLGqffo
sEK5ulQitFxgObI5EfR/wvY8iqwxp25Ykb5wkDhPQSu3lx4LBROmL8Bzn7pxBH80
mD/hjrwqtUtnoALtlMh5D7vLxJhd5CMTh5mq2oMEQhmO6mJfeRiQs3cjp2xD0yhn
A2GQN2hux93rGdRMzyKBRzHFqoezn5d2LuIFZHfMGzyuHY/T+aLf23+kdk1Ly6xy
IJwmJXCb6e88DEjzSSQMgofZb2n+WmKJsamQ8wQVMo+X2ShyE4UkN8oxpzA32kzd
uZN0v1AZIJLwdk87pbkQVF7gs4LR8kHX2hGe456GPoxjpQeBzgBi//LjRBljGEYD
Vt15qDyq+SY6ohCLyb34o9fbl6cAtDTlhaEyrRBlNi8hlX6a8eHgx/VK5pSFfDvN
5EBJeh1KpmI=3D
=3DX2nV
=2D----END PGP SIGNATURE-----