[Mono-dev] MailDefinition patch
Dumitru Ban
dban at dako.ro
Wed Aug 15 04:58:02 EDT 2007
RE: [Mono-dev] MailDefinition patchHi,
Attached is a patch for the problem described below. Please review and apply it.
Thanks & best regards,
Dumi.
----- Original Message -----
From: Konstantin Triger
To: Dumitru Ban ; mono-devel-list at lists.ximian.com
Sent: Saturday, June 30, 2007 8:07 PM
Subject: RE: [Mono-dev] MailDefinition patch
Hey Dumi,
I would suggest looking into some code in Sys.Web, which has similar issues, i.e. XmlSiteMapProvider. It loads its data from the file and probably solves the problems you face. If appropriate, you may consider refactoring and using same functions for file loading for both cases.
Regarding permissions (or any other IO problem), I think, the relevant exception should be thrown (nothing special needs to be done, the exception will be thrown when the file will be accessed). As usual, you may verify this by creating similar conditions on MS .net.
Regards,
Konstantin Triger
-----Original Message-----
From: mono-devel-list-bounces at lists.ximian.com on behalf of Dumitru Ban
Sent: Thu 6/28/2007 15:41
To: mono-devel-list at lists.ximian.com
Subject: Re: [Mono-dev] MailDefinition patch
Hi again,
Any thoughts? Any ideas?
Thanks & best regards,
Dumi.
----- Original Message -----
From: Dumitru Ban
To: mono-devel-list at lists.ximian.com
Sent: Tuesday, May 29, 2007 11:14 AM
Subject: [Mono-dev] MailDefinition patch
Hi,
I'm trying to create a patch for the MailDefinition (System.Web.UI.WebControls) and I'm not sure what's the best way to do it. The problem is in the CreateMailMessage (string recipients, IDictionary replacements, Control owner) method. If the BodyFileName is present and it's rooted everything works fine. If it's not rooted, it is combined with the owner's TemplateSourceDirectory. And this is not working :(
I'm using the MailDefinition from a CreateUserWizard. Both the aspx containing the CreateUserWizard and the mail file are in the same directory, "users". If I set the BodyFileName for the wizard to "~/users/createaccount.txt", the combined path is something like this: "/myapp/~/users/createaccount.txt". And this is because there's no check for "~/".
If I set the BodyFileName to "createaccount.txt", the combined path is something like this: "/myapp/users/createaccount.txt". This one looks fine, except that it's a virtual path and the StreamReader in the CreateMailMessage is looking for a physical path.
How should be the mail file accessed? Using virtual paths or physical paths? Also, what about the permissions of the mail file?
P.S. Attached is a sample error.
Thanks & best regards,
Dumi.
__________ NOD32 2294 (20070528) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
------------------------------------------------------------------------------
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
__________ NOD32 2294 (20070528) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
__________ NOD32 2364 (20070629) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070815/b3f50e07/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MailDefinition.patch
Type: application/octet-stream
Size: 909 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070815/b3f50e07/attachment.obj
More information about the Mono-devel-list
mailing list