[Mono-dev] Patch for System.Data.DataTable

2006-01-15 Thread Boris Kirzner
Hello all,

Attached is a proposed patch for DataTable : when removing a column from
table, 
indexes depended on it should be also removed.

If no one objects, I'll commit.

--
Boris Kirzner
Mono RD team, Mainsoft Corporation.
Blogging at http://boriskirzner.blogspot.com/ 


system.data.datatable.diff
Description: system.data.datatable.diff
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


RE: [Mono-dev] System.Web.UI/HtmlTextWriter.cs issue

2006-01-15 Thread Konstantin Triger
Attached 2 patches, which, I believe, handle the issues better.

1. HtmlTextWriter.patch: addresses 1, 2 and 5.
2. button.patch:
Point 3: My better understanding is that we must not delete user
data. Thus we may only append our logic.
Point 4: not in this particular case.
Point 5: Unfortunately I do not know how to create a unit test
for this scenario, as it depends on browser capabilities and some Page
properties. Is there a way to control this?

 
Regards,
Kosta


-Original Message-
From: Ben Maurer [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 12, 2006 9:10 PM
To: Konstantin Triger
Cc: mono-devel-list@lists.ximian.com
Subject: Re: [Mono-dev] System.Web.UI/HtmlTextWriter.cs issue

 In this case the return chk(); will be added to the onclick event in
 addition to the validation code there.

1) you should not use .ToLower to do case insensitive compares, but
String.Compare. Also, you must use the invariant culture.

2) Why would attrName (or the others) ever be null or empty

3) Is onclick the *only* attribute that this happens to?

4) Some of the microsoft code seems to add semicolons for you at the end
of js statements if you don't. Does this one do that too

5) No patch should ever be made without test cases.

-- Ben




HtmlTextWriter.patch
Description: HtmlTextWriter.patch


button.patch
Description: button.patch
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Ldap and Threading

2006-01-15 Thread Mike Glenn
I've been trying to track down some performance issues with a webmail
application that I've writing and I've run into some interesting issues.

First I wrote a simple console app to go through the steps I do for a user
login and profile the execution times. This app simply queues a method (2000
times), to the ThreadPool, that in this case takes an LDAPConnection from a
connection pool and attempts to bind and perform a search. The ldap
connection is then returned to the connection pool and the thread records
execution times. Once all threads complete I print out the time stats per
connection attempt. 

The only issue is that it never completes. The novell ldap lib throws the
following exception from one to three times:


Unhandled Exception: System.ArgumentException: length
in 0x005cc System.Array:Copy (System.Array sourceArray, Int32 sourceIndex,
System.Array destinationArray, Int32 destinationIndex, Int32 length)
in 0x0004b System.Array:Copy (System.Array sourceArray, System.Array
destinationArray, Int32 length)
in 0x00016 System.Collections.ArrayList:CopyTo (System.Array array)
in 0x0002a System.Collections.ArrayList:ToArray ()
in 0x00048 Novell.Directory.Ldap.MessageVector:findMessageById (Int32
msgId)
in 0x001a7 Novell.Directory.Ldap.Connection+ReaderThread:Run ()
in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void ()

Since this exception is thrown inside a thread created by the lib I never
have a chance to catch it and deal. Instead the ldap operation I'm
performing blocks and never completes.

I've also run into a few other issues with threading that I hope can either
be explained or otherwise dealt with.

First if I change the program to just create a new ldap connection each time
instead of using the connection pool things get interesting. The attached
file is a copy of the program setup for this type of run, I've removed the
host and search parameters that are specific to my app. But if you have an
ldap server it shouldn't be hard to set it up for a run against it.

On a single processor box (I've included /proc/cpuinfo and other important
info in the attached files) the program will complete sometimes. Other times
it never completes and throws no exception.

On a multiprocess or box it almost never completes and spits out a mixture
of the following two exceptions (mostly the first one):

