[Mono-list] Re: Unable to deploy an ASP.NET application

Bradley, Peter PBradley at uwic.ac.uk
Tue Feb 21 04:31:33 EST 2006


Hi,

Just an update on this in the hope than someone will see something that
rings a bell.

It seems clear that the two problems (having to include a Src attribute
in the .aspx file and the failure to find the remote object type) are
related.  For some reason, the ASP.NET application is unable to
reference the DLLs in the bin directory.  Bear in mind that the
application works OK when it doesn't have to reference the bin directory
- i.e. if compilation is done when the page is called and the
compilation does not require a reference to an object in the bin
directory.

Today, I changed the permissions on the bin directory and all its
contents to 777 (from 755) just to see if that would make a difference,
but it didn't.

Do I have to do something special to make the application reference the
bin directory?  The application works just fine on Windows/IIS6.

Does anyone have any ideas?

Thanks in advance.


Peter


-----Original Message-----
From: mono-list-bounces at lists.ximian.com
[mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Bradley, Peter
Sent: 20 February 2006 13:23
To: Mono-list at lists.ximian.com
Subject: RE: [Mono-list] Re: Unable to deploy an ASP.NET application

Hi all,

Sorry to post again so quickly.

Having got my server to run, I thought I'd try the ASP.NET pages again
having changed CodeBehind= to Src=

When I do that, I get the following error:

----------------------------------------------------------

Server Error in '/AspNetOnApache' Application
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: /usr/lib/xsp/test/MSc/Name.aspx.cs(14,7) : error CS0246:
The type or namespace name `MscBusinessLogic' could not be found. Are
you missing a using directive or an assembly reference?
/usr/lib/xsp/test/MSc/Name.aspx.cs(14,1) : error CS0246: The type or
namespace name `MscBusinessLogic' could not be found. Are you missing a
using directive or an assembly reference?

File name: /usr/lib/xsp/test/MSc/Name.aspx.cs

Line 1: using System;
Line 2: using System.Collections;
Line 3: using System.ComponentModel;
Line 4: using System.Data;
Line 5: using System.Drawing;
Line 6: using System.Web;
Line 7: using System.Web.SessionState;
Line 8: using System.Web.UI;
Line 9: using System.Web.UI.WebControls;
Line 10: using System.Web.UI.HtmlControls;
Line 11: using System.Web.Security;
Line 12: using System.Security.Permissions;
Line 13: using System.Threading;
Line 14: using MscBusinessLogic;
...

---------------------------------------------------------------------

This works just fine on Windows.  I have also checked that the
MScBusinessLogicProxy.dll is present in the bin directory.  I apologise
for the inconsistency in capitalisation, but I can confirm that the
MScBusinessLogicProxy.dll does contain the namespace MscBusinessLogic,
and the object Msc.  The cs file is attached.  It was produced using
soapsuds -gc

If anyone can suggest anything I could try I would be very grateful,
because I'm fresh out of ideas now.

Thanks


Peter

-----Original Message-----
From: mono-list-bounces at lists.ximian.com
[mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Bradley, Peter
Sent: 20 February 2006 12:18
To: Mono-list at lists.ximian.com
Subject: RE: [Mono-list] Re: Unable to deploy an ASP.NET application

I've spent the first part of today trying again to sort out the problems
I have with this application.  There were two:
*  Failure to start the remote object service properly
*  Failure to compile the ASP.NET pages

The first of these has been solved temporarily by using a server rather
than a service (i.e. a program that will only run if someone is logged
in, runs it and leaves it running).  This works.  It connects to the TCP
port, receives messages and returns data: I've checked it with a little
SWF test program that I have.

I'll worry about getting the service (daemon) up and running properly
when I've sorted out the ASP.NET pages.

At the moment that status of this is that I've copied all the files in
the project folder and the sub-directories (bin and images) over to the
Linux box, but when I try to run the application it immediately gives me
an error saying that it cannot find the type from which the page
inherits (please see my earlier post below).

Any help would be much appreciated.

Thanks



Peter

-----Original Message-----
From: mono-list-bounces at lists.ximian.com
[mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Bradley, Peter
Sent: 18 February 2006 16:48
To: Mono-list at lists.ximian.com
Subject: FW: [Mono-list] Re: Unable to deploy an ASP.NET application

Robert and list,

Following up as promised.

When I copy everything over as you suggest (including the bin folder), I
get an error message when trying to load the first page in the
application, saying it cannot find the type MSc.Initial.  In other
words, it fails at the directive Inherits="MSc.Initial", it seems.

The capitalisation appears to be correct to me.  From the source file:

namespace MSc
{
	/// <summary>
	/// Summary description for Initial.
	/// </summary>
	public class Initial : System.Web.UI.Page
	{

So I appear to have two problems.  The first one is that I can't get my
remote object working on the Linux box.  The second is that the ASP.NET
pages can't connect to the remote object even via a path that is known
to work.

I think the best strategy is to attack the second of these first.

However, I've been working on this all day and I'm very tired.  I'll
check with the list over what's left of the weekend, but I won't be able
to make much in the way of changes until I'm back in work on Monday
morning.

Thanks for your help

Cheers


Peter

-----Original Message-----
From: mono-list-bounces at lists.ximian.com
[mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Bradley, Peter
Sent: 18 February 2006 16:48
To: Mono-list at lists.ximian.com
Subject: FW: [Mono-list] Re: Unable to deploy an ASP.NET application

Apologies.  Forgot the "Reply All"

Peter

-----Original Message-----
From: Bradley, Peter 
Sent: 18 February 2006 16:24
To: 'Robert Jordan'
Subject: RE: [Mono-list] Re: Unable to deploy an ASP.NET application

Hi Robert,

I posted on this before.  If I do as you say, it does not work.  We can
come back to that one in a while, if you like.  I let it drop at the
time because I got my test application working by making the change I
outlined in my OP.

However, things have moved on a bit.  I've discovered that I was
mistaken to say that the SWF client worked OK.  In fact it was only
working OK when it connected to my Windows box.  When I start the Linux
daemon, it appears to start OK, but when I run the client trying to
connect to it, it says, "Socket not connected" even though rc_status is
returning "done".  I'm going to have another look at that on Monday.

Nevertheless, my ASP.NET pages will not run even when I configure them
to connect to my Windows box.  I alter the MSc.config file to point to
the url "tcp://a20186:48486" (which works for the SWF client), and
restart Apache, but I still get the same error for the ASP.NET pages.

For completeness, I'm going to copy everything over again as you say in
your post: then I'll come back and tell you the error I get.

Cheers (and thanks for your help)


Peter

-----Original Message-----
From: mono-list-bounces at lists.ximian.com
[mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Robert Jordan
Sent: 18 February 2006 15:55
To: Mono-list at lists.ximian.com
Subject: [Mono-list] Re: Unable to deploy an ASP.NET application

Hey,

> To deploy the ASP.NET application, I have copied all the files and
> folders from the application directory on my development (Win2003
> Server) box to the Linux box (including the bin directory).  On the
> Linux box, I then modified the page directive at the top of each
*.aspx
> page to change CodeBehind="..." to Src="...".  I then restarted
Apache.

Why this change? Just copy the application directory and the
bin folder. It should work from scratch.

The CodeBehind-to-Src trick is not needed for binary deployment.
In fact it is never necessary.

Robert

_______________________________________________
Mono-list maillist  -  Mono-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list

_______________________________________________
Mono-list maillist  -  Mono-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list

_______________________________________________
Mono-list maillist  -  Mono-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list




More information about the Mono-list mailing list