Re: [Mono-list] Xml Entity Resolution

2007-03-06 Thread Atsushi Eno
Well, you are confused. You can't use XmlDocument.Load() even with
your blablaXmlReader. XmlTextReader.XmlResolver = null is just a
replacement to your class. The workaround (using ReadNode method)
is *still* required.

To summarize technical side:
- XmlDocument.Load() does need corresponding entity declarations
- XmlTextReader does not need corresponding entity.
- XmlTextReader does not ignore external DTD unless null XmlResolver
   is set.

Atsushi Eno

[EMAIL PROTECTED] wrote:
> Tried that (see below) but it still gets "System.Xml.XmlException:
> Reference to undeclared entity" exceptions.
> 
> Thanks again,
> C.
> 
> XmlDocument doc = new XmlDocument();
> XmlTextReader reader = new XmlTextReader(new
> StringReader(xml_text_with_entities));
> reader.XmlResolver = null;
> doc.Load(reader);
> 
> On Tue, 06 Mar 2007 06:07:02 +0900, "Atsushi Eno" <[EMAIL PROTECTED]>
> said:
>> Well, you could just try XmlTextReader.XmlResolver = null here ...
>>
>> Atsushi Eno
>>
>> Colin John Nicholas Breame wrote:
>>> Hi,
>>>
>>> I've tried your solution with both XmlTextReader and XmlValidatingReader
>>> but I can't make it work.  The problem is that the XmlTextReader
>>> actually requires entities to be resolved.
>>>
>>> As a work around I've subclassed XmlTextReader to return false for
>>> CanResolveEntity, which seems to (at least initially) do the trick.  See
>>> below.
>>>
>>> Thanks
>>> C.
>>>
>>> using System.IO;
>>> using System.Xml;
>>>
>>> public class NonEntityResolvingXmlTextReader : XmlTextReader {
>>>   public NonResolvingXmlTextReader(TextReader reader) : base(reader) {
>>>   }
>>>
>>>   public override bool CanResolveEntity {
>>> get {
>>>   return false;
>>> }
>>>   }
>>> }
>>>
>>>
>>> On Mon, 05 Mar 2007 14:00:00 +0900, "Atsushi Eno" <[EMAIL PROTECTED]>
>>> said:
 Hi,

 If you skip the DTD, any entity references (except for <, >, 
 ' and ") are rejected during XmlDocument.Load().

 If you don't care such buggy document, you can try

while (!reader.EOF)
doc.AppendChild (doc.ReadNode (reader));

 which does not reject unresolved entity references (funny, but
 this is what .net System.Xml.dll does).

 Atsushi Eno

 [EMAIL PROTECTED] wrote:
> I'm trying to turn off entity resolution using XmlDocument as I don't
> have a DTD and I'm getting "System.Xml.XmlException: Cannot resolve
> entity without DTD".  I can't see an explicit "ResolveEntity" property I
> could set to off.  Any ideas?  Is there a mono specific way of doing
> this?
>
> Thanks
> Colin.
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list
> 

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


Re: [Mono-list] Converting list types

2007-03-06 Thread Jonathan Pryor
On Tue, 2007-03-06 at 23:46 +, Chris Seaton wrote:
> gmcs says that it
> 
> Cannot convert from  
> `System.Collections.Generic.List'  
> to `System.Collections.Generic.List'
> 
> ParseGraphNode implements IParseable, so I would have thought that  
> the compiler would allow that, but since it doesn't, what is the best  
> way to convert from List to List?  
> I know I can instantiate a new List and copy one by one  
> into that, but it seems a very common operation - is there a shortcut?

I assume you're trying to do this:

void Foo (List list) {...}

List c = ...;
Foo (c);

The simple solution is to make Foo() itself generic:

void Foo (List list) where T : IParseable {...}

 - Jon


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


Re: [Mono-list] Adding Solaris/amd64 support

2007-03-06 Thread Miguel de Icaza
Hello,

> Program received signal SIGTRAP, Trace/breakpoint trap.
> amd64_patch (_field_data=0xfd7ffe3f077b "?@@\221?I\213??",  
> her=0x4e53c4)
>  at mini-amd64.c:182
> 182 x86_patch (code, (unsigned char*)target);
> (gdb)
> 
> 
> Now how/where do I find the address? Do I need to add printfs some  
> place? (will look into it tomorrow)

This is where the explanation I gave you is important: the routine in
question basically needs to understand the generated code and modify it
on the flight.

So you need to look at the code and see why it would generate the
exception, the address to disassemble is precisely the one that it will
try to decode and its failing to.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Adding Solaris/amd64 support

2007-03-06 Thread Andreas Färber
Miguel,

> Replace the g_assert in the line with the error with a call to
> "G_BREKAPOINT".
>
> Then run with gdb:
>
> gdb mono
> (gdb) run program.exe
> wait for breakpoint
> (gdb) x/20i address
>
> Address is whatever address the method is trying to decode, you will
> have to look that one up on the source.

I managed to compile gdb 64-bit:

-bash-3.00$ gdb mono/mini/mono
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and  
you are
welcome to change it and/or distribute copies of it under certain  
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for  
details.
This GDB was configured as "i386-pc-solaris2.10"...
(gdb) run ../../Documents/Test.exe
Starting program: /export/home/andreas/Mono/mono/mono/mini/mono ../../ 
Documents/Test.exe
warning: Temporarily disabling breakpoints for unloaded shared  
library "/usr/lib/amd64/ld.so.1"
warning: Lowest section in /lib/amd64/libpthread.so.1 is .dynamic at  
00b0
[New LWP 1]
[New LWP 2]
TYPE: 1

Program received signal SIGTRAP, Trace/breakpoint trap.
amd64_patch (_field_data=0xfd7ffe3f077b "?@@\221?I\213??",  
her=0x4e53c4)
 at mini-amd64.c:182
182 x86_patch (code, (unsigned char*)target);
(gdb)


Now how/where do I find the address? Do I need to add printfs some  
place? (will look into it tomorrow)

(As a possible alternative/complement to gdb I found mdb installed.)

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


[Mono-list] Converting list types

2007-03-06 Thread Chris Seaton
gmcs says that it

Cannot convert from  
`System.Collections.Generic.List'  
to `System.Collections.Generic.List'

ParseGraphNode implements IParseable, so I would have thought that  
the compiler would allow that, but since it doesn't, what is the best  
way to convert from List to List?  
I know I can instantiate a new List and copy one by one  
into that, but it seems a very common operation - is there a shortcut?

Thanks.

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


Re: [Mono-list] Adding Solaris/amd64 support

2007-03-06 Thread Miguel de Icaza
Hello,

> However, Solaris does not seem to ship with a gdb. I installed gdb  
> 6.2.1 from Solaris' "Companion" DVD. But apparently it does not  
> support 64-bit debugging! According to the gdb mailing list that was  
> contributed for 6.4, and neither sunfreeware.com nor blastwave.org  
> provide a recent package (as with Mono). So unless I can use another  
> debugging tool (not sure what you need from this x/20i command) I'll  
> have to figure out how to compile my own gdb first.

Any debugger will do, you just need to find a way of obtaining the
disassembled code at a given instruction. 

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


[Mono-list] MONO_GAC_PREFIX Confusion

2007-03-06 Thread met
I'm trying to modify my build system to support local gac installs for  
testing libraries instead of copying them into the bin directory of a  
web app.

My install looks like:

/usr/bin/gacutil -root .gac/usr/lib -check_refs -i KMBS.SEC.dll
KMBS.SEC installed into the gac (.gac/usr/lib/mono/gac)


and my MONO_GAC_PREFIX=.gac/usr


Clearly I'm missing something very simple, but I'm not sure what. When  
I run `tree .gac` I get the following:

.gac
|-- opt
|   `-- KonicaMinolta
|   `-- lib
|   `-- groove
|   `-- KMBS.SEC.dll
`-- usr
 `-- lib
 `-- mono
 `-- gac
 |-- KMBS.SEC
 `-- 1.0.6.1__bb18fc1c6f4c99da
 |-- KMBS.SEC.dll
 `-- KMBS.SEC.dll.mdb


Any help would be greatly appreciated.

Thanks in advance,

~ Matthew

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


Re: [Mono-list] Adding Solaris/amd64 support

2007-03-06 Thread Andreas Färber
Hello,

> Replace the g_assert in the line with the error with a call to
> "G_BREKAPOINT".
>
> Then run with gdb:
>
> gdb mono
> (gdb) run program.exe
> wait for breakpoint
> (gdb) x/20i address
>
> Address is whatever address the method is trying to decode, you will
> have to look that one up on the source.

I managed to set the breakpoint by writing G_BREAKPOINT(); instead of  
the assertion. When I run mono normally, I now see a message that it  
has reached a breakpoint.

However, Solaris does not seem to ship with a gdb. I installed gdb  
6.2.1 from Solaris' "Companion" DVD. But apparently it does not  
support 64-bit debugging! According to the gdb mailing list that was  
contributed for 6.4, and neither sunfreeware.com nor blastwave.org  
provide a recent package (as with Mono). So unless I can use another  
debugging tool (not sure what you need from this x/20i command) I'll  
have to figure out how to compile my own gdb first.

Any ideas about the GC warning though? Can it be safely ignored for  
now in 32-bit? What's the difference between Mono's libgc and e.g.  
Solaris' libgc? I remember you saying about Leopard's GC it probably  
wouldn't be usable for Mono.

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


Re: [Mono-list] Combining JIT and interpreter

2007-03-06 Thread Miguel de Icaza
Hello,

> Yet another idea is adding support for dynamic recompilation of
> jitted code, which IMHO is close in spirit to what you wanted to
> have (adding an interpreter), even if different...

Dynamic recompilation is not hard, the issue is what kind of guarantees
you want to make.  For example, is recompilation going to be used for
transplanting live code, like Java has to do due to their design
limitations?

If so, it is a lot of work, and it is not worth doing.

> Willibald Krenn wrote a working prototype for it in the past,
> search mono-devel-list archives for details.
> 
> Ciao,
>   Massi
> 
> 
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Combining JIT and interpreter

2007-03-06 Thread Massimiliano Mantione

On Mon, 2007-03-05 at 20:02 -0800, Aram Melkoumian wrote:
> Any suggestions as to what these other things could be ?

Yet another idea is adding support for dynamic recompilation of
jitted code, which IMHO is close in spirit to what you wanted to
have (adding an interpreter), even if different...

Willibald Krenn wrote a working prototype for it in the past,
search mono-devel-list archives for details.

Ciao,
  Massi


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


Re: [Mono-list] xsp throws FileNotFoundException

2007-03-06 Thread Frederik Carlier
Seems like a bug in the VBCodeCompiler class. I filed a bug against vbnc:
http://bugzilla.ximian.com/show_bug.cgi?id=81057

Frederik.

Frederik Carlier schreef:
> Hi,
>
> I'm trying to make a simple website run under Mono. I created a NAnt
> build script to build the website and tested it under Windows with
> Cassini. That works.
>
> Running the same website with xsp, however, yields an FileNotFoundException:
>
> System.IO.FileNotFoundException: File or assembly name 
> /tmp/fcarlier-temp-aspnet-0/a1868974/1623c9ba.dll, or one of its 
> dependencies, was not found.
> File name: "/tmp/fcarlier-temp-aspnet-0/a1868974/1623c9ba.dll"
>   at <0x0> 
>   at (wrapper managed-to-native) System.Reflection.Assembly:LoadFrom 
> (string,bool)
>   at System.Reflection.Assembly.LoadFrom (System.String assemblyFile) 
> [0x0] 
>   at Microsoft.VisualBasic.VBCodeCompiler.CompileFromFileBatch 
> (System.CodeDom.Compiler.CompilerParameters options, System.String[] 
> fileNames) [0x0] 
>   at Microsoft.VisualBasic.VBCodeCompiler.CompileAssemblyFromFileBatch 
> (System.CodeDom.Compiler.CompilerParameters options, System.String[] 
> fileNames) [0x0] 
>   at Microsoft.VisualBasic.VBCodeCompiler.CompileFromDomBatch 
> (System.CodeDom.Compiler.CompilerParameters options, 
> System.CodeDom.CodeCompileUnit[] ea) [0x0] 
>   at Microsoft.VisualBasic.VBCodeCompiler.CompileAssemblyFromDomBatch 
> (System.CodeDom.Compiler.CompilerParameters options, 
> System.CodeDom.CodeCompileUnit[] ea) [0x0] 
>   at Microsoft.VisualBasic.VBCodeCompiler.CompileAssemblyFromDom 
> (System.CodeDom.Compiler.CompilerParameters options, 
> System.CodeDom.CodeCompileUnit e) [0x0] 
>   at System.Web.Compilation.CachingCompiler.Compile 
> (System.Web.Compilation.BaseCompiler compiler) [0x0] 
>   at System.Web.Compilation.BaseCompiler.GetCompiledType () [0x0] 
>   at System.Web.Compilation.AspGenerator.GetCompiledType () [0x0] 
>   at System.Web.UI.ApplicationFileParser.GetCompiledApplicationType 
> (System.String inputFile, System.Web.HttpContext context) [0x0] 
>   at System.Web.HttpApplicationFactory.InitType (System.Web.HttpContext 
> context) [0x0] 
>   at System.Web.HttpApplicationFactory.GetApplication (System.Web.HttpContext 
> context) [0x0] 
>   at System.Web.HttpRuntime.RealProcessRequest (System.Object o) [0x0] 
>
> Upon manual inspection, it shows that the temporary directory exists,
> but the file doesn't. It may be related to the change to the new vbnc
> compiler, but I'm rather in the dark about this.
>
> Does anyone have an idea about how I could fix this?
>
> Thanks!
>
> Frederik.
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>   

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


Re: [Mono-list] xsp throws FileNotFoundException

2007-03-06 Thread Frederik Carlier
Seems like a bug in the VBCodeCompiler class. I filed a bug against vbnc:
http://bugzilla.ximian.com/show_bug.cgi?id=81057

Frederik.

Frederik Carlier schreef:
> Hi,
>
> I'm trying to make a simple website run under Mono. I created a NAnt
> build script to build the website and tested it under Windows with
> Cassini. That works.
>
> Running the same website with xsp, however, yields an FileNotFoundException:
>
> System.IO.FileNotFoundException: File or assembly name 
> /tmp/fcarlier-temp-aspnet-0/a1868974/1623c9ba.dll, or one of its 
> dependencies, was not found.
> File name: "/tmp/fcarlier-temp-aspnet-0/a1868974/1623c9ba.dll"
>   at <0x0> 
>   at (wrapper managed-to-native) System.Reflection.Assembly:LoadFrom 
> (string,bool)
>   at System.Reflection.Assembly.LoadFrom (System.String assemblyFile) 
> [0x0] 
>   at Microsoft.VisualBasic.VBCodeCompiler.CompileFromFileBatch 
> (System.CodeDom.Compiler.CompilerParameters options, System.String[] 
> fileNames) [0x0] 
>   at Microsoft.VisualBasic.VBCodeCompiler.CompileAssemblyFromFileBatch 
> (System.CodeDom.Compiler.CompilerParameters options, System.String[] 
> fileNames) [0x0] 
>   at Microsoft.VisualBasic.VBCodeCompiler.CompileFromDomBatch 
> (System.CodeDom.Compiler.CompilerParameters options, 
> System.CodeDom.CodeCompileUnit[] ea) [0x0] 
>   at Microsoft.VisualBasic.VBCodeCompiler.CompileAssemblyFromDomBatch 
> (System.CodeDom.Compiler.CompilerParameters options, 
> System.CodeDom.CodeCompileUnit[] ea) [0x0] 
>   at Microsoft.VisualBasic.VBCodeCompiler.CompileAssemblyFromDom 
> (System.CodeDom.Compiler.CompilerParameters options, 
> System.CodeDom.CodeCompileUnit e) [0x0] 
>   at System.Web.Compilation.CachingCompiler.Compile 
> (System.Web.Compilation.BaseCompiler compiler) [0x0] 
>   at System.Web.Compilation.BaseCompiler.GetCompiledType () [0x0] 
>   at System.Web.Compilation.AspGenerator.GetCompiledType () [0x0] 
>   at System.Web.UI.ApplicationFileParser.GetCompiledApplicationType 
> (System.String inputFile, System.Web.HttpContext context) [0x0] 
>   at System.Web.HttpApplicationFactory.InitType (System.Web.HttpContext 
> context) [0x0] 
>   at System.Web.HttpApplicationFactory.GetApplication (System.Web.HttpContext 
> context) [0x0] 
>   at System.Web.HttpRuntime.RealProcessRequest (System.Object o) [0x0] 
>
> Upon manual inspection, it shows that the temporary directory exists,
> but the file doesn't. It may be related to the change to the new vbnc
> compiler, but I'm rather in the dark about this.
>
> Does anyone have an idea about how I could fix this?
>
> Thanks!
>
> Frederik.
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>   

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


[Mono-list] XSP error on windows 2000

2007-03-06 Thread Jim Chappell
I just installed Mono on windows 2000.  I'm getting the error below after
starting XSP from a Mono command prompt and browsing to port 8080.  What's
wrong?

C:\Program Files\Mono-1.2.3.1\lib\xsp\test>xsp
xsp
Listening on port: 8080 (non-secure)
Listening on address: 0.0.0.0
Root directory: C:\Program Files\Mono-1.2.3.1\lib\xsp\test
Hit Return to stop the server.
Application_Start
Stacktrace:

  at System.Web.Configuration.WebDefaultConfig.GetConfigFromFileName
(string,System.Web.HttpContext) <0x>
  at System.Web.Configuration.WebDefaultConfig.GetConfigFromFileName
(string,System.Web.HttpContext) <0x002c1>
  at System.Web.Configuration.WebDefaultConfig.GetConfigFromFileName
(string,System.Web.HttpContext) <0x00292>
  at System.Web.Configuration.WebDefaultConfig.GetConfig
(string,System.Web.HttpContext) <0x00041>
  at System.Web.Configuration.WebConfigurationSettings.GetConfig
(string,System.Web.HttpContext) <0x00017>
  at System.Web.HttpContext.GetConfig (string) <0x00010>
  at System.Web.Security.FormsAuthenticationModule.OnAuthenticateRequest
(object,System.EventArgs) <0x00097>
  at (wrapper delegate-invoke)
System.MulticastDelegate.invoke_void_object_EventArgs
(object,System.EventArgs) <0x>
  at <>c__CompilerGenerated4.MoveNext () <0x0057c>
  at <>c__CompilerGenerated5.MoveNext () <0x002e7>
  at System.Web.HttpApplication.Tick () <0x00037>
  at System.Web.HttpApplication.Start (object) <0x000e2>
  at
System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest
(System.Web.HttpContext,System.AsyncCallback,object) <0x0007d>
  at System.Web.HttpRuntime.RealProcessRequest (object) <0x001ab>
  at System.Web.HttpRuntime.ProcessRequest (System.Web.HttpWorkerRequest)
<0x0002c>
  at Mono.WebServer.MonoWorkerRequest.ProcessRequest () <0xa>
  at Mono.WebServer.BaseApplicationHost.ProcessRequest
(Mono.WebServer.MonoWorkerRequest) <0x00043>
  at Mono.WebServer.XSPApplicationHost.ProcessRequest
(int,long,int,long,int,string,string,string,string,byte[],string,intptr,Mono
.WebServer.SslInformations) <0x003d2>
  at (wrapper remoting-invoke-with-check)
Mono.WebServer.XSPApplicationHost.ProcessRequest
(int,long,int,long,int,string,string,string,string,byte[],string,intptr,Mono
.WebServer.SslInformations) <0x>
  at (wrapper xdomain-dispatch)
Mono.WebServer.XSPApplicationHost.ProcessRequest
(object,byte[]&,byte[]&,int,long,int,long,int,string,string,string,string,by
te[],string) <0x>
  at (wrapper xdomain-invoke)
Mono.WebServer.XSPApplicationHost.ProcessRequest
(int,long,int,long,int,string,string,string,string,byte[],string,intptr,Mono
.WebServer.SslInformations) <0x>
  at (wrapper remoting-invoke-with-check)
Mono.WebServer.XSPApplicationHost.ProcessRequest
(int,long,int,long,int,string,string,string,string,byte[],string,intptr,Mono
.WebServer.SslInformations) <0x>
  at Mono.WebServer.XSPWorker.RunInternal (object) <0x0065a>
  at (wrapper delegate-invoke) System.MulticastDelegate.invoke_void_object
(object) <0x>
  at (wrapper runtime-invoke) System.Object.runtime_invoke_void_object
(object,intptr,intptr,intptr) <0x>

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


[Mono-list] GTK# Treeview/Dataset example

2007-03-06 Thread tom potts
Is there an example anywhere of using a Treeview
widget and a DataSet in a similar way to the DataGrid
in windows forms?
It seems to be requested on the forums frequently but
I've never found one.
Or tips on how to do it and I'll try and put one
together.
Tom




___ 
What kind of emailer are you? Find out today - get a free analysis of your 
email personality. Take the quiz at the Yahoo! Mail Championship. 
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk 
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] ASP.NET - WebServices - EnableSession property not supported ?