Unhandled Exception: System.SystemException: Internal error, cannot create
clone: Thread was being aborted
in 0x0007b Novell.Directory.Ldap.Asn1.Asn1Identifier:Clone ()
in 0x00230 Novell.Directory.Ldap.Asn1.LBERDecoder:decode (System.IO.Stream
in_Renamed, System.Int32[] len)
in 0x0004d Novell.Directory.Ldap.Asn1.Asn1Structured:decodeStructured
(Asn1Decoder dec, System.IO.Stream in_Renamed, Int32 len)
in 0x00023 Novell.Directory.Ldap.Asn1.Asn1Sequence:.ctor (Asn1Decoder dec,
System.IO.Stream in_Renamed, Int32 len)
in 0x00041 Novell.Directory.Ldap.Rfc2251.RfcLdapMessage:.ctor (Asn1Decoder
dec, System.IO.Stream in_Renamed, Int32 len)
in 0x0017d Novell.Directory.Ldap.Connection+ReaderThread:Run ()
in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void ()

Unhandled Exception: System.IndexOutOfRangeException: Asn1Structured: set:
index 1, size 1
in 0x00107 Novell.Directory.Ldap.Asn1.Asn1Structured:get_Renamed (Int32
index)
in 0x0004c Novell.Directory.Ldap.Rfc2251.RfcLdapMessage:.ctor (Asn1Decoder
dec, System.IO.Stream in_Renamed, Int32 len)
in 0x0017d Novell.Directory.Ldap.Connection+ReaderThread:Run ()
in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void ()

I've also noted that that the single processor box performs signficantly
faster (60ms per ldap bind and search) than the multiprocessor box (the few
times it does complete) (200ms or higher per ldap bind and search)

On top of that I've found that MONO_THREADS_PER_CPU has a big effect.
Setting it any higher than the default of 5 causes a performance drop on
both boxes and the deadlocks are more likely.

If on the other hand I set it to zero performance is greatly improved,
although the multibox is still slower. Both boxes are running Gentoo Linux
with Mono 1.1.12. The performance differences between the boxes also has me
worried with the effects that its also likely having on mod_mono/XSP.

As this is a work project I'm very eager to solve these issues. So if
there's anything I can do or provide to assist in solving these issues
please let me know.

Mike Glenn
Senior Web Developer
The Armstrong Group of Companies



using System;
using System.Collections;
using System.IO;
using System.Text;
using System.Threading;
using Novell.Directory.Ldap;

