Re: [Mono-dev] Wapi handle leaks problems
As a workaround i've set a MONO_SHARED_DIR for each mod-mono-server... and now i can monitor each web applications... here's some graphs... Our SearchDoc application, probably the most used (during the day) see chart.php.png In comparison : NotesNat (Use by only a few people) see chart1.php.png ReportManager (almost never used...) see chart2.php.png strange isn'it ? _ Ce message et les eventuels documents joints peuvent contenir des informations confidentielles. Au cas ou il ne vous serait pas destine, nous vous remercions de bien vouloir le supprimer et en aviser immediatement l'expediteur. Toute utilisation de ce message non conforme a sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite. Les communications sur internet n'etant pas securisees, l'integrite de ce message n'est pas assuree et la societe emettrice ne peut etre tenue pour responsable de son contenu. attachment: chart.php.pngattachment: chart2.php.pngattachment: chart3.php.png___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] Tweak for instructions on Web site
At the end of the unsupported downloads there is a link to the German Ubantu VM. The VM is set up for German, but Mono has easy instructions on how to switch it to English. Great! But the keyboard is still in German. could someone add Then change the keyboard to English. * Click System * Click Preferences * Click Keyboard * Select the Layout Tab * Click + Add * Select your language (U.S.English) from the layout drop down * Click on the Default radio button to make English the default layout. * Click close We might also want to meantion that this VM include the Mono source code, so it can be used to develop Mono as well as testing apps. I assume that I should NOT add this to bugzillia? If that is preferred, I can do that as well. I am going to ask Daniel Nauck if eh will include instructions or batch files for anonymous check out compile and diff creation. Thanks Dennis http://www.mono-project.com/Other_Downloads - Never miss a thing. Make Yahoo your homepage.___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] MonoDevelop on Windows
Jonathan, What steps did you use to build and run MonoDevelop on Windows? And what dependencies did you use? I understand from your blog that a lot of it does not work, but I still would like to see it at least run. I'm sure others would be interested in helping and/or testing it. Hopefully, you can commit your fixes to svn so others can try it out. Thanks, Daniel Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] Problems with IHttpHandler
Hello all, I was wondering if someone could help me with this. I've written an ASP.NET website using visual studio 2005, and have written my own custom IHttpHandler. All works well, except when I move it over to my linux server and run it under mono. I get the error (my http handler type) does not implement IHttpHandler or IHttpHandlerFactory I then wrote a little program which I compiled under mono, to load the assembly my IHttpHandler type is in, and make sure that IHttpHandler could indeed be assigned from my type. typeof(IHttpHandler).IsAssignableFrom(t); returned true. So I'm a little lost as to what is happening here. thanks in advance. Nik. -- E-Mail:[EMAIL PROTECTED] (We)Blog: http://blog.terminaldischarge.net ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Problems with IHttpHandler
Hi, Please attach a test case that can be executed by itself without any modifications. And you are highly recommented to report the bug: http://www.mono-project.com/Bugs Kornél - Original Message - From: Nik Radford [EMAIL PROTECTED] To: mono-devel-list@lists.ximian.com Sent: Friday, February 22, 2008 3:17 PM Subject: [Mono-dev] Problems with IHttpHandler Hello all, I was wondering if someone could help me with this. I've written an ASP.NET website using visual studio 2005, and have written my own custom IHttpHandler. All works well, except when I move it over to my linux server and run it under mono. I get the error (my http handler type) does not implement IHttpHandler or IHttpHandlerFactory I then wrote a little program which I compiled under mono, to load the assembly my IHttpHandler type is in, and make sure that IHttpHandler could indeed be assigned from my type. typeof(IHttpHandler).IsAssignableFrom(t); returned true. So I'm a little lost as to what is happening here. thanks in advance. Nik. -- E-Mail:[EMAIL PROTECTED] (We)Blog: http://blog.terminaldischarge.net ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Problems with IHttpHandler
Yes, this I've already done. Basically I'm doing a catch all for the http handler, the entry for my web config looks like so httpHandlers add path=* verb=* type=TerminalDischarge.Web.HttpHandler.HttpHandler, TerminalDischarge.Web/ /httpHandlers I'm using for URL rewritting. and the HttpHandler i'm using looks like this: (sorry if its a bit much, I just copy pasted the whole file) using System; using System.Collections.Generic; using System.Configuration; using System.IO; using System.Text; using System.Web; using System.Web.UI; using System.Xml; using TerminalDischarge.Web.Mapping; namespace TerminalDischarge.Web.HttpHandler { public class HttpHandler : IHttpHandler { #region Internals private readonly ListMap m_Maps; #endregion #region Constructors public HttpHandler() { m_Maps = new ListMap(); } #endregion #region Public Members ///summary ///Enables processing of HTTP Web requests by a custom HttpHandler that implements the see cref=T:System.Web.IHttpHandler/see interface. summary /// ///param name=contextAn see cref=T:System.Web.HttpContext/see object that provides references to the intrinsic server objects (for example, Request, Response, Session, and Server) used to service HTTP requests. /param public void ProcessRequest(HttpContext context) { AddPaths(context); string url = context.Request.Path; foreach (Map m in m_Maps) { if (m.DoesMatch(url)) { string destination = m.MapUrl(url); try { string fileName = context.Server.MapPath(destination); Page page = PageParser.GetCompiledPageInstance(destination, fileName, context) as Page; if (page != null) { context.RewritePath(destination); page.ProcessRequest(context); return; } } catch (HttpException) { PageNotFound(context); return; } } } { //no match found, so palm off to default handler System.Web.DefaultHttpHandler defaultHttpHandler = new DefaultHttpHandler(); defaultHttpHandler.BeginProcessRequest(context, null, null); return; } } #endregion #region Private Members /// summary /// Displays a simple error if a path isn't found /// /summary /// param name=context/param private void PageNotFound(HttpContext context) { context.Response.StatusCode = 404; context.Response.Write(string.Format(The page {0} was not found, context.Request.Path)); } /// summary /// Parses the path mapping file and populates the map list /// /summary /// param name=contextAn see cref=T:System.Web.HttpContext/see object that provides references to the /// intrinsic server objects (for example, Request, Response, Session, and Server) used to service HTTP requests. /param private void AddPaths(HttpContext context) { m_Maps.Clear(); //get mapping filename string mapFile = context.Server.MapPath(ConfigurationManager.AppSettings[PathMap]); //Load it XmlDocument xDoc = new XmlDocument(); xDoc.Load(mapFile); XmlNodeList mapNodes = xDoc.SelectNodes(/Mapping/Map); //we should get back a list of all our document mapping //parse it and populate our map list foreach (XmlNode node in mapNodes) { XmlNode xSearchFor = node.SelectSingleNode(./SearchFor); XmlNode xSendTo = node.SelectSingleNode(./SendTo); if (xSearchFor != null xSendTo != null) { string searchFor = xSearchFor.InnerText.Replace(~, context.Request.ApplicationPath); string sendTo = xSendTo.InnerText.Replace(~, context.Request.ApplicationPath); Map map = new Map(searchFor, sendTo); m_Maps.Add(map); } } } #endregion #region Properties ///summary ///Gets a value indicating whether another request can use the see cref=T:System.Web.IHttpHandler/see instance. summary /// ///returns ///true if the see cref=T:System.Web.IHttpHandler/see instance is reusable; otherwise, false. returns /// public bool IsReusable
Re: [Mono-dev] Problems with IHttpHandler
Hi! Are you sure you run it with mod_mono_server2 rather than the default mod_mono_server? Cheers, Michał Ziemski Nik Radford pisze: Yes, this I've already done. Basically I'm doing a catch all for the http handler, the entry for my web config looks like so httpHandlers add path=* verb=* type=TerminalDischarge.Web.HttpHandler.HttpHandler, TerminalDischarge.Web/ /httpHandlers I'm using for URL rewritting. and the HttpHandler i'm using looks like this: (sorry if its a bit much, I just copy pasted the whole file) using System; using System.Collections.Generic; using System.Configuration; using System.IO; using System.Text; using System.Web; using System.Web.UI; using System.Xml; using TerminalDischarge.Web.Mapping; namespace TerminalDischarge.Web.HttpHandler { public class HttpHandler : IHttpHandler { #region Internals private readonly ListMap m_Maps; #endregion #region Constructors public HttpHandler() { m_Maps = new ListMap(); } #endregion #region Public Members ///summary ///Enables processing of HTTP Web requests by a custom HttpHandler that implements the see cref=T:System.Web.IHttpHandler/see interface. summary /// ///param name=contextAn see cref=T:System.Web.HttpContext/see object that provides references to the intrinsic server objects (for example, Request, Response, Session, and Server) used to service HTTP requests. /param public void ProcessRequest(HttpContext context) { AddPaths(context); string url = context.Request.Path; foreach (Map m in m_Maps) { if (m.DoesMatch(url)) { string destination = m.MapUrl(url); try { string fileName = context.Server.MapPath(destination); Page page = PageParser.GetCompiledPageInstance(destination, fileName, context) as Page; if (page != null) { context.RewritePath(destination); page.ProcessRequest(context); return; } } catch (HttpException) { PageNotFound(context); return; } } } { //no match found, so palm off to default handler System.Web.DefaultHttpHandler defaultHttpHandler = new DefaultHttpHandler(); defaultHttpHandler.BeginProcessRequest(context, null, null); return; } } #endregion #region Private Members /// summary /// Displays a simple error if a path isn't found /// /summary /// param name=context/param private void PageNotFound(HttpContext context) { context.Response.StatusCode = 404; context.Response.Write(string.Format(The page {0} was not found, context.Request.Path)); } /// summary /// Parses the path mapping file and populates the map list /// /summary /// param name=contextAn see cref=T:System.Web.HttpContext/see object that provides references to the /// intrinsic server objects (for example, Request, Response, Session, and Server) used to service HTTP requests. /param private void AddPaths(HttpContext context) { m_Maps.Clear(); //get mapping filename string mapFile = context.Server.MapPath(ConfigurationManager.AppSettings[PathMap]); //Load it XmlDocument xDoc = new XmlDocument(); xDoc.Load(mapFile); XmlNodeList mapNodes = xDoc.SelectNodes(/Mapping/Map); //we should get back a list of all our document mapping //parse it and populate our map list foreach (XmlNode node in mapNodes) { XmlNode xSearchFor = node.SelectSingleNode(./SearchFor); XmlNode xSendTo = node.SelectSingleNode(./SendTo); if (xSearchFor != null xSendTo != null) { string searchFor = xSearchFor.InnerText.Replace(~, context.Request.ApplicationPath); string sendTo = xSendTo.InnerText.Replace(~, context.Request.ApplicationPath); Map map = new Map(searchFor, sendTo); m_Maps.Add(map); } } } #endregion #region Properties ///summary ///Gets a value indicating whether another request can use the see
Re: [Mono-dev] Problems with IHttpHandler
Yes. I added MonoServerPath /usr/local/bin/mod-mono-server2 to the mod_mono.conf file before attempting this. However, I've just been trying to create the test case, by creating a test site and dll, and don't seem to be able to replicate the error. So now I'm even more confused. Hi! Are you sure you run it with mod_mono_server2 rather than the default mod_mono_server? Cheers, MichaÅ Ziemski Nik Radford pisze: Yes, this I've already done. Basically I'm doing a catch all for the http handler, the entry for my web config looks like so httpHandlers add path=* verb=* type=TerminalDischarge.Web.HttpHandler.HttpHandler, TerminalDischarge.Web/ /httpHandlers I'm using for URL rewritting. and the HttpHandler i'm using looks like this: (sorry if its a bit much, I just copy pasted the whole file) using System; using System.Collections.Generic; using System.Configuration; using System.IO; using System.Text; using System.Web; using System.Web.UI; using System.Xml; using TerminalDischarge.Web.Mapping; namespace TerminalDischarge.Web.HttpHandler { public class HttpHandler : IHttpHandler { #region Internals private readonly ListMap m_Maps; #endregion #region Constructors public HttpHandler() { m_Maps = new ListMap(); } #endregion #region Public Members ///summary ///Enables processing of HTTP Web requests by a custom HttpHandler that implements the see cref=T:System.Web.IHttpHandler/see interface. summary /// ///param name=contextAn see cref=T:System.Web.HttpContext/see object that provides references to the intrinsic server objects (for example, Request, Response, Session, and Server) used to service HTTP requests. /param public void ProcessRequest(HttpContext context) { AddPaths(context); string url = context.Request.Path; foreach (Map m in m_Maps) { if (m.DoesMatch(url)) { string destination = m.MapUrl(url); try { string fileName = context.Server.MapPath(destination); Page page = PageParser.GetCompiledPageInstance(destination, fileName, context) as Page; if (page != null) { context.RewritePath(destination); page.ProcessRequest(context); return; } } catch (HttpException) { PageNotFound(context); return; } } } { //no match found, so palm off to default handler System.Web.DefaultHttpHandler defaultHttpHandler = new DefaultHttpHandler(); defaultHttpHandler.BeginProcessRequest(context, null, null); return; } } #endregion #region Private Members /// summary /// Displays a simple error if a path isn't found /// /summary /// param name=context/param private void PageNotFound(HttpContext context) { context.Response.StatusCode = 404; context.Response.Write(string.Format(The page {0} was not found, context.Request.Path)); } /// summary /// Parses the path mapping file and populates the map list /// /summary /// param name=contextAn see cref=T:System.Web.HttpContext/see object that provides references to the /// intrinsic server objects (for example, Request, Response, Session, and Server) used to service HTTP requests. /param private void AddPaths(HttpContext context) { m_Maps.Clear(); //get mapping filename string mapFile = context.Server.MapPath(ConfigurationManager.AppSettings[PathMap]); //Load it XmlDocument xDoc = new XmlDocument(); xDoc.Load(mapFile); XmlNodeList mapNodes = xDoc.SelectNodes(/Mapping/Map); //we should get back a list of all our document mapping //parse it and populate our map list foreach (XmlNode node in mapNodes) { XmlNode xSearchFor = node.SelectSingleNode(./SearchFor); XmlNode xSendTo = node.SelectSingleNode(./SendTo); if (xSearchFor != null xSendTo != null) { string searchFor = xSearchFor.InnerText.Replace(~, context.Request.ApplicationPath); string sendTo = xSendTo.InnerText.Replace(~,
Re: [Mono-dev] Problems with IHttpHandler
Hi! I assume you precompile the assambly and put it in bin. In this case you sould put the name of the assembly in httpHandlers section in web.config Let's say the assembly is named fooAssembly.dll. In that case add: httpHandlers add verb=POST path=Execute type=NamespaceMyType, fooAssembly/ /httpHandlers If that doesn't help, please, post some code and the contents of web.config. Cheers, Michał Ziemski Nik Radford pisze: Hello all, I was wondering if someone could help me with this. I've written an ASP.NET website using visual studio 2005, and have written my own custom IHttpHandler. All works well, except when I move it over to my linux server and run it under mono. I get the error (my http handler type) does not implement IHttpHandler or IHttpHandlerFactory I then wrote a little program which I compiled under mono, to load the assembly my IHttpHandler type is in, and make sure that IHttpHandler could indeed be assigned from my type. typeof(IHttpHandler).IsAssignableFrom(t); returned true. So I'm a little lost as to what is happening here. thanks in advance. Nik. -- E-Mail:[EMAIL PROTECTED] (We)Blog: http://blog.terminaldischarge.net ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] MonoDevelop on Windows
I pretty much just compiled trunk on Linux with --disable-gnomeplatform, and don't put an option for gtksourceview2, and it will just use the new managed source editor. Later I wrote a WindowsPlatform addin, and got Lluis to remove a few Unix-isms. After that, Geoff Norton pretty much took over and made the real progress. He made a lot of fixes for remoting and such to make it work much better. Next week, when he gets back from the conference he is at, I will try to prod him to put his changes into SVN. Jonathan Daniel Morgan wrote: Jonathan, What steps did you use to build and run MonoDevelop on Windows? And what dependencies did you use? I understand from your blog that a lot of it does not work, but I still would like to see it at least run. I'm sure others would be interested in helping and/or testing it. Hopefully, you can commit your fixes to svn so others can try it out. Thanks, Daniel Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] [PATCH] Managed Marshal.Copy implemantations
Hi, I understand your objections and I agree with most of them. If there were something like a fast Array.GetElementSize() that could be used in Marshal.UnsafeAddrOfPinnedArrayElement as well as in System.Buffer methods. System.Buffer is supposed to be used over Array.Copy for better performance so I believe that having a managed System.Buffer would affect overall performance. You have written that GetElementSize() should not be added yet. Is there an ongoing work that would interfere with this or why should that wait? Thanks for your help. Kornél - Original Message - From: Paolo Molaro [EMAIL PROTECTED] To: mono-devel-list@lists.ximian.com Sent: Thursday, December 20, 2007 4:14 PM Subject: Re: [Mono-dev] [PATCH] Managed Marshal.Copy implemantations On 12/20/07 Kornél Pál wrote: It's an extra check because the shared methods will have Array as the type and they could be misused. They are private so I prefer not to be used anywhere else than extra checks. (I added comments before these methods about that.) The check is cheap and it should go in. BTW, please send patches as text attachments, not as binaries, thanks. Index: mono/mono/metadata/icall-def.h === --- mono/mono/metadata/icall-def.h (revision 91652) +++ mono/mono/metadata/icall-def.h (working copy) @@ -91,15 +91,17 @@ ICALL(ARRAY_2, Clone,mono_array_clone) ICALL(ARRAY_3, CreateInstanceImpl, ves_icall_System_Array_CreateInstanceImpl) ICALL(ARRAY_4, FastCopy, ves_icall_System_Array_FastCopy) -ICALL(ARRAY_5, GetGenericValueImpl, ves_icall_System_Array_GetGenericValueImpl) -ICALL(ARRAY_6, GetLength,ves_icall_System_Array_GetLength) -ICALL(ARRAY_7, GetLowerBound,ves_icall_System_Array_GetLowerBound) -ICALL(ARRAY_8, GetRank, ves_icall_System_Array_GetRank) -ICALL(ARRAY_9, GetValue, ves_icall_System_Array_GetValue) -ICALL(ARRAY_10, GetValueImpl, ves_icall_System_Array_GetValueImpl) -ICALL(ARRAY_11, SetGenericValueImpl, ves_icall_System_Array_SetGenericValueImpl) -ICALL(ARRAY_12, SetValue, ves_icall_System_Array_SetValue) -ICALL(ARRAY_13, SetValueImpl, ves_icall_System_Array_SetValueImpl) +ICALL(ARRAY_5, GetElementSize, ves_icall_System_Array_GetElementSize) There is no need to rewrite everything, just add your icall. @@ -395,7 +397,7 @@ ICALL(OBJ_1, GetType, ves_icall_System_Object_GetType) ICALL(OBJ_2, InternalGetHashCode, mono_object_hash) ICALL(OBJ_3, MemberwiseClone, ves_icall_System_Object_MemberwiseClone) -ICALL(OBJ_4, obj_address, ves_icall_System_Object_obj_address) +ICALL(OBJ_4, UnsafeAddrOfPinnedObject, ves_icall_System_Object_UnsafeAddrOfPinnedObject) Uneeded renaming, drop it. Index: mono/mono/metadata/icall.c === --- mono/mono/metadata/icall.c (revision 91652) +++ mono/mono/metadata/icall.c (working copy) @@ -713,6 +713,22 @@ memcpy (ea, value, esize); } +static gint +ves_icall_System_Array_GetElementSize (MonoObject *this) +{ + MONO_ARCH_SAVE_REGS; + + return mono_array_element_size (this-vtable-klass); +} This icall is not needed for this change: as I mentioned it's better to add a size argument to copy_to_unmanaged etc. +static gint +ves_icall_System_Array_GetOffsetToArrayData (void) +{ + MONO_ARCH_SAVE_REGS; + + return offsetof (MonoArray, vector); +} This is not the icall that I suggested: you need to return an IntPtr to the beginning of the elements: static void* array_get_array_data_ptr (MonoArray *array) { return array-vector [0]; } Index: mono/mono/mini/mini.c === --- mono/mono/mini/mini.c (revision 91652) +++ mono/mono/mini/mini.c (working copy) @@ -3449,13 +3449,61 @@ ins-inst_i0 = args [0]; return ins; #endif + } else if (strcmp (cmethod-name, UnsafeAddrOfPinnedObject) == 0) { + return args [0]; This is not correct and this icall should not be optimized, since there are no users. } else if (strcmp (cmethod-name, .ctor) == 0) { MONO_INST_NEW (cfg, ins, OP_NOP); return ins; } else return NULL; } else if (cmethod-klass == mono_defaults.array_class) { - if (cmethod-name [0] != 'g') + if (cmethod-name [0] == 'G') { + if (strcmp (cmethod-name, GetElementSize) == 0) { + MonoInst *load_vtable, *load_klass; + + MONO_INST_NEW (cfg, load_vtable, CEE_LDIND_I); + if (G_STRUCT_OFFSET (MonoObject, vtable)) { vtable will always be at offset 0. Anyway, this icall should not be added for now. Index: mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs === --- mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs (revision 91652) +++ mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs (working copy) @@ -1020,8 +1060,10 @@ throw ex; } -
Re: [Mono-dev] Problems with IHttpHandler
I've discovered what makes it error, though not why. As soon as I add a field (private field in this case) whatever handles the HttpHandlers stop recognizing the custom handler as a valid IHttpHandler. This is obviously incorrect, as other mono code (my program I mentioned) does recognize it, and so does .NET I'll get a test case together and a bug reported shortly. Yes. I added MonoServerPath /usr/local/bin/mod-mono-server2 to the mod_mono.conf file before attempting this. However, I've just been trying to create the test case, by creating a test site and dll, and don't seem to be able to replicate the error. So now I'm even more confused. Hi! Are you sure you run it with mod_mono_server2 rather than the default mod_mono_server? Cheers, MichaÅ Ziemski Nik Radford pisze: Yes, this I've already done. Basically I'm doing a catch all for the http handler, the entry for my web config looks like so httpHandlers add path=* verb=* type=TerminalDischarge.Web.HttpHandler.HttpHandler, TerminalDischarge.Web/ /httpHandlers I'm using for URL rewritting. and the HttpHandler i'm using looks like this: (sorry if its a bit much, I just copy pasted the whole file) using System; using System.Collections.Generic; using System.Configuration; using System.IO; using System.Text; using System.Web; using System.Web.UI; using System.Xml; using TerminalDischarge.Web.Mapping; namespace TerminalDischarge.Web.HttpHandler { public class HttpHandler : IHttpHandler { #region Internals private readonly ListMap m_Maps; #endregion #region Constructors public HttpHandler() { m_Maps = new ListMap(); } #endregion #region Public Members ///summary ///Enables processing of HTTP Web requests by a custom HttpHandler that implements the see cref=T:System.Web.IHttpHandler/see interface. summary /// ///param name=contextAn see cref=T:System.Web.HttpContext/see object that provides references to the intrinsic server objects (for example, Request, Response, Session, and Server) used to service HTTP requests. /param public void ProcessRequest(HttpContext context) { AddPaths(context); string url = context.Request.Path; foreach (Map m in m_Maps) { if (m.DoesMatch(url)) { string destination = m.MapUrl(url); try { string fileName = context.Server.MapPath(destination); Page page = PageParser.GetCompiledPageInstance(destination, fileName, context) as Page; if (page != null) { context.RewritePath(destination); page.ProcessRequest(context); return; } } catch (HttpException) { PageNotFound(context); return; } } } { //no match found, so palm off to default handler System.Web.DefaultHttpHandler defaultHttpHandler = new DefaultHttpHandler(); defaultHttpHandler.BeginProcessRequest(context, null, null); return; } } #endregion #region Private Members /// summary /// Displays a simple error if a path isn't found /// /summary /// param name=context/param private void PageNotFound(HttpContext context) { context.Response.StatusCode = 404; context.Response.Write(string.Format(The page {0} was not found, context.Request.Path)); } /// summary /// Parses the path mapping file and populates the map list /// /summary /// param name=contextAn see cref=T:System.Web.HttpContext/see object that provides references to the /// intrinsic server objects (for example, Request, Response, Session, and Server) used to service HTTP requests. /param private void AddPaths(HttpContext context) { m_Maps.Clear(); //get mapping filename string mapFile = context.Server.MapPath(ConfigurationManager.AppSettings[PathMap]); //Load it XmlDocument xDoc = new XmlDocument(); xDoc.Load(mapFile); XmlNodeList mapNodes = xDoc.SelectNodes(/Mapping/Map); //we should get back a list of all our document mapping //parse it and populate our map list foreach (XmlNode node in mapNodes) { XmlNode xSearchFor =
[Mono-dev] [PATCH] Improve loader errors
The attached patch make the loader report more accurate errors. First, field_from_memberref now set a loader error when the type is not found, this change will improve the exception message thrown and will make things much simpler on the verifier side. Second, method_from_memberref when the type is not found a type_load error is set instead of method_missing. This is the MS behavior. Please review. Rodrigo Index: metadata/loader.c === --- metadata/loader.c (revision 96423) +++ metadata/loader.c (working copy) @@ -75,7 +75,7 @@ * with the appropriate arguments, then return NULL to report the failure. The error * should be propagated until it reaches code which can throw managed exceptions. At that * point, an exception should be thrown based on the information returned by - * mono_loader_get_error (). Then the error should be cleared by calling + * mono_loader_get_last_error (). Then the error should be cleared by calling * mono_loader_clear_error (). */ @@ -358,8 +358,9 @@ case MONO_MEMBERREF_PARENT_TYPEDEF: klass = mono_class_get (image, MONO_TOKEN_TYPE_DEF | nindex); if (!klass) { - char *name = mono_class_name_from_token (image, MONO_TOKEN_TYPE_REF | nindex); - g_warning (Missing field %s in class %s (typeref index %d), fname, name, nindex); + char *name = mono_class_name_from_token (image, MONO_TOKEN_TYPE_DEF | nindex); + g_warning (Missing field %s in class %s (typedef index %d), fname, name, nindex); + mono_loader_set_error_type_load (name, image-assembly_name); g_free (name); return NULL; } @@ -372,7 +373,8 @@ klass = mono_class_from_typeref (image, MONO_TOKEN_TYPE_REF | nindex); if (!klass) { char *name = mono_class_name_from_token (image, MONO_TOKEN_TYPE_REF | nindex); - g_warning (Missing field %s in class %s (typeref index %d), fname, name, nindex); + g_warning (missing field %s in class %s (typeref index %d), fname, name, nindex); + mono_loader_set_error_type_load (name, image-assembly_name); g_free (name); return NULL; } @@ -396,6 +398,7 @@ mono_class_init (klass); g_print (type in sig: %s\n, klass-name);*/ klass = mono_class_get_full (image, MONO_TOKEN_TYPE_SPEC | nindex, context); + //FIXME can't klass be null? mono_class_init (klass); if (retklass) *retklass = klass; @@ -771,7 +774,7 @@ if (!klass) { char *name = mono_class_name_from_token (image, MONO_TOKEN_TYPE_REF | nindex); g_warning (Missing method %s in assembly %s, type %s, mname, image-name, name); - mono_loader_set_error_method_load (name, mname); + mono_loader_set_error_type_load (name, image-assembly_name); g_free (name); return NULL; } @@ -784,7 +787,7 @@ if (!klass) { char *name = mono_class_name_from_token (image, MONO_TOKEN_TYPE_SPEC | nindex); g_warning (Missing method %s in assembly %s, type %s, mname, image-name, name); - mono_loader_set_error_method_load (name, mname); + mono_loader_set_error_type_load (name, image-assembly_name); g_free (name); return NULL; } @@ -794,7 +797,7 @@ if (!klass) { char *name = mono_class_name_from_token (image, MONO_TOKEN_TYPE_DEF | nindex); g_warning (Missing method %s in assembly %s, type %s, mname, image-name, name); - mono_loader_set_error_method_load (name, mname); + mono_loader_set_error_type_load (name, image-assembly_name); g_free (name); return NULL; } // CIL which breaks the ECMA-335 rules. // this CIL should fail verification by a conforming CLI verifier. .assembly 'call_missing_class_generated' { .hash algorithm 0x8004 .ver 0:0:0:0 } .class public auto ansi beforefieldinit MissingMember extends [mscorlib]System.Object { .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed { .maxstack 8 ldarg.0 call instance void object::.ctor() ret } } .class public auto ansi beforefieldinit Driver extends [mscorlib]System.Object { .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed { .maxstack 8 ldarg.0 call instance void object::.ctor() ret } .method public static void NoInline() cil managed { .maxstack 8 ret } .method public static void TestMethod() cil managed { .maxstack 8 call void Driver::NoInline() call int32 [mscorlib]MissingClass::Method() leave END END: ret } .method public static int32 Main() cil managed { .entrypoint .maxstack 8 .locals init ( class [mscorlib]System.Exception V_0, int32 V_1) ldc.i4.0 stloc.1 .try { call void Driver::TestMethod() ldstr call_missing_class did not throw an exception call void class [mscorlib]System.Console::WriteLine(string) ldc.i4.1 stloc.1 leave END } catch [mscorlib]System.Exception { stloc.0 ldloc.0 callvirt instance class [mscorlib]System.Type class [mscorlib]System.Exception::GetType() ldtoken
Re: [Mono-dev] Mono 1.9.0 Preview 2 is out!!
This bug has been fixed and will be part of Preview 3. Thanks, Thomas Michał Ziemski wrote: Hi! There seems to be a problem handling anonymous methods returning multidimensional arrays. I have submitted a bug report #363218 Best regards, Michał Ziemski Thomas Wiest pisze: Hey Everyone, We've just released Mono 1.9.0 Preview 2 today! This preview has Windows and Mac OS X installers. Please help us out by giving it a try with your applications. As always, you can get the preview releases here: http://mono.ximian.com/monobuild/preview/download-preview/ Please report any bugs that you may find using our Bugs page, AND reply to this thread with the bug numbers so we can track them! http://www.mono-project.com/Bugs The earlier you file the bugs and reply to this message, the more likely your bugs will get fixed. Special attention is given to regressions, so if you can tell us a version of Mono where the bug worked and you tag the summary of the bug with [Regression], then it is much more likely your bug will get fixed. Please help the Mono team to make 1.9.0 the best release of Mono ever. Thanks again! Mono QA ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] Linq to Sql status
Hi, What is the status of Linq to Sql? -- Sharique uddin Ahmed Farooqui (C++/C# Developer, IT Consultant) A revolution is about to begin. A world is about to change. And you and I are the initiator. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Linq to Sql status
Hello, What is the status of Linq to Sql? We have more less stubs only of relevant assemblies and IIRC don't not match RTM. Regards, Marek -- Sharique uddin Ahmed Farooqui (C++/C# Developer, IT Consultant) A revolution is about to begin. A world is about to change. And you and I are the initiator. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Mono 1.9.0 Preview 2 is out!!
Hi, I we could get the changes committed in r96259, r96267, and r96268 for bug 361709 https://bugzilla.novell.com/show_bug.cgi?id=361709could be added to 1.9 as well. I've also posted a patch and testcase to the bug to fix some of the other outlyers if someone could look it over. Thanks, Justin ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Mono 1.9.0 Preview 2 is out!!
Sorry, I wasn't sure if my message got sent to the list: Hi, I was wondering if we could get the changes committed in r96259, r96267, and r96268 for bug 361709 https://bugzilla.novell.com/show_bug.cgi?id=361709added to 1.9 as well. I've also posted a patch and testcase to the bug to fix some of the other outliers if someone would be kind enough to look that over too. Thanks, Justin ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list