2007-03-06 Thread Guillaume Mouron

Hi,

I am trying to create a webservice (.asmx file) with session enabled by
using the property "EnableSession = true".
My project is built under Visual Studio 2005 SP1 and deployed to the SuSE
10.2 VMWare image provided by the Mono project (with Mono 1.2.3.1).
So, to be clear, the dll is not compiled by the mono compiler.
Unfortunately, I have an exception at execution time.

I made a simple test case :

- .asmx file
-
<%@ WebService Language="C#" CodeBehind="~/App_Code/TestEnableSession.cs"
Class="TestEnableSession" %>
--


- .cs file
-
using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;

/// 
/// Summary description for TestEnableSession
/// 
[WebService(Namespace = "http://tempuri.org/";)]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class TestEnableSession : System.Web.Services.WebService {
   public TestEnableSession () {
   //Uncomment the following line if using designed components
   //InitializeComponent();
   }

   [WebMethod(Description = "EnableSession = false", EnableSession =
false)]
   public string HelloWorldFalse()
   {
   return "Hello World";
   }

   [WebMethod(Description = "EnableSession = true", EnableSession = true)]
   public string HelloWorldTrue()
   {
   return "Hello World";
   }
}
-

When I use the web interface provided by mono, the HelloWorldFalse method is
performing correctly.
But the HelloWorldTrue method is rising this exception :

 stack trace
