[Pkg-mono-devel] Re: mod-mono and xsp

Tomasz Rybak bogomips@post.pl
Thu, 14 Oct 2004 18:24:53 +0200


--=-2OsHVL/JgHP4umyUnmdg
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 8bit

W li¶cie z czw, 14-10-2004, godz. 14:07, Fabian Fagerholm pisze: 
> On Thu, 2004-10-14 at 14:38 +0300, Fabian Fagerholm wrote:
> > On Wed, 2004-10-13 at 10:04 -0500, Pablo Fischer wrote:
> > > I uploaded a new version (prev1) and it works fine (I tested it in
> > > apache 1.3, please try with apache2).
> > 
> > I'm going through it now.
> 
> Ok, I've tested libapache2-mod-mono and I'm able to see the
> asp.net-examples. Some of them don't work, but this is another problem.

dbpage[12].aspx don'y work because of outdated web.config:

barad-dur:~# lynx -dump http://localhost/samples/dbpage1.aspx

                    Server error in '/samples' application
     _________________________________________________________________

   Description: Error processing request.

   Error Message: HTTP 500.

   Stack Trace:

System.NullReferenceException: Object reference not set to an instance
of an ob
ject
in <0x00072> ASP.dbpage1_aspx:Page_Init (object,System.EventArgs)
in <0x00069> (wrapper delegate-invoke)
System.MulticastDelegate:invoke_void_obj
ect_EventArgs (object,System.EventArgs)
in <0x00086> System.Web.UI.Control:OnInit (System.EventArgs)
in <0x00273> System.Web.UI.Control:InitRecursive (System.Web.UI.Control)
in <0x00060> System.Web.UI.Page:InternalProcessRequest ()
in <0x000c2> System.Web.UI.Page:ProcessRequest (System.Web.HttpContext)
in <0x002eb> ExecuteHandlerState:Execute ()
in <0x00084> StateMachine:ExecuteState
(System.Web.HttpApplication/IStateHandle
r,bool&)
     _________________________________________________________________


and after copying web.config from upstream xsp-1.0.2:


barad-dur:~# cp web.config /usr/share/asp.net-demos/asp/web.config
barad-dur:~# lynx -dump http://localhost/samples/dbpage1.aspx

  Database Error

   Sorry, a database error has occurred.

   You should set up a database for user 'monotest', password 'monotest'
   and dbname 'monotest'.

   Then modify the variables DBProviderAssembly, DBConnectionType and
   DBConnectionString in server.exe.config file to fit your needs.

   The database should have a table called customers created with the
   following command (or similar):
CREATE TABLE "test" (
        "person" character varying(256) NOT NULL,
        "email" character varying(256) NOT NULL
);

   The error was:
 Npgsql.NpgsqlException:
database "monotest" does not exist
Severity: FATAL
Code: 3D000
in <0x00061> Npgsql.NpgsqlConnection:CheckErrors ()
in <0x0004f> (wrapper remoting-invoke-with-check)
Npgsql.NpgsqlConnection:Check
Errors ()
in <0x00447> Npgsql.NpgsqlConnection:Open ()

   The error was:
 System.InvalidOperationException: The Connection is not open.
in <0x000aa> Npgsql.NpgsqlCommand:CheckConnectionState ()
in <0x0004f> (wrapper remoting-invoke-with-check)
Npgsql.NpgsqlCommand:CheckCon
nectionState ()
in <0x00012> Npgsql.NpgsqlCommand:ExecuteCommand ()
in <0x0004f> (wrapper remoting-invoke-with-check)
Npgsql.NpgsqlCommand:ExecuteC
ommand ()
in <0x00040> Npgsql.NpgsqlCommand:ExecuteReader
(System.Data.CommandBehavior)
in <0x00054> (wrapper remoting-invoke-with-check)
Npgsql.NpgsqlCommand:ExecuteR
eader (System.Data.CommandBehavior)
in <0x0002d> Npgsql.NpgsqlCommand:ExecuteReader ()
in <0x00050> (wrapper remoting-invoke-with-check)
Npgsql.NpgsqlCommand:ExecuteR
eader ()
in <0x00028> Npgsql.NpgsqlCommand:System.Data.IDbCommand.ExecuteReader
()
in <0x0011a> ASP.dbpage1_aspx:UpdateTable (string,string)
barad-dur:~#

web.config carried by Debian package is from xsp-0.9.1, and since
then names of modules has been changed.
So maintainers, please either remove web.config from subversion 
repository (see attached patch) or copy upstream version 
into repository.

-- 
Tomasz Rybak <bogomips@post.pl>

--=-2OsHVL/JgHP4umyUnmdg
Content-Disposition: attachment; filename=Plik
Content-Type: text/x-patch; name=Plik; charset=iso-8859-2
Content-Transfer-Encoding: 7bit

Index: web.config
===================================================================
--- web.config	(revision 1447)
+++ web.config	(working copy)
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<configuration>
-    <configSections>
-	    <sectionGroup name="mono.aspnet">
-		<section name="acceptEncoding" type="Mono.Http.AcceptEncodingSectionHandler, Mono.Http"/>
-	    </sectionGroup>
-    </configSections>
-
-    <system.web>
-        <customErrors mode="Off"/>
-	<webServices>
-		<soapExtensionTypes>
-			<add type="DumpExtension, extensions" priority="0" group="0" />
-			<add type="EncryptExtension, extensions" priority="1" group="0" />
-		</soapExtensionTypes>
-	</webServices>
-	<authentication mode= "Forms">
-	</authentication>
-    	<!--httpModules>
-            <add name="AcceptEncodingModule" type="Mono.Http.AcceptEncodingModule, Mono.Http"/>
-	</httpModules-->
-    </system.web>
-
-    <mono.aspnet>
-        <acceptEncoding>
-	    <!-- Change disabled to 'no' to enable gzip content encoding -->
-	    <add encoding="gzip" type="Mono.Http.GZipWriteFilter, Mono.Http" disabled="no" />
-	</acceptEncoding>
-    </mono.aspnet>
-
-    <appSettings>
-	<add key="MonoServerDefaultIndexFiles"
-	     value="index.aspx, Default.aspx, default.aspx, index.html, index.htm" />
-	<add key="DBProviderAssembly"
-	     value="Mono.Data.PostgreSqlClient"/>
-	<add key="DBConnectionType"
-	     value="Mono.Data.PostgreSqlClient.PgSqlConnection"/>
-	<add key="DBConnectionString"
-	     value="hostaddr=127.0.0.1;user=monotest;password=monotest;dbname=monotest"/>
-    </appSettings>
-</configuration>
-
Index: rules
===================================================================
--- rules	(revision 1447)
+++ rules	(working copy)
@@ -82,7 +82,6 @@
 	dh_install 
 	cd test && cp ServiceClient.exe *.aspx *.ascx *.asmx *.ashx *.config *.asax *.xml *.png *.inc *.xsl *.cs $(CURDIR)/debian/asp.net-examples/usr/share/asp.net-demos/asp
 	cp -f debian/index.aspx $(CURDIR)/debian/asp.net-examples/usr/share/asp.net-demos/asp/
-	cp debian/web.config $(CURDIR)/debian/asp.net-examples/usr/share/asp.net-demos/asp
 	cd test && cp *.dll $(CURDIR)/debian/asp.net-examples/usr/share/asp.net-demos/asp/bin
 	rm -Rf $(CURDIR)/debian/asp.net-examples/usr/share/asp.net-demos/asp/monodoc.ashx
 

--=-2OsHVL/JgHP4umyUnmdg--