[Mono-dev] crypto API

2007-01-06 Thread Lauren Del Giudice

Sebastien,

Concerning the closed bug 80439, rev70491;
By reducing the input count, you will loose the last block for next
decryption. You first decryption will succeed, but the next one will fail.

Test it and let me know if it succeeds:
Let say you decrypt 56 bytes (CBC, default padding), you will obtain 48
bytes. Iterate and obtain again 48 bytes. The last 48 bytes will depend on
the buffered block from the first decryption.

When you decrypt from 56 bytes and obtain 48 bytes, there is no critical
issue (well don't consider memory as a critical issue for a moment), since
you don't really throw the last decrypted block but rather you have to
buffer it.
This buffered decrypted block will be injected at the next decryption
process, in the output array as the first block.

And also, watch out with overlapping input/output...

HTH.
Lauren.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] (IL) Fault handlers not working

2007-01-06 Thread Argiris Kirtzidis
Hi all,

I have this IL sample:

.assembly Test { }
.assembly extern mscorlib { }

.method public static void Main()
{
   .entrypoint
   .try
   {
  newobj instance void [mscorlib]System.Exception::.ctor()
  throw
  leave.s exitTry
   }
   fault
   {
  ldstr Fault handler executed
  call void [mscorlib]System.Console::WriteLine(string)
  endfault
   }
   exitTry: ret
}



When I compile it and test it on mono, the fault handler doesn't get executed, 
is this a bug ?___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Reason for introduction of CS0809 warning in mcs ?

2007-01-06 Thread Gert Driesen
Hi,

I noticed that very recently CS0809 was added to mcs, which warns against an
obsolete member that overrides a non-obsolete member.

This warning does not exist in csc (1.x and 2.x), and so I wonder why this
was added.  Is it considered a bad practice to mark a member obsolete in a
derived class ?

Gert

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


Re: [Mono-dev] Reason for introduction of CS0809 warning in mcs ?

2007-01-06 Thread Gert Driesen


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:mono-devel-list-
 [EMAIL PROTECTED] On Behalf Of Atsushi Eno
 Sent: zaterdag 6 januari 2007 16:51
 To: Gert Driesen
 Cc: mono-devel-list@lists.ximian.com
 Subject: Re: [Mono-dev] Reason for introduction of CS0809 warning in
 mcs ?
 
 Hi,
 
 To understand the issue precisely, does it warn something like
 marking overriden member as obsolete is bogus ? For example:
 
 public class Class1
 {
public virtual void Foo () {}
 }
 
 public class Class2 : Class1
 {
[Obsolete]
public override void Foo () {}
 }
 
 If so, I support this warning. That member marked as obsoleted
 could be used by referencing Class1.Foo() and thus there is no
 point of warning only Class2.Foo() since depending on the usage
 this obsolete warning cannot be caught. So, it sounds like a
 bad idea to mark overriden member as obsolete.

Yeah, you're right.

Thanks for the feedback.

Gert

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


Re: [Mono-dev] (IL) Fault handlers not working

2007-01-06 Thread Miguel de Icaza

 
 When I compile it and test it on mono, the fault handler doesn't get
 executed, is this a bug ?

Possibly.   You would have to file a bug with a test case that compiles
(your sample is not complete).

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


Re: [Mono-dev] (IL) Fault handlers not working

2007-01-06 Thread Argiris Kirtzidis
 Possibly.   You would have to file a bug with a test case that compiles
 (your sample is not complete).
 

Can you be more specific ? I'm using Mono's ILasm and it compiles fine..

Just for reference, this is the sample again:


.assembly Test { }
.assembly extern mscorlib { }
 
.method public static void Main()
{
   .entrypoint
   .try
   {
  newobj instance void [mscorlib]System.Exception::.ctor()
  throw
  leave.s exitTry
   }
   fault
   {
  ldstr Fault handler executed
  call void [mscorlib]System.Console::WriteLine(string)
  endfault
   }
   exitTry: ret
}

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


Re: [Mono-dev] (IL) Fault handlers not working

2007-01-06 Thread Argiris Kirtzidis
 My mistake, the bug is our ilasm.   That code should not compile (it
 does not with MS ilasm).

I apologise for dragging this so much but the sample compiles with MS ilasm 
too (at least for me).
In fact, to be more specific, I initially compiled it with MS ilasm and 
tried Mono's ilasm too after your email; I got it compiled with both.

Anyway, I filed a bug report, thank you for your response. 

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