---
 System.NullReferenceException
: Object reference not set to
 an instance of an object
 at System.Web.SessionState.SessionStateModule.CreateContainer (
System.String sessionId,
   System.Web.SessionState.SessionStateStoreData
data, Boolean isNew, Boolean isReadOnly)
   [0x0]
 at System.Web.SessionState.SessionStateModule.OnAcquireRequestState (
System.Object o,
   System.EventArgs args) [0x0]
 at (wrapper delegate-invoke)
System.MulticastDelegate:invoke_void_object_EventArgs (object,
  System.EventArgs)
 at System.Web.HttpApplication+
<>c__CompilerGenerated2.MoveNext () [0x0] --- End of
   inner exception stack trace ---
-->
--

Is there something wrong on my side ? (note that this is working correctly
with the Visual Studio 2005 embedded Asp Server)
Should I fill a bug report ?

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


Re: [Mono-list] Combining JIT and interpreter

2007-03-06 Thread Jonathan Chambers

I added some updates to two of the tasks below.

On 3/6/07, Miguel de Icaza <[EMAIL PROTECTED]> wrote:


Hello,

> Any suggestions as to what these other things could be ?

Here are some:

* Implement generic code sharing (this is when the compiler
  detects that the generated code for two different
  instantiations of a generic method would have the same
  code).

