[Mono-list] parsing aspx file...
Francisco Monteiro
Francisco Monteiro <frm@students.fct.unl.pt>
Sat, 9 Apr 2005 03:56:26 +0100
------------101491E434A29FD3
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi,
I'm using this class to parse aspx files, it's currently working on
the microsoft side, but not on mono. No error is shown as I run the
parser, another thing to notice is, if a non existing aspx file is
passed, no error occurs either.
I'm using: mono-1.1.6-installer.bin
and this is what I'm doing:
PATH=$PATH:/opt/mono-1.1.6/bin
mcs -r:System.Web monotest.cs
mono monotest.exe $(pwd) test.aspx
See files attached here...
Also, I should explain better. I'm using aspx files as templates for a
code generator I'm running. There's no need for IIS. It's working fine
in windows and I'm trying to port it to mono, apparently this is the
only thing I'm having trouble with.
Many thanks, in advance:
Francisco
------------101491E434A29FD3
Content-Type: APPLICATION/OCTET-STREAM; name="test.aspx"
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="test.aspx"
PCVAIFBhZ2UgbGFuZ3VhZ2U9ImMjIiBjb250ZW50dHlwZT0idGV4dC9odG1sIiAlPgpoZWxs
byA8JT0iV09STEQiLlRvTG93ZXIoKSU+
------------101491E434A29FD3
Content-Type: TEXT/PLAIN; name="monotest.cs"
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="monotest.cs"
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uV2ViOwp1c2luZyBTeXN0ZW0uV2ViLkhvc3Rp
bmc7CnVzaW5nIFN5c3RlbS5JTzsKdXNpbmcgU3lzdGVtLlRleHQ7CnVzaW5nIFN5c3RlbS5D
b2xsZWN0aW9uczsKCm5hbWVzcGFjZSBtb25vdGVzdCB7CgljbGFzcyBNYWluQ2xhc3MgewoJ
CVtTVEFUaHJlYWRdCgkJc3RhdGljIHZvaWQgTWFpbihzdHJpbmdbXSBhcmdzKSB7CgkJCWlm
IChhcmdzLkxlbmd0aCAhPSAyKSB7CgkJCQlDb25zb2xlLldyaXRlTGluZSgibW9ub3Rlc3Qu
ZX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