Re: [Mono-dev] Improving memory usage in /System.Web.SessionState/SessionSQLServerHandler.cs
Could someone commit this patch? Thanks Le lundi 27 novembre 2006 à 12:17 +0100, Hubert FONGARNAND a écrit : Hi, When using Npgsql, if you try to send (INSERT or UPDATE) a bytea (blob) element without using Prepare it will be sent as a Escaped string... This string is 4x bigger than the real bytea... So : The memory usage on the ASP.NET server is enormous when the blob is more than 1MB... and the network traffic is enormous too! (see http://pgfoundry.org/tracker/index.php?func=detailaid=1000458group_id=1000140atid=590) If you want to avoid that you've to use Prepare before executing ExecuteNonQuery, or ExecuteReader... If you don't believe me use Ethereal (wireshark) Here's a patch that add a cmd.Prepare allowing Npgsql sending data in binary format! This patch shouldn't change anything if you use other connector than Npgsql. Thanks to review it! Hubert FONGARNAND Index: mcs/class/System.Web/System.Web.SessionState/SessionSQLServerHandler.cs === --- mcs/class/System.Web/System.Web.SessionState/SessionSQLServerHandler.cs (révision 68495) +++ mcs/class/System.Web/System.Web.SessionState/SessionSQLServerHandler.cs (copie de travail) @@ -196,6 +196,7 @@ command.CommandText = selectCommand; command.Parameters.Add (CreateParam (command, DbType.String, SessionID, id)); command.Parameters.Add (CreateParam (command, DbType.DateTime, Expires, DateTime.Now )); + command.Prepare(); return command.ExecuteReader (); } @@ -253,7 +254,7 @@ session.StaticObjects.ToByteArray ())); param.Add (CreateParam (command, DbType.Binary, SessionData, session.SessionDictionary.ToByteArray ())); - + command.Prepare(); command.ExecuteNonQuery (); } @@ -287,6 +288,7 @@ param.Add (CreateParam (command, DbType.Int32, Timeout, timeout)); param.Add (CreateParam (command, DbType.Binary, SessionData, dict.ToByteArray ())); + command.Prepare(); command.ExecuteNonQuery (); } ___ Ce message et les ventuels documents joints peuvent contenir des informations confidentielles. Au cas o䵲 il ne vous serait pas destin, nous vous remercions de bien vouloir le supprimer et en aviser imm洸diatement l'expditeur. Toute utilisation de ce message non conforme ⭁ sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite. Les communications sur internet n'tant pas s牌curises, l'intߜgrit de ce message n'est pas assurŨe et la socit㵵 mettrice ne peut 攮tre tenue pour responsable de son contenu. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Ce message et les �ventuels documents joints peuvent contenir des informations confidentielles. Au cas o� il ne vous serait pas destin�, nous vous remercions de bien vouloir le supprimer et en aviser imm�diatement l'exp�diteur. Toute utilisation de ce message non conforme � sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite. Les communications sur internet n'�tant pas s�curis�es, l'int�grit� de ce message n'est pas assur�e et la soci�t� �mettrice ne peut �tre tenue pour responsable de son contenu. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Improving memory usage in /System.Web.SessionState/SessionSQLServerHandler.cs
Hi Hubert, Hubert FONGARNAND wrote: Could someone commit this patch? Let me check it first against another DB providers. Robert Thanks Le lundi 27 novembre 2006 à 12:17 +0100, Hubert FONGARNAND a écrit : Hi, When using Npgsql, if you try to send (INSERT or UPDATE) a bytea (blob) element without using Prepare it will be sent as a Escaped string... This string is 4x bigger than the real bytea... So : The memory usage on the ASP.NET server is enormous when the blob is more than 1MB... and the network traffic is enormous too! (see http://pgfoundry.org/tracker/index.php?func=detailaid=1000458group_id=1000140atid=590) If you want to avoid that you've to use Prepare before executing ExecuteNonQuery, or ExecuteReader... If you don't believe me use Ethereal (wireshark) Here's a patch that add a cmd.Prepare allowing Npgsql sending data in binary format! This patch shouldn't change anything if you use other connector than Npgsql. Thanks to review it! Hubert FONGARNAND Index: mcs/class/System.Web/System.Web.SessionState/SessionSQLServerHandler.cs === --- mcs/class/System.Web/System.Web.SessionState/SessionSQLServerHandler.cs (révision 68495) +++ mcs/class/System.Web/System.Web.SessionState/SessionSQLServerHandler.cs (copie de travail) @@ -196,6 +196,7 @@ command.CommandText = selectCommand; command.Parameters.Add (CreateParam (command, DbType.String, SessionID, id)); command.Parameters.Add (CreateParam (command, DbType.DateTime, Expires, DateTime.Now )); + command.Prepare(); return command.ExecuteReader (); } @@ -253,7 +254,7 @@ session.StaticObjects.ToByteArray ())); param.Add (CreateParam (command, DbType.Binary, SessionData, session.SessionDictionary.ToByteArray ())); - + command.Prepare(); command.ExecuteNonQuery (); } @@ -287,6 +288,7 @@ param.Add (CreateParam (command, DbType.Int32, Timeout, timeout)); param.Add (CreateParam (command, DbType.Binary, SessionData, dict.ToByteArray ())); + command.Prepare(); command.ExecuteNonQuery (); } ___ Ce message et les ventuels documents joints peuvent contenir des informations confidentielles. Au cas o䵲 il ne vous serait pas destin, nous vous remercions de bien vouloir le supprimer et en aviser imm洸diatement l'expditeur. Toute utilisation de ce message non conforme ⭁ sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite. Les communications sur internet n'tant pas s牌curises, l'intߜgrit de ce message n'est pas assurŨe et la socit㵵 mettrice ne peut 攮tre tenue pour responsable de son contenu. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Ce message et les �ventuels documents joints peuvent contenir des informations confidentielles. Au cas o� il ne vous serait pas destin�, nous vous remercions de bien vouloir le supprimer et en aviser imm�diatement l'exp�diteur. Toute utilisation de ce message non conforme � sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite. Les communications sur internet n'�tant pas s�curis�es, l'int�grit� de ce message n'est pas assur�e et la soci�t� �mettrice ne peut �tre tenue pour responsable de son contenu. ___ 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] Running under the Mono 2.0 Profile
On Mon, 2006-11-27 at 09:59 -0800, Charlie Poole wrote: Hi Mirco, Sure, this is what we use for the normal static situation where you always want a particular program to run under a given profile. But it doesn't work for a more dynamic situation, such as a developer needing to test different programs under NUnit using different profiles. For that purpose, we have menu items that say Run under .Net 1.1, etc. This is implemented by using the COMPLUS_VERSION environment variable. For Mono, we currently only say Run under Mono It would be nice if we could have Run under Mono 1.0 Profile and Run under Mono 2.0 Profile I probably should have explained all this in my note in the first place. :-( Charlie For compatibility someone could implement that environment setting for Mono, but in the meantime you could just generate that app config file when you push the Run under Mono 2.0 Profile button on the fly, or is that too absurd? :-P Actually, it's not the test-case that decides if it wants 2.0 profile or not, it's the application that loads the test-case, nunit in this case. So all you need is 2 nunit exe files, one that is linked against 1.0 and one against 2.0, or use the app config trick and use 1.0 exe files instead. Or is the problem that you can't start a new nunit process for running the test-case? Then this solution would not work. -- Regards, Mirco 'meebey' Bauer PGP-Key: http://keyserver.noreply.org/pks/lookup?op=getsearch=0xEEF946C8 -BEGIN GEEK CODE BLOCK- Version: 3.12 GIT d s-:+ a-- C++ UL$ P L++$+++$ E- W+++$ N o? K- w++! O M- V? PS PE+ Y- PGP++ t 5+ X++ R tv+ b+ DI? D+ G++ e h! r-++ y? --END GEEK CODE BLOCK-- signature.asc Description: This is a digitally signed message part ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] PATCH:xmlSerializationGenericsTests.patch
Hi, Having those tests (with NotWorking) is good, but please don't break several code blocks which were conformant to our coding style i.e. don't do like - - private void Serialize (object o, Type type) + + private void Serialize(object o, Type type) Thanks, Atsushi Eno Tal Klar wrote: Hi, The attached patch contains 32 tests for System.Xml.Serialization Generics scenarios. All tests fail. Please review the tests. Should we commit them with NotWorking attribute? Open bugs in Bugzilla? Thanks, Tal ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Moma early results.
On 11/28/06, Jonathan Pobst [EMAIL PROTECTED] wrote: Usage frequency I suppose. If DataRowCollection.Count is listed 100 times for example, it doesn't mean the property is called 100 times at runtime, it actually means the user has typed it out 100 times in their code, and would need to replace/change/fix all 100 occurrences. It's probably more useful for the user's results report than the submitted report, but we can still use it to determine that implementing this one little property is going to alleviate 1000 calls across 10 apps instead of 10 calls over 10 apps. Jon Alan McGovern wrote: Not sure if this has been fixed already or not, but if you look at the largest file in the archive, it has the same methods reported multiple times (100's of times?). Is there any point to that? Alan. On 11/27/06, *Miguel de Icaza* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hey folks, I have posted the 102 results that have been submitted so far from running Moma on people's binaries. The results have been cleaned up a little bit, I removed a few methods that were implemented and methods that had bogus MonoTODO entries, which were removed in the last couple of weeks since the original databases for Moma were created. The results are available here: http://primates.ximian.com/~miguel/tmp/results-moma.tar.gz http://primates.ximian.com/~miguel/tmp/results-moma.tar.gz It is worth noticing that in some cases, an API in the documentation is flagged as existing in 1.1 and 2.0, while the actual method was introduced in 2.0. This happens because in 1.1 you could still call the method, and the call would be satisfied by calling into the parent class of a method. For example Exception.GetType() is a method that calls into base.GetType(), it is flagged in the documentation as available in 1.1, but it did not actually exist back then. So to implement methods like this, the #if NET_2_0 must be used; The same happens extensively in Windows.Forms, when they had to override a few methods to catch some values (is my guess), they are documented as being in 1.1, but they were not. It is important thus to check the results of corcompare, see: http://mono.ximian.com/class-status/mono-HEAD-vs-fx-2/ http://mono.ximian.com/class-status/mono-HEAD-vs-fx-2/ and: http://mono.ximian.com/class-status/mono-HEAD-vs-fx-1-1/ A simple summary: [smaller values clipped] 108 System.Void System.Windows.Forms.Form::set_Location(System.Drawing.Point) 114 System.Void System.Windows.Forms.TableLayoutControlCollection::Add(System.Windows.Forms.Control,System.Int32,System.Int32) 115 Microsoft.Win32.RegistryKey Microsoft.Win32.RegistryKey::CreateSubKey(System.String) 117 System.Windows.Forms.TableLayoutControlCollection System.Windows.Forms.TableLayoutPanel::get_Controls() 121 System.Void System.Windows.Forms.ToolStripItem::set_ImageTransparentColor(System.Drawing.Color) 125 System.Void System.Windows.Forms.TabPage::set_Location(System.Drawing.Point) 132 System.Void System.Windows.Forms.ToolStripItem::set_BackgroundImage(System.Drawing.Image) 143 System.Collections.IEnumerator System.Data.DataRowCollection::GetEnumerator() 169 System.Windows.Forms.Control System.Windows.Forms.Design.ControlDesigner::get_Control() 184 System.Int32 System.Xml.Serialization.XmlSerializationReader::get_ReaderCount() 184 System.Void System.Xml.Serialization.XmlSerializationReader::CheckReaderCount(System.Int32,System.Int32) 188 System.Int32 Microsoft.VisualBasic.CompilerServices.ObjectType::ObjTst(System.Object,System.Object,System.Boolean) 245 System.Data.DataRow System.Data.DataRowView::get_Row() 247 System.Void System.Windows.Forms.ButtonBase::set_Text(System.String) 292 System.Object System.ComponentModel.Design.ComponentDesigner::GetService(System.Type) 341 System.Void System.Security.CodeAccessPermission::Assert() 352 System.Int32 System.Data.DataRowCollection::get_Count() 381 System.Void System.Data.SqlClient.SqlParameter::.ctor(System.String,System.Data.SqlDbType,System.Int32,System.Data.ParameterDirection,System.Byte,System.Byte,System.String,System.Data.DataRowVersion,System.Boolean,System.Object,System.String,System.String,System.String) 488 System.ComponentModel.IComponent System.ComponentModel.Design.ComponentDesigner::get_Component() 2108 System.Void System.Data.DataSet::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext,System.Boolean) This was produced by concatenating all the reports into a single file named summary, then processing it
[Mono-dev] [PATCH] System.Net/ServicePointManager.cs
Hello all, Please review the patch resolving an infinite loop in ServicePointManager.RecycleServicePoints(). Regards, Konstantin Triger ServicePointManager.patch Description: ServicePointManager.patch ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Moma early results.
Miguel de Icaza escribió: Hey folks, Thanks for the info Miguel. I have posted the 102 results that have been submitted so far from running Moma on people's binaries. The results have been cleaned up a little bit, I removed a few methods that were implemented and methods that had bogus MonoTODO entries, which were removed in the last couple of weeks since the original databases for Moma were created. I have found also that there are many empty MonoTODOs at the ManagementObject class and some other classes that lay in similar namespaces. This is the full listing: Method with [MonoTodo] Reason ObjectGetOptions ManagementObject.get_Options() Not Specified PropertyDataCollection ManagementBaseObject.get_Properties()Not Specified PropertyDataCollection/PropertyDataEnumerator PropertyDataCollection.GetEnumerator() Not Specified PropertyData PropertyDataCollection/PropertyDataEnumerator.get_Current() Not Specified string PropertyData.get_Name() Not Specified bool PropertyDataCollection/PropertyDataEnumerator.MoveNext() Not Specified QualifierDataCollection PropertyData.get_Qualifiers() Not Specified QualifierDataCollection/QualifierDataEnumerator QualifierDataCollection.GetEnumerator() Not Specified QualifierData QualifierDataCollection/QualifierDataEnumerator.get_Current() Not Specified string QualifierData.get_Name() Not Specified bool QualifierDataCollection/QualifierDataEnumerator.MoveNext() Not Specified ManagementObjectCollection/ManagementObjectEnumerator ManagementObjectCollection.GetEnumerator() Not Specified ManagementBaseObject ManagementObjectCollection/ManagementObjectEnumerator.get_Current() Not Specified bool PropertyData.get_IsArray() Not Specified CimType PropertyData.get_Type() Not Specified Object ManagementBaseObject.get_Item(string)Not Specified bool ManagementObjectCollection/ManagementObjectEnumerator.MoveNext() Not Specified Regards, Andrés [ knocte ] -- ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] [Mono-patches] r68496 - in trunk/mcs/class/System.Web:System.Web.UI Test/System.Web.UI
Gonzalo, OpenFile may be implemented this way: protected internal Stream OpenFile (string path) { return System.Web.Hosting.VirtualPathProvider.OpenFile (path); } In this case the corresponding test fails because DefaultVirtualPathProvider.GetFile not supports application relative path (such as ~/MyPage.aspx). I attached corresponding tests. Please, review. Igor. -Original Message- From: Gonzalo Paniagua Javier [mailto:[EMAIL PROTECTED] Sent: Monday, November 27, 2006 8:55 PM To: Igor Zelmanovich; Mono Development Subject: Re: [Mono-patches] r68496 - in trunk/mcs/class/System.Web:System.Web.UI Test/System.Web.UI On Mon, 2006-11-27 at 04:28 -0500, Igor Zalmanovich ([EMAIL PROTECTED]) wrote: Author: igorz Date: 2006-11-27 04:28:15 -0500 (Mon, 27 Nov 2006) New Revision: 68496 Modified: trunk/mcs/class/System.Web/System.Web.UI/ChangeLog trunk/mcs/class/System.Web/System.Web.UI/Control.cs trunk/mcs/class/System.Web/Test/System.Web.UI/ChangeLog trunk/mcs/class/System.Web/Test/System.Web.UI/ControlTest.cs Log: 2006-11-27 Igor Zelmanovich [EMAIL PROTECTED] * Control.cs: implemented OpenFile() The correct implementation of OpenFile have to use the current VirtualPathProvider. The patch you commited works for the general case, but if someone provides a special VirtualPathProvider, it won't work. Please, fix it. -Gonzalo HostingEnvironmentTest.patch Description: HostingEnvironmentTest.patch ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] Revision: 68545
Changes in r68545 cause regressions in tests for 2.0. There is compilation error when *.aspx is parsed: Compilation Error Description: Error compiling a resource required to service this request. Review your source file and modify it to fix this error. Error message: c:\Documents and Settings\igorz\Local Settings\Temp\igorz-temp-aspnet-0\d5d4c8a8\ilejbksq.0.cs(35,36) : error CS0246: The type or namespace name 'String' could not be found (are you missing a using directive or an assembly reference?) c:\Documents and Settings\igorz\Local Settings\Temp\igorz-temp-aspnet-0\d5d4c8a8\ilejbksq.0.cs(52,45) : error CS0246: The type or namespace name 'EventArgs' could not be found (are you missing a using directive or an assembly reference?) c:\Documents and Settings\igorz\Local Settings\Temp\igorz-temp-aspnet-0\d5d4c8a8\ilejbksq.0.cs(68,36) : error CS0246: The type or namespace name 'HtmlTextWriter' could not be found (are you missing a using directive or an assembly reference?) Regards, Igor Zelmanovich. [EMAIL PROTECTED] ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] [PATCH] properly handle configSections
Hello, The attached diff fixes handling for situations where web.config contains code like: ?xml version=1.0 standalone=yes? configuration configSections sectionGroup name=system.web section name=neatUpload type=Brettle.Web.NeatUpload.ConfigSectionHandler,Brettle.Web.NeatUpload allowLocation=true / /sectionGroup /configSections system.web neatUpload useHttpModule=false maxNormalRequestLength=4096 maxRequestLength=2097151 defaultProvider=FilesystemUploadStorageProvider providers add name=FilesystemUploadStorageProvider type=Brettle.Web.NeatUpload.FilesystemUploadStorageProvider,Brettle.Web.NeatUpload tempDirectory=UploadTemp/ /providers /neatUpload /system.web /configuration Current implementation of System.Configuration for the 2.0 runtime will throw an exception claiming that the neatUpload section is unknown. Configuration code does read the configSections but it mistakenly allocates a new system.web section instead of merging it with the existing one. The diff causes the sections to be properly merged and any custom config sections to be recognized. Please, review best regards, marek Index: SectionInfo.cs === --- SectionInfo.cs (revision 68577) +++ SectionInfo.cs (working copy) @@ -207,6 +207,9 @@ tr.Close ();*/ } } + + internal override void Merge (ConfigInfo data) + {} } } Index: ConfigInfo.cs === --- ConfigInfo.cs (revision 68577) +++ ConfigInfo.cs (working copy) @@ -80,6 +80,8 @@ public abstract void WriteConfig (Configuration cfg, XmlWriter writer, ConfigurationSaveMode mode); public abstract void ReadData (Configuration config, XmlTextReader reader, bool overrideAllowed); public abstract void WriteData (Configuration config, XmlWriter writer, ConfigurationSaveMode mode); + + internal abstract void Merge (ConfigInfo data); } } Index: SectionGroupInfo.cs === --- SectionGroupInfo.cs (revision 68577) +++ SectionGroupInfo.cs (working copy) @@ -198,9 +198,9 @@ if (name == section) cinfo = new SectionInfo (); -else if (name == sectionGroup) +else if (name == sectionGroup) { cinfo = new SectionGroupInfo (); -else +} else ThrowException (Unrecognized element: + reader.Name, reader); cinfo.ReadConfig (cfg, streamName, reader); @@ -210,6 +210,9 @@ if (actInfo != null) { if (actInfo.GetType () != cinfo.GetType ()) ThrowException (A section or section group named ' + cinfo.Name + ' already exists, reader); + // Merge all the new data + actInfo.Merge (cinfo); + // Make sure that this section is saved in this configuration file: actInfo.StreamName = streamName; } @@ -340,9 +343,33 @@ if (data != null) return data; } + // It might be in the root section group return null; } + internal override void Merge (ConfigInfo newData) + { + SectionGroupInfo data = newData as SectionGroupInfo; + if (data == null) +return; + ConfigInfo actInfo; + if (data.sections != null data.sections.Count 0) +foreach (string key in data.sections.AllKeys) { + actInfo = sections[key]; + if (actInfo != null) + continue; + sections.Add (key, data.sections[key]); +} + + if (data.groups != null data.sections.Count 0) +foreach (string key in data.groups.AllKeys) { + actInfo = groups[key]; + if (actInfo != null) + continue; + groups.Add (key, data.groups[key]); +} + } + public void WriteRootData (XmlWriter writer, Configuration config, ConfigurationSaveMode mode) { WriteContent (writer, config, mode, false); signature.asc Description: PGP signature ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Revision: 68545
On Tue, 28 Nov 2006 05:10:47 -0800, Igor Zelmanovich [EMAIL PROTECTED] scribbled: Changes in r68545 cause regressions in tests for 2.0. There is compilation error when *.aspx is parsed: Compilation Error Description: Error compiling a resource required to service this request. Review your source file and modify it to fix this error. Error message: c:\Documents and Settings\igorz\Local Settings\Temp\igorz-temp-aspnet-0\d5d4c8a8\ilejbksq.0.cs(35,36) : error CS0246: The type or namespace name 'String' could not be found (are you missing a using directive or an assembly reference?) c:\Documents and Settings\igorz\Local Settings\Temp\igorz-temp-aspnet-0\d5d4c8a8\ilejbksq.0.cs(52,45) : error CS0246: The type or namespace name 'EventArgs' could not be found (are you missing a using directive or an assembly reference?) c:\Documents and Settings\igorz\Local Settings\Temp\igorz-temp-aspnet-0\d5d4c8a8\ilejbksq.0.cs(68,36) : error CS0246: The type or namespace name 'HtmlTextWriter' could not be found (are you missing a using directive or an assembly reference?) Can you post the aspx that fails to compile? I have an .aspx which uses all of the elements and it compiles without any problems with the latest SVN. best regards, marek signature.asc Description: PGP signature ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] TDS 8.0 and SslClientStream
Hello Dmitry, On Tue, 2006-11-28 at 10:57 +0400, Dmitry Key wrote: Hi, all I am working on TDS 8.0 network protocol for the SqlClient and facing with the problem of the handshaking implementation. The corresponding TDS packet consists of the TDS header and TDS body with the TLS handshake packet. So to parse server response we have to read entire TDS packet, analyze its type and, if necessary, extract TLS part and send it to the SslClientStream class. But this class uses asynchronous Stream.BeginRead/EndRead methods in the handshake procedure and it is impossible read data asynchronously from the internal buffer. I see two methods to resolve such a problem. 1) Rewrite handshake code of the SslClientStream/SslBaseStream in the synchronous manner. This code used to be synchronous (see SVN history) and had to be changed to make it work correctly in every case. Another reason to do it is the following: SslStream class from .Net 2.0 uses synchronous methods to make handshake and as far as Wrong. The handshake must be done async if the read/write that initiates an handshake is async. Believe me, we tried, for a long time, in Mono.Security ;-) Anyway I don't see how you come to the conclusion that SslStream use a synchronous method for doing it's handshake. Does your code works around the 2.0 API ? I understand Mono version of this class will be implemented on the basis of the Mono.Security. basis is well said. It will be based on Mono.Security, but it's still undecided if this is gonna be a total rewrite (which would requires lot of time and tests) or a thin wrapper around existing code (easier but we still have the same issues, like high amount of memory allocations). A few people have attempted both approach but never complete the task. 2) Implement IAsyncResult interface in such a way that it will be possible to read data from memory buffer asynchronously. I suppose it can be done as the extension of the MemoryStream class. That's probably much easier and has a lower chance of affecting the current users of the SSL/TLS code. In any case the good knowledge of Mono.Security internals is required. So could some Mono guru help me to solve my problem? -- Sebastien Pouliot [EMAIL PROTECTED] Blog: http://pages.infinit.net/ctech/ ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Revision: 68545
Look at attached. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marek Habersack Sent: Tuesday, November 28, 2006 3:25 PM To: mono-devel-list@lists.ximian.com Subject: Re: [Mono-dev] Revision: 68545 On Tue, 28 Nov 2006 05:10:47 -0800, Igor Zelmanovich [EMAIL PROTECTED] scribbled: Changes in r68545 cause regressions in tests for 2.0. There is compilation error when *.aspx is parsed: Compilation Error Description: Error compiling a resource required to service this request. Review your source file and modify it to fix this error. Error message: c:\Documents and Settings\igorz\Local Settings\Temp\igorz-temp-aspnet-0\d5d4c8a8\ilejbksq.0.cs(35,36) : error CS0246: The type or namespace name 'String' could not be found (are you missing a using directive or an assembly reference?) c:\Documents and Settings\igorz\Local Settings\Temp\igorz-temp-aspnet-0\d5d4c8a8\ilejbksq.0.cs(52,45) : error CS0246: The type or namespace name 'EventArgs' could not be found (are you missing a using directive or an assembly reference?) c:\Documents and Settings\igorz\Local Settings\Temp\igorz-temp-aspnet-0\d5d4c8a8\ilejbksq.0.cs(68,36) : error CS0246: The type or namespace name 'HtmlTextWriter' could not be found (are you missing a using directive or an assembly reference?) Can you post the aspx that fails to compile? I have an .aspx which uses all of the elements and it compiles without any problems with the latest SVN. best regards, marek EventValidationTest1.aspx Description: EventValidationTest1.aspx ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Revision: 68545
On Tue, 28 Nov 2006 05:30:58 -0800, Igor Zelmanovich [EMAIL PROTECTED] scribbled: Look at attached. It works fine for me. Make sure you have the updated 2.0 profile web.config from r68544. Please let me know if it works for you after you will have updated that file, best regards, marek signature.asc Description: PGP signature ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Revision: 68545
I updated web.config. Works fine. Thanks. -Original Message- From: Marek Habersack [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 28, 2006 3:40 PM To: Igor Zelmanovich Cc: mono-devel-list@lists.ximian.com Subject: Re: [Mono-dev] Revision: 68545 On Tue, 28 Nov 2006 05:30:58 -0800, Igor Zelmanovich [EMAIL PROTECTED] scribbled: Look at attached. It works fine for me. Make sure you have the updated 2.0 profile web.config from r68544. Please let me know if it works for you after you will have updated that file, best regards, marek ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] ChangeLog policy?
I have noticed that on revision 68577 some changelogs has been deleted, instead of just pointing out the refactoring in a new changelog entry. Is that ok? Regards. Andrés [ knocte ] -- ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] ChangeLog policy?
It is just a mistaken commit. I've already asked Hagit to revert it. Atsushi Eno Andrés G. Aragoneses [ knocte ] wrote: I have noticed that on revision 68577 some changelogs has been deleted, instead of just pointing out the refactoring in a new changelog entry. Is that ok? Regards. Andrés [ knocte ] ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] [Mono-patches] r68496 - in trunk/mcs/class/System.Web:System.Web.UI Test/System.Web.UI
On Tue, 2006-11-28 at 04:31 -0800, Igor Zelmanovich wrote: Gonzalo, OpenFile may be implemented this way: protected internal Stream OpenFile (string path) { return System.Web.Hosting.VirtualPathProvider.OpenFile (path); } In this case the corresponding test fails because DefaultVirtualPathProvider.GetFile not supports application relative path (such as ~/MyPage.aspx). That means that there's something else to Control.OpenFile, not that using the virtual path provider in OpenFile is wrong (easy to test, just add your own virtualpathprovider and call Control.OpenFile with a few different values. You can also see it in the stacktraces from MS runtime). Also it is documented to work on physical and virtual paths, which will be a problem on linux as there's no way of saying that a given path is physical or virtual without checking for the file to exist. -Gonzalo ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Moma early results.
Hello, I have posted the 102 results that have been submitted so far from running Moma on people's binaries. My own investigations from last night are posted here: http://tirania.org/blog/archive/2006/Nov-28.html It is far from complete, but should give people a taste. Miguel ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] Performance improvments in DataRow
Hi, I've posted a patch that resolve a performance problem on DataRow... (ADO.NET) see : http://bugzilla.ximian.com/show_bug.cgi?id=80075 with this patch, my ported ASP.NET is now at 0.93 second for 1 page (it was 2s before...) ___ Ce message et les éventuels documents joints peuvent contenir des informations confidentielles. Au cas où il ne vous serait pas destiné, nous vous remercions de bien vouloir le supprimer et en aviser immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite. Les communications sur internet n'étant pas sécurisées, l'intégrité de ce message n'est pas assurée et la société émettrice ne peut être tenue pour responsable de son contenu. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Performance improvments in DataRow
Hi, Nice work :) Few comments about the patch (only with respect to coding standards ;). Add required spacing where ever appropriate. + Doublet d= (Doublet)columnNameCount[name.ToLower()]; + if (d!=null) something like + Doublet d = (Doublet) columnNameCount [name.ToLower ()]; + if (d != null) Modify the following + if (d!=null) + { as + if (d!=null) { + Also, add a generic test-case. Thanks Nagappan Nagappan A [EMAIL PROTECTED] Linux Desktop Testing Project - http://ldtp.freedesktop.org http://nagappanal.blogspot.com Novell, Inc. SUSE® Linux Enterprise 10 Your Linux is ready™ http://www.novell.com/linux Hubert FONGARNAND [EMAIL PROTECTED] 11/28/06 10:35 PM Hi, I've posted a patch that resolve a performance problem on DataRow... (ADO.NET) see : http://bugzilla.ximian.com/show_bug.cgi?id=80075 with this patch, my ported ASP.NET is now at 0.93 second for 1 page (it was 2s before...) ___ Ce message et les Θventuels documents joints peuvent contenir des informations confidentielles. Au cas o⋅ il ne vous serait pas destinΘ, nous vous remercions de bien vouloir le supprimer et en aviser immΘdiatement l'expΘditeur. Toute utilisation de ce message non conforme α sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite. Les communications sur internet n'Θtant pas sΘcurisΘes, l'intΘgritΘ de ce message n'est pas assurΘe et la sociΘtΘ Θmettrice ne peut Ωtre tenue pour responsable de son contenu. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] [PATCH] properly handle configSections
Hello, The attached diff fixes handling for situations where web.config contains code like: ?xml version=1.0 standalone=yes? configuration configSections sectionGroup name=system.web section name=neatUpload type=Brettle.Web.NeatUpload.ConfigSectionHandler,Brettle.Web.NeatUpload allowLocation=true / /sectionGroup /configSections system.web neatUpload useHttpModule=false maxNormalRequestLength=4096 maxRequestLength=2097151 defaultProvider=FilesystemUploadStorageProvider providers add name=FilesystemUploadStorageProvider type=Brettle.Web.NeatUpload.FilesystemUploadStorageProvider,Brettle.Web.NeatUpload tempDirectory=UploadTemp/ /providers /neatUpload /system.web /configuration Current implementation of System.Configuration for the 2.0 runtime will throw an exception claiming that the neatUpload section is unknown. Configuration code does read the configSections but it mistakenly allocates a new system.web section instead of merging it with the existing one. The diff causes the sections to be properly merged and any custom config sections to be recognized. Please, review best regards, marek Index: SectionInfo.cs === --- SectionInfo.cs (revision 68577) +++ SectionInfo.cs (working copy) @@ -207,6 +207,9 @@ tr.Close ();*/ } } + + internal override void Merge (ConfigInfo data) + {} } } Index: ConfigInfo.cs === --- ConfigInfo.cs (revision 68577) +++ ConfigInfo.cs (working copy) @@ -80,6 +80,8 @@ public abstract void WriteConfig (Configuration cfg, XmlWriter writer, ConfigurationSaveMode mode); public abstract void ReadData (Configuration config, XmlTextReader reader, bool overrideAllowed); public abstract void WriteData (Configuration config, XmlWriter writer, ConfigurationSaveMode mode); + + internal abstract void Merge (ConfigInfo data); } } Index: SectionGroupInfo.cs === --- SectionGroupInfo.cs (revision 68577) +++ SectionGroupInfo.cs (working copy) @@ -198,9 +198,9 @@ if (name == section) cinfo = new SectionInfo (); -else if (name == sectionGroup) +else if (name == sectionGroup) { cinfo = new SectionGroupInfo (); -else +} else ThrowException (Unrecognized element: + reader.Name, reader); cinfo.ReadConfig (cfg, streamName, reader); @@ -210,6 +210,9 @@ if (actInfo != null) { if (actInfo.GetType () != cinfo.GetType ()) ThrowException (A section or section group named ' + cinfo.Name + ' already exists, reader); + // Merge all the new data + actInfo.Merge (cinfo); + // Make sure that this section is saved in this configuration file: actInfo.StreamName = streamName; } @@ -340,9 +343,33 @@ if (data != null) return data; } + // It might be in the root section group return null; } + internal override void Merge (ConfigInfo newData) + { + SectionGroupInfo data = newData as SectionGroupInfo; + if (data == null) +return; + ConfigInfo actInfo; + if (data.sections != null data.sections.Count 0) +foreach (string key in data.sections.AllKeys) { + actInfo = sections[key]; + if (actInfo != null) + continue; + sections.Add (key, data.sections[key]); +} + + if (data.groups != null data.sections.Count 0) +foreach (string key in data.groups.AllKeys) { + actInfo = groups[key]; + if (actInfo != null) + continue; + groups.Add (key, data.groups[key]); +} + } + public void WriteRootData (XmlWriter writer, Configuration config, ConfigurationSaveMode mode) { WriteContent (writer, config, mode, false); signature.asc Description: PGP signature ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Running under the Mono 2.0 Profile
Hello Mirco, Thanks for your suggestions... For compatibility someone could implement that environment setting for Mono, but in the meantime you could just generate that app config file when you push the Run under Mono 2.0 Profile button on the fly, or is that too absurd? :-P I've thought of doing that but it creates problems. Most notably, the last config created would be used the next time somebody ran nunit from the command line. That could be surprising - or maybe it's a feature. :-) Actually, it's not the test-case that decides if it wants 2.0 profile or not, it's the application that loads the test-case, nunit in this case. So all you need is 2 nunit exe files, one that is linked against 1.0 and one against 2.0, or use the app config trick and use 1.0 exe files instead. Yes, that's correct. I've considered having two exe's. In fact, I have two entire installs for NUnit 2.2. I was trying to move to a simpler deployment. Only having the exe's is an option, but it seems like a kluge. Or is the problem that you can't start a new nunit process for running the test-case? Then this solution would not work. No - that's a future thing, but not what I'm doing here. At the meeting, we agreed on a command line switch for mono.exe, which is probably the simplest for me to use and seems like the most portable solution. Do I need to do anything to get this moving? If it's not available when I release, I'll probably go with the dual exe approach. Charlie -- Regards, Mirco 'meebey' Bauer PGP-Key: http://keyserver.noreply.org/pks/lookup?op=getsearch=0xEEF946C8 -BEGIN GEEK CODE BLOCK- Version: 3.12 GIT d s-:+ a-- C++ UL$ P L++$+++$ E- W+++$ N o? K- w++! O M- V? PS PE+ Y- PGP++ t 5+ X++ R tv+ b+ DI? D+ G++ e h! r-++ y? --END GEEK CODE BLOCK-- ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] How to compile using App_Code folder
Hi I am struggling to get my site working with 1.2.1 - App_Code functionality. I have 3 simple pages. a Class1.cs in my App_Code folder with literally one method: public static void HelloWorld() { return hello world; } a Default.aspx.cs in the Load method i have Label1.Text = Class1.HelloWorld(); and finally i have the Default.aspx page with only Label1 on it. I have not changed any of the other Visual Studio 2005 settings extra, i am not sure if i am supposed to? But when i execute it under the above scenario i get a error: Description: Error compiling a resource required to service this request. Review your source file and modify it to fix this error. Error message: /opt/mono_home/code/Default.aspx.cs(15,23) : error CS0103: The name `Class1' does not exist in the context of `_Default' File name: /opt/mono_home/code/Default.aspx Source File: /opt/mono_home/code/Default.aspx.cs Line 1: No assembly returned after compilation!? I am very new to compiling under mono. What i do know is that it works 100% if i dont use the Class1.cs file. So for example if i go Lavel1.Text = Hello World; that does work... Any help or a mini tutorial or something on compiling would be great doesnt seem to be much info around. Thanks Peter ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] How to compile using App_Code folder
On Tue, 28 Nov 2006 23:13:05 +0200, Piotr Stulinski [EMAIL PROTECTED] scribbled: Hi I am struggling to get my site working with 1.2.1 - App_Code functionality. I have 3 simple pages. a Class1.cs in my App_Code folder with literally one method: public static void HelloWorld() { return hello world; } C# doesn't allow for methods defined in the main body of a compilation unit. Each compilation unit (a .cs or .vb etc file) must contain only type (class, enum, struct) or namespace declarations which in turn contain methods. That's issue no 1 with the code above. Issue no 2 is that your function declares a void (nothing) return type, while it tries to return a string. Your Class1.cs should look like: public class Class1 { public static string HelloWorld() { return hello world; } } a Default.aspx.cs in the Load method i have Label1.Text = Class1.HelloWorld(); and finally i have the Default.aspx page with only Label1 on it. I have not changed any of the other Visual Studio 2005 settings extra, i am not sure if i am supposed to? But when i execute it under the above scenario i get a error: Description: Error compiling a resource required to service this request. Review your source file and modify it to fix this error. Error message: /opt/mono_home/code/Default.aspx.cs(15,23) : error CS0103: The name `Class1' does not exist in the context of `_Default' That's a correct behavior - due to errors I pointed out above re Class1.cs File name: /opt/mono_home/code/Default.aspx Source File: /opt/mono_home/code/Default.aspx.cs Line 1: No assembly returned after compilation!? I am very new to compiling under mono. What i do know is that it works 100% if i dont use the Class1.cs file. So for example if i go Lavel1.Text = Hello World; that does work... Any help or a mini tutorial or something on compiling would be great doesnt seem to be much info around. Well, there's nothing mono-specific in compiling C# code, provided your program is indeed valid C#. Please make the changes I described, re-test your application and let us know if it worked for you regards, marek signature.asc Description: PGP signature ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] Completion of Mono APIs.
Hello, I have just blogged about the various APIs that are missing when trying to run software on Mono: http://tirania.org/blog/archive/2006/Nov-28-1.html The important bits are the links to the various API calls that are currently being referenced by 244 applications. Thanks for Jonathan Pobst for creating an end-to-end solution. If it was not for Moma, we would have never gotten this list, except by advancing one API at a time by brute bugzilla reports. It is not an easy to use tool, it runs trivially, and best of all has allowed us to collect the data. And the whole package experience is really something that am not used to. Had we gone with my idea of shipping command line tools, we would not be anywhere the current state (244 applications reported in 36 hours). Miguel ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Completion of Mono APIs.
Hello, It is not an easy to use tool, it runs trivially, and best of all has allowed us to collect the data. And the whole package experience is really something that am not used to. The above paragraph makes no sense. That happens when you edit the text a few times before you send it out. It should have read: It is an easy to use tool. Miguel. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list