namespace PerfTest
{
/// summary
/// Summary description for Class1.
/// /summary
class PerfTest
{
const intLDAPPORT   = 389;
const string SEARCHBASE = ;
const string AUTH_PATTERN   = ;
const string LDAP_SERVER= ;

const String USER = 

[Mono-list] ASP .NET Application

2006-01-15 Thread Nicolas Cornu

Hello,

I have troubles setting up an asp .net application.
A aspx page work fine but i don't know how to make an asp .net application
i would like to use Global.asax file and the Global class and object.

I did compil all .cs files into a library and put it in the subdirectory 
bin of my website

but i get an error.


With this config without using global.asax the website work:

VirtualHost 192.168.0.2:80
ServerName www.everquest2-fr.com
DocumentRoot /var/www/everquest2-fr.com/httpdocs
#Alias / /var/www/everquest2-fr.com/httpdocs
#AddMonoApplications eq2 /:/var/www/everquest2-fr.com/httpdocs
#Directory /var/www/everquest2-fr.com/httpdocs/
#allow from all
#DirectoryIndex index.aspx index.html index.php
#Options +Indexes
#/Directory
#Location /
#  SetHandler mono
#  Allow from all
#/Location
Location /mono
 SetHandler mono-ctrl
 Allow from all
/Location
ServerName www.everquest2-fr.com
/VirtualHost


With this config without using global.asax the website d'ont work
i get an Internal server error:

VirtualHost 192.168.0.2:80
ServerName www.everquest2-fr.com
DocumentRoot /var/www/everquest2-fr.com/httpdocs
Alias / /var/www/everquest2-fr.com/httpdocs
AddMonoApplications eq2 /:/var/www/everquest2-fr.com/httpdocs
#Directory /var/www/everquest2-fr.com/httpdocs/
#allow from all
#DirectoryIndex index.aspx index.html index.php
#Options +Indexes
#/Directory
Location /
 SetHandler mono
 Allow from all
/Location
Location /mono
 SetHandler mono-ctrl
 Allow from all
/Location
ServerName www.everquest2-fr.com
/VirtualHost

--
I disabled SE Linux, i got:
avc:  denied  { write } for  pid=15001 comm=httpd 
name=mod_mono_server_global dev=hdc1 ino=68848 
scontext=root:system_r:httpd_t tcontext=root:object_r:tmp_t tclass=sock_file


I would like to know what i need to do to have an ASP .NET 1 application 
working, i prefer not having to recompil the project due to the fact i 
develop the site on windows on another computer.


Thanks in advance.

CN
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] ASP .NET Application

2006-01-15 Thread Nicolas Cornu

Nicolas Cornu a écrit :


Hello,

I have troubles setting up an asp .net application.
A aspx page work fine but i don't know how to make an asp .net 
application

i would like to use Global.asax file and the Global class and object.

I did compil all .cs files into a library and put it in the 
subdirectory bin of my website

but i get an error.


With this config without using global.asax the website work:

VirtualHost 192.168.0.2:80
ServerName www.everquest2-fr.com
DocumentRoot /var/www/everquest2-fr.com/httpdocs
#Alias / /var/www/everquest2-fr.com/httpdocs
#AddMonoApplications eq2 /:/var/www/everquest2-fr.com/httpdocs
#Directory /var/www/everquest2-fr.com/httpdocs/
#allow from all
#DirectoryIndex index.aspx index.html index.php
#Options +Indexes
#/Directory
#Location /
#  SetHandler mono
#  Allow from all
#/Location
Location /mono
 SetHandler mono-ctrl
 Allow from all
/Location
ServerName www.everquest2-fr.com
/VirtualHost


With this config without using global.asax the website d'ont work
i get an Internal server error:

VirtualHost 192.168.0.2:80
ServerName www.everquest2-fr.com
DocumentRoot /var/www/everquest2-fr.com/httpdocs
Alias / /var/www/everquest2-fr.com/httpdocs
AddMonoApplications eq2 /:/var/www/everquest2-fr.com/httpdocs
#Directory /var/www/everquest2-fr.com/httpdocs/
#allow from all
#DirectoryIndex index.aspx index.html index.php
#Options +Indexes
#/Directory
Location /
 SetHandler mono
 Allow from all
/Location
Location /mono
 SetHandler mono-ctrl
 Allow from all
/Location
ServerName www.everquest2-fr.com
/VirtualHost

--
I disabled SE Linux, i got:
avc:  denied  { write } for  pid=15001 comm=httpd 
name=mod_mono_server_global dev=hdc1 ino=68848 
scontext=root:system_r:httpd_t tcontext=root:object_r:tmp_t 
tclass=sock_file


I would like to know what i need to do to have an ASP .NET 1 
application working, i prefer not having to recompil the project due 
to the fact i develop the site on windows on another computer.


Thanks in advance.

CN
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Bin directory contain: everquest2-fr.dll and Npgsql.dll
If i run XSP on the website directory i get this error:


   /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: */tmp/root-temp-aspnet-0/ab3f0828/26794.0.cs(26,27) : 
error CS0433: The imported type `Everquest2.Global' is defined multiple 
times



___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Re: ASP .NET Application

2006-01-15 Thread Robert Jordan

Nicolas,


Bin directory contain: everquest2-fr.dll and Npgsql.dll
If i run XSP on the website directory i get this error:


   /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: */tmp/root-temp-aspnet-0/ab3f0828/26794.0.cs(26,27) : 
error CS0433: The imported type `Everquest2.Global' is defined multiple 
times



You have shared the *source code* of the type Everquest2.Global
with everquest2-fr.dll and one of your pages. That kind of source
code include is not allowed in C#.

Robert

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list