* Precompilation (AOT) support for new platforms.

* Win64 port.



This is underway. There are a few issues.

* First, the runtime will need to be built with MSVC as gcc (and the rest of
the cygwin toolchain) is not ported to Win64. This means we can either drive
MSVC using the current autotools/cygwin build process, or just use VS to
build runtime. Right now, it looks much easier to just use VS so this is the
approach I am taking. I'll setup some scripts to copy files to correct
location after build so that mcs tree can be built using the MSVC built
runtime.

* As for actually porting runtime code, a few tasks I can think of or
started include generally cleaning up the vcproj files, fixing any
trucations if they exist (sizeof(long) == 4 on Win64), removing inline
assembly (64-bit MSVC does not support this), modifying the JIT to handle
the Win64 calling convention (there is only one AFAIK).

* The other big task is making sure all the dependent libraries, mainly
libgc and glib, exist on Win64. I started working on libgc (the newer
releases ship with vcproj files), but I think little work has been done in
this area. For glib, there is a currently active thread on the gtk mailing
list right now where someone else is building glib on Win64 so I'm hoping
this is done by the time I need it.


   * Complete the Mono verifier (we have tests that are failing

  in the verifier directory).

* Add XPCOM or UNO support to Mono in addition to the current
  Mainsoft COM support (coordinate with Jonathan Chambers).