Re: [Mono-dev] (IL) Fault handlers not working

2007-01-06 Thread Miguel de Icaza
Hello,

  My mistake, the bug is our ilasm.   That code should not compile (it
  does not with MS ilasm).
 
 I apologise for dragging this so much but the sample compiles with MS ilasm 
 too (at least for me).

 In fact, to be more specific, I initially compiled it with MS ilasm and 
 tried Mono's ilasm too after your email; I got it compiled with both.
 
 Anyway, I filed a bug report, thank you for your response. 


Microsoft (R) .NET Framework IL Assembler.  Version 1.1.4322.2032
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
Assembling 'f.il' , no listing file, to EXE -- 'f.EXE'
Source file is ANSI

f.il(8) : error : syntax error at token '{' in:{


* FAILURE *

Maybe a different version of ILASM?

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


Re: [Mono-dev] (IL) Fault handlers not working

2007-01-06 Thread Kamil Skalski
Yeah, it compiler with .NET 2.0:


Microsoft (R) .NET Framework IL Assembler.  Version 2.0.50727.42
Copyright (c) Microsoft Corporation.  All rights reserved.
Assembling 'm.il'  to EXE -- 'm.exe'
Source file is ANSI

Assembled global method Main
Creating PE file

Emitting classes:

Emitting fields and methods:
Global  Methods: 1;

Emitting events and properties:
Global
Writing PE file
Operation completed successfully


2007/1/6, Miguel de Icaza [EMAIL PROTECTED]:
 Hello,

   My mistake, the bug is our ilasm.   That code should not compile (it
   does not with MS ilasm).
 
  I apologise for dragging this so much but the sample compiles with MS ilasm
  too (at least for me).
 
  In fact, to be more specific, I initially compiled it with MS ilasm and
  tried Mono's ilasm too after your email; I got it compiled with both.
 
  Anyway, I filed a bug report, thank you for your response.


 Microsoft (R) .NET Framework IL Assembler.  Version 1.1.4322.2032
 Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
 Assembling 'f.il' , no listing file, to EXE -- 'f.EXE'
 Source file is ANSI

 f.il(8) : error : syntax error at token '{' in:{


 * FAILURE *

 Maybe a different version of ILASM?

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



-- 
Kamil Skalski
http://nazgul.omega.pl
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] (IL) Fault handlers not working

2007-01-06 Thread Argiris Kirtzidis
 Microsoft (R) .NET Framework IL Assembler.  Version 1.1.4322.2032
 Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
 Assembling 'f.il' , no listing file, to EXE -- 'f.EXE'
 Source file is ANSI
 
 f.il(8) : error : syntax error at token '{' in:{
 
 
 * FAILURE *
 
 Maybe a different version of ILASM?
 
 Miguel.

Yes, I used the .NET 2.0 ILasm (2.0.50727.42).
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] (IL) Fault handlers not working

2007-01-06 Thread Gert Driesen


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:mono-devel-list-
 [EMAIL PROTECTED] On Behalf Of Argiris Kirtzidis
 Sent: zaterdag 6 januari 2007 20:52
 To: Miguel de Icaza
 Cc: Mono Mailing List
 Subject: Re: [Mono-dev] (IL) Fault handlers not working
 
  Microsoft (R) .NET Framework IL Assembler.  Version 1.1.4322.2032
  Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
  Assembling 'f.il' , no listing file, to EXE -- 'f.EXE'
  Source file is ANSI
 
  f.il(8) : error : syntax error at token '{' in:{
 
 
  * FAILURE *
 
  Maybe a different version of ILASM?
 
  Miguel.
 
 Yes, I used the .NET 2.0 ILasm (2.0.50727.42).

Works fine using both 1.1 (exact same version as Miguel) and 2.0 ilasm here:

Microsoft (R) .NET Framework IL Assembler.  Version 1.1.4322.2032
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
Assembling 'test.il' , no listing file, to EXE -- 'test.EXE'
Source file is ANSI

Assembled global method Main
Creating PE file

Emitting members:
Global  Methods: 1;
Writing PE file
Operation completed successfully



Microsoft (R) .NET Framework IL Assembler.  Version 2.0.50727.42
Copyright (c) Microsoft Corporation.  All rights reserved.
Assembling 'test.il'  to EXE -- 'test.exe'
Source file is ANSI

Assembled global method Main
Creating PE file

Emitting classes:

Emitting fields and methods:
Global  Methods: 1;

Emitting events and properties:
Global
Writing PE file
Operation completed successfully

Gert

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


Re: [Mono-dev] ASP.NET ObjectDataSource problem

2007-01-06 Thread Konstantin Triger
Title: RE: [Mono-dev] ASP.NET ObjectDataSource problem






Hi Marek,

I agree with you regarding the Type.GetType(). But it looked very strange to me that there is no public API for a control developer to load a App_Data type. So I found the BuildManager.GetType() which looks to feet our needs perfectly. It seems that the loading logic should be inside and ObjectDataSourceView should delegate there.

Regards,
Konstantin Triger



-Original Message-
From: Marek Habersack [mailto:[EMAIL PROTECTED]]
Sent: Thu 04/01/2007 00:10
To: Konstantin Triger
Cc: mono-devel-list@lists.ximian.com
Subject: Re: [Mono-dev] ASP.NET ObjectDataSource problem

On Wed, 3 Jan 2007 13:14:13 -0800, Konstantin Triger
[EMAIL PROTECTED] scribbled:

 RE: [Mono-dev] ASP.NET ObjectDataSource problem

 Hello Marek,

 Can you explain better your fix? According to MSDN's
 ObjectDataSource.TypeName:

 Therefore, the value of the TypeName property can be a partially
 qualified type for code that is located in the Bin or App_Code
 directories or a fully qualified type name for code that is
 registered in the global assembly cache. If you use the global
 assembly cache, you must add the appropriate reference to the
 assemblies section of the Machine.config or Web.config file.

 So for the App_Code and GAC located types the Type.GetType() will do
 and for Bin located types the code looking into the BinPath will find
 them. What is the case when we need BuildManager.TopLevelAssemblies?
Type.GetType() does not look in all the loaded assemblies if the type
name is unqualified (see
http://msdn2.microsoft.com/en-us/library/w3f99sx1.aspx). Unqualified
type names are sought only in the currently executing assembly and
Mscorlib. That's why it is necessary to explicitly seek for unqualified
types in both the bin and the top-level assemblies. App_Code dll is
indeed loaded up by the time objectdatasourceview is used.

best,

marek






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


Re: [Mono-dev] ASP.NET ObjectDataSource problem

2007-01-06 Thread Marek Habersack
On Sat, 6 Jan 2007 14:19:15 -0800, Konstantin Triger
[EMAIL PROTECTED] scribbled:

 RE: [Mono-dev] ASP.NET ObjectDataSource problem
 
 Hi Marek,
Hello Konstantin,

 I agree with you regarding the Type.GetType(). But it looked very
 strange to me that there is no public API for a control developer to
 load a App_Data type. So I found the BuildManager.GetType() which
 looks to feet our needs perfectly. It seems that the loading logic
 should be inside and ObjectDataSourceView should delegate there.
Yes, BuildManager.GetType is a good method to call when you want to
look up a type within the top-level assemblies. We should probably
identify all the spots where we need such functionality and use the
method there.

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] ASP.NET Web.sitemap

2007-01-06 Thread Dariusz Linowski
Hello,

I have tried to use site navigation based on Web.sitemap file in mono
ASP.NET 2.0. If I directly moved working application from windows to
mono I received error:

System.InvalidOperationException: This feature is currently disabled.
Please enable it in the system.web/siteMap section in the web.config
file.
  at System.Web.SiteMap.Init () [0x0]

So, I modified Web.Config file and added:


siteMap enabled=true
  providers

add name=MenuProvider
  type=System.Web.XmlSiteMapProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
  siteMapFile=Web.sitemap/

  /providers
/siteMap

After this modification I received error :

System.ArgumentNullException: Argument cannot be null.
Parameter name: key
  at System.Web.SiteMapNode..ctor (System.Web.SiteMapProvider
provider, System.String key, System.String url, System.String title,
System.String description, IList roles,
System.Collections.Specialized.NameValueCollection attributes,
System.Collections.Specialized.NameValueCollection
explicitResourceKeys, System.String implicitResourceKey) [0x0]
  at System.Web.XmlSiteMapProvider.BuildSiteMapRecursive
(System.Xml.XmlNode xmlNode) [0x0]


What is wrong or missing?



file: MasterPage.master
asp:TreeView ID=TreeView1 runat=server
DataSourceID=SiteMapDataSource1 ShowLines=True
/asp:TreeView
asp:SiteMapDataSource ID=SiteMapDataSource1 runat=server
SiteMapProvider=MenuProvider ShowStartingNode=False /


-- 
---
Pozdrawiam,
  Dariusz Linowski
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list