* XPCOM support should be very trivial to add, at least on Win/Linux
x86/x86-64 platforms. Mainly, it just needs someone interested in this to
try it and report any problems. I spent a few hours last weekend to see if I
could use the COM Interop infrastructure to traverse the Mozilla DOM and I
could. The main issues are where XPCOM differs from MS COM, like strings and
the actual component creation mechanism.


There are other tasks here:


http://www.mono-project.com/Todo

And here:

http://www.mono-project.com/StudentProjects

Miguel.

> Thanks,
> -Aram
>
> On Mar 5, 2007, at 5:05 PM, Miguel de Icaza wrote:
>
> >
> >> I am trying to modify Mono to have the interpreter and JIT compiler
> >> run at the same time. The idea is to have some parts interpreted
> >> while others compiled. Does mono already do this ? Are there
> >> mechanisms in place for this ?
> >
> > It does not do it.
> >
> > There is no mechanism to do it.
> >
> > This seems like a lot of work, there might be better things to do that
> > would give you better bang for your buck though.
> >
> > Miguel.
>
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list

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


Re: [Mono-list] Adding Solaris/amd64 support

2007-03-06 Thread Miguel de Icaza
Hello,

> I adapted it from this snippet in configure.in:
>   sparc*-*-*)
>   if test "x$ac_cv_sizeof_void_p" = "x8"; then
>  TARGET=SPARC64
>   else
>   TARGET=SPARC
>   fi
> So that if I pass CFLAGS=-m64 it compiles 64-bit amd64 or otherwise  
> 32-bit x86.

Ah ok, that sounds fine.

As long as the patch *also* includes a patch to the README to explicitly
state this, I think we are fine.

> Unfortunately I've never needed to debug on Unix except in Xcode but  
> if you or someone else walks me through this I'd be happy to provide  
> any output. How do I turn it into a G_BREAKPOINT? What tools do I  
> need to use? Dtrace? gdb? What parameters, prompts etc.?

Replace the g_assert in the line with the error with a call to
"G_BREKAPOINT".

Then run with gdb:

gdb mono
(gdb) run program.exe
wait for breakpoint 
(gdb) x/20i address

Address is whatever address the method is trying to decode, you will
have to look that one up on the source.


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


Re: [Mono-list] Combining JIT and interpreter

2007-03-06 Thread Miguel de Icaza
Hello,

> Any suggestions as to what these other things could be ?

Here are some:

* Implement generic code sharing (this is when the compiler
  detects that the generated code for two different
  instantiations of a generic method would have the same
  code).

* Precompilation (AOT) support for new platforms.

* Win64 port.

* Complete the Mono verifier (we have tests that are failing
  in the verifier directory).

* Add XPCOM or UNO support to Mono in addition to the current
  Mainsoft COM support (coordinate with Jonathan Chambers).

There are other tasks here:

http://www.mono-project.com/Todo

And here:

http://www.mono-project.com/StudentProjects

Miguel.

> Thanks,
> -Aram
> 
> On Mar 5, 2007, at 5:05 PM, Miguel de Icaza wrote:
> 
> >
> >> I am trying to modify Mono to have the interpreter and JIT compiler
> >> run at the same time. The idea is to have some parts interpreted
> >> while others compiled. Does mono already do this ? Are there
> >> mechanisms in place for this ?
> >
> > It does not do it.
> >
> > There is no mechanism to do it.
> >
> > This seems like a lot of work, there might be better things to do that
> > would give you better bang for your buck though.
> >
> > Miguel.
> 
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] What do I do with my images...

2007-03-06 Thread J. Pablo Fernández
Hello David,

On Tuesday March 6 2007 06:40, David Anes wrote:
> Hi again Jose.
>
> I've been trying to get this working directlywith streams, but I did not
> have any success.
> The simple approach that I've found is to save the stream to a temporary
> file and then load it again.
>
> Of course, this is not the way to go, so you must invest why you can do it
> directly. If you found a solution post it here.

I made it work. It took me quite a while of hard work. I'll publish all of it 
in my blog shortly.

Thank you.
-- 
J. Pablo Fernández <[EMAIL PROTECTED]> (http://pupeno.com)


pgpJR7KfsfUQU.pgp
Description: PGP signature
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Xml Entity Resolution

2007-03-06 Thread colin

Tried that (see below) but it still gets "System.Xml.XmlException:
Reference to undeclared entity" exceptions.

Thanks again,
C.

XmlDocument doc = new XmlDocument();
XmlTextReader reader = new XmlTextReader(new
StringReader(xml_text_with_entities));
reader.XmlResolver = null;
doc.Load(reader);

On Tue, 06 Mar 2007 06:07:02 +0900, "Atsushi Eno" <[EMAIL PROTECTED]>
said:
> Well, you could just try XmlTextReader.XmlResolver = null here ...
> 
> Atsushi Eno
> 
> Colin John Nicholas Breame wrote:
> > Hi,
> > 
> > I've tried your solution with both XmlTextReader and XmlValidatingReader
> > but I can't make it work.  The problem is that the XmlTextReader
> > actually requires entities to be resolved.
> > 
> > As a work around I've subclassed XmlTextReader to return false for
> > CanResolveEntity, which seems to (at least initially) do the trick.  See
> > below.
> > 
> > Thanks
> > C.
> > 
> > using System.IO;
> > using System.Xml;
> > 
> > public class NonEntityResolvingXmlTextReader : XmlTextReader {
> >   public NonResolvingXmlTextReader(TextReader reader) : base(reader) {
> >   }
> > 
> >   public override bool CanResolveEntity {
> > get {
> >   return false;
> > }
> >   }
> > }
> > 
> > 
> > On Mon, 05 Mar 2007 14:00:00 +0900, "Atsushi Eno" <[EMAIL PROTECTED]>
> > said:
> >> Hi,
> >>
> >> If you skip the DTD, any entity references (except for <, >, 
> >> ' and ") are rejected during XmlDocument.Load().
> >>
> >> If you don't care such buggy document, you can try
> >>
> >>while (!reader.EOF)
> >>doc.AppendChild (doc.ReadNode (reader));
> >>
> >> which does not reject unresolved entity references (funny, but
> >> this is what .net System.Xml.dll does).
> >>
> >> Atsushi Eno
> >>
> >> [EMAIL PROTECTED] wrote:
> >>> I'm trying to turn off entity resolution using XmlDocument as I don't
> >>> have a DTD and I'm getting "System.Xml.XmlException: Cannot resolve
> >>> entity without DTD".  I can't see an explicit "ResolveEntity" property I
> >>> could set to off.  Any ideas?  Is there a mono specific way of doing
> >>> this?
> >>>
> >>> Thanks
> >>> Colin.
> >>> ___
> >>> Mono-list maillist  -  Mono-list@lists.ximian.com
> >>> http://lists.ximian.com/mailman/listinfo/mono-list
> >>>
> >> ___
> >> Mono-list maillist  -  Mono-list@lists.ximian.com
> >> http://lists.ximian.com/mailman/listinfo/mono-list
> > 
> 
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] What do I do with my images...

2007-03-06 Thread David Anes

Hi again Jose.

I've been trying to get this working directlywith streams, but I did not
have any success.
The simple approach that I've found is to save the stream to a temporary
file and then load it again.

Of course, this is not the way to go, so you must invest why you can do it
directly. If you found a solution post it here.

Cheers,
David Anes.

2007/3/4, J. Pablo Fernández <[EMAIL PROTECTED]>:


Hi David,
Thank you very much for your answer, it was very useful.

On Sunday March 4 2007 11:24, David Anes wrote:
> Another problem you may find, is the way to load back the resources,
> because you have a stream, instead a physical file.

Right.

> Librsvg allows you to
> load directly from a memory chunk, instead of a file, so try this way
> instead to load directly from an on-disk file.

Yes, a memory chunk when having a pointer to it (System.IntPtr) but I have
a
stream (System.IO.Stream... or actually a System.IO.IntPtrStream), I can't
find a way to get the pointer out of the stream.

Thank you.
--
J. Pablo Fernández <[EMAIL PROTECTED]> (http://pupeno.com)


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


Re: [Mono-list] color of the font textbox

2007-03-06 Thread David Anes

Hi "admin".

You must not change directly the color. Is Gtk and the current theme for Gtk
who will change the color for you. If it does not change, is probably
because the current Gtk theme you are using does not define a text color for
disabled items, for example.

Cheers,
David Anes.

2007/3/6, admin <[EMAIL PROTECTED]>:


Help me.

How can I change the color of the font textbox when
textbox.enable=false ?
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list

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


[Mono-list] xsp throws FileNotFoundException

2007-03-06 Thread Frederik Carlier
Hi,

I'm trying to make a simple website run under Mono. I created a NAnt
build script to build the website and tested it under Windows with
Cassini. That works.

Running the same website with xsp, however, yields an FileNotFoundException:

System.IO.FileNotFoundException: File or assembly name 
/tmp/fcarlier-temp-aspnet-0/a1868974/1623c9ba.dll, or one of its dependencies, 
was not found.
File name: "/tmp/fcarlier-temp-aspnet-0/a1868974/1623c9ba.dll"
  at <0x0> 
  at (wrapper managed-to-native) System.Reflection.Assembly:LoadFrom 
(string,bool)
  at System.Reflection.Assembly.LoadFrom (System.String assemblyFile) [0x0] 
  at Microsoft.VisualBasic.VBCodeCompiler.CompileFromFileBatch 
(System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) 
[0x0] 
  at Microsoft.VisualBasic.VBCodeCompiler.CompileAssemblyFromFileBatch 
(System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) 
[0x0] 
  at Microsoft.VisualBasic.VBCodeCompiler.CompileFromDomBatch 
(System.CodeDom.Compiler.CompilerParameters options, 
System.CodeDom.CodeCompileUnit[] ea) [0x0] 
  at Microsoft.VisualBasic.VBCodeCompiler.CompileAssemblyFromDomBatch 
(System.CodeDom.Compiler.CompilerParameters options, 
System.CodeDom.CodeCompileUnit[] ea) [0x0] 
  at Microsoft.VisualBasic.VBCodeCompiler.CompileAssemblyFromDom 
(System.CodeDom.Compiler.CompilerParameters options, 
System.CodeDom.CodeCompileUnit e) [0x0] 
  at System.Web.Compilation.CachingCompiler.Compile 
(System.Web.Compilation.BaseCompiler compiler) [0x0] 
  at System.Web.Compilation.BaseCompiler.GetCompiledType () [0x0] 
  at System.Web.Compilation.AspGenerator.GetCompiledType () [0x0] 
  at System.Web.UI.ApplicationFileParser.GetCompiledApplicationType 
(System.String inputFile, System.Web.HttpContext context) [0x0] 
  at System.Web.HttpApplicationFactory.InitType (System.Web.HttpContext 
context) [0x0] 
  at System.Web.HttpApplicationFactory.GetApplication (System.Web.HttpContext 
context) [0x0] 
  at System.Web.HttpRuntime.RealProcessRequest (System.Object o) [0x0] 

Upon manual inspection, it shows that the temporary directory exists,
but the file doesn't. It may be related to the change to the new vbnc
compiler, but I'm rather in the dark about this.

Does anyone have an idea about how I could fix this?

Thanks!

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


Re: [Mono-list] Adding Solaris/amd64 support

2007-03-06 Thread Andreas Färber
Hi Miguel,

Thanks for the quick reply!

>> By default, Solaris' gcc compiles to 32-bit unless overwritten by -
>> m64. I have therefore patched configure.in to infer the x86/amd64
>> architecture from the pointer size (as seen for another platform).
>
> This sounds like a choice that the Solaris gcc people thought  
> should be
> made explicitly.  Maybe we should do the same, and have a special
> configure option that enables the 64 bit binary?

I adapted it from this snippet in configure.in:
sparc*-*-*)
if test "x$ac_cv_sizeof_void_p" = "x8"; then
   TARGET=SPARC64
else
TARGET=SPARC
fi
So that if I pass CFLAGS=-m64 it compiles 64-bit amd64 or otherwise  
32-bit x86.

Of course you/we could change this behavior. My personal opinion on  
this is that I don't like this approach at all - I would favor an  
approach where this is decided at compile time using the defines  
__x86_64__ etc. Would it not be possible to set up a header to do #if  
defined(__x86_64) #define TARGET AMD64 or similar? That would also  
facilitate cross-compiling e.g. Mac OS X universal or Unix to Symbian.

>> ** ERROR **: file mini-amd64.c: line 180 (amd64_patch): assertion
>> failed: (amd64_is_imm32 (disp))
>> aborting...
>> Stacktrace:
>>
>> Abbrechen - Speicherabbild 'core' geschrieben
>
> You could turn the above into a G_BREAKPOINT and with the debugger see
> what it is trying to decode (you cause x/20i address on the address to
> see the disassembled instruction).

Unfortunately I've never needed to debug on Unix except in Xcode but  
if you or someone else walks me through this I'd be happy to provide  
any output. How do I turn it into a G_BREAKPOINT? What tools do I  
need to use? Dtrace? gdb? What parameters, prompts etc.?

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