Logo 
Search:

MOSS Forum

Ask Question   UnAnswered
Home » Forum » MOSS       RSS Feeds

Can an ASP.Net 2.0 application run in a MOSS 2003 environment

  Asked By: Reed    Date: Feb 08    Category: MOSS    Views: 1575

I have an .Net 2.0 application and my client wants to run it in a virtual
directory of a MOSS2003 installation. Can this be done with MOSS2003 running
.Net 1.1?

Share: 

 

16 Answers Found

 
Answer #1    Answered By: Brandan Roach     Answered On: Feb 08

The last I remember was that SPS 2003 (there is no MOSS2003) would not
run on a server that had .net 2.0 installed. Otherwise, yes you can
create a virtual directory and add it to SPS 2003 as an Excluded managed
path. Then you can run  an ASP.NET application  from that subdirectory.
But as I said, I don't think it can be an ASP.net 2.0 app. You can do
it under Moss2007 and no longer need the managed path under Moss 2007.

 
Answer #2    Answered By: Kai Carney     Answered On: Feb 08

Didn't SPS 2003 SP2 add support for .NET 2.0? Or was that only for WSS
version 2 SP2?

 
Answer #3    Answered By: Gaurav Nemane     Answered On: Feb 08

Might be wrong, It's been a really long time, but as I remember it
worked in WSS, but not is SPS 2003. I think it was something about the
way Areas worked that broke if you added ASP.Net 2.0.

 
Answer #4    Answered By: Marjorie Humphrey     Answered On: Feb 08

Yes, that's right. WSS 2003 SP2 added support (just compatibility
really) for .NET 2.0, but SPS 2003 SP2 remains incompatible (won't
run at all).

Having said that, I would have thought the original poster could get
the .NET 2.0 application  to run  in an excluded path in the same web
application as SPS, if it was configured as an application in IIS
and ran in a separate app pool configured for .NET 2.0. Of course,
it would have no interaction with SPS beyond sitting under the same
URL hierarchy.

 
Answer #5    Answered By: Chelsey Watts     Answered On: Feb 08

The problem would be that you can't assign an app pool to a virtual
directory, only to a Web application. That means the excluded managed
path must run  in the same app pool as the web application. That app
pool would be running asp.net 1.1.

 
Answer #6    Answered By: Nagesh Maulik     Answered On: Feb 08

So it should be possible if you run  your code under a different web app
(different url) but on the same server ?

i.e asp  reg is set to 1.2 as teh default (i.e. set back as it will change to v2
on install) to keep sps working and the web app for the code is changed by hand
to use v2

do you think that would work (out of curiosity) ?

 
Answer #7    Answered By: Jonathan Scott     Answered On: Feb 08

Yes, you could probably run  the asp.net 2.0 app on the same server as
long as it was in a separate Url (please not it would be a
non-SharePoint Url, not another web app since all web apps would need to
be v.1.2). But I normally tried to keep asp.net 2.0 completely off SPS
2003 servers because it was too easy for the version SharePoint was
running under to get updated.

 
Answer #8    Answered By: Asia Meyers     Answered On: Feb 08

This is horrible, because we have the same terms used in conflicting
ways in IIS and SharePoint. So I apologise in advance for the
following!

I believe it could run  under the same host URL in the same IIS web
site (= SharePoint "web application"). It would need to be in a
virtual directory that was configured in IIS as an application  (i.e.
it has the cog wheel icon).

Jean, if you install .NET 2.0 on the server, you get the option for
each IIS application to set the version of .NET that is used (it's
an extra tab in the properties dialog). You would need to make sure
that the top level site and all of SPS every virtual directory with
a cog wheel in IIS) was still set to .NET 1.1. Just installing .NET
2.0 should not change existing apps, but best to check!

You could add your app as an application under the same IIS web
site, creating it in IIS in a path that is excluded in the SPS admin
screen. In IIS you configure that as an application (there is a
button to create an application in the properties dialog for a
virtual directory), make sure it is in a different app pool than
SharePoint, and configure it for .NET 2.0 in IIS (i.e. you don't
need to make code changes).

I understand Paul's issue with installing .NET 2.0 on an SPS 2003
server (we lived through that pain) - even though you configure an
IIS application for .NET 1.1, it will still sometimes find .NET 2.0
components and cause an error. There is a workaround where you add a
line to the web.config for that application that forces it to never
use anything but .NET 1.1 components.

Certainly, this is something you would want to test in a non-
production environment.

 
Answer #9    Answered By: Shelley Reese     Answered On: Feb 08

I will definitely try this today and let you know. I did not know about the
application option in the virtual directory properties. I was really close
yesterday where I got it to recognize the site as a seperate 2.0 site but I
got object reference errors. What is the setting to force a particular
framework to be used? I think this will finally get it done for me. Thanks a
million everyone.

 
Answer #10    Answered By: Omar Arnold     Answered On: Feb 08

It's this in web.config:

<configuration>
<startup>
<requiredRuntime version="v1.1.4322"/>
</startup>
</configuration>

 
Answer #11    Answered By: Christen Roberson     Answered On: Feb 08

I included this in the configuration tag:

xmlns=schemas.microsoft.com/.NetConfiguration/v2.0

Shouldnt this force the .Net 2.0 as well?

 
Answer #12    Answered By: Faith Delgado     Answered On: Feb 08

That is an XML namespace declaration. I very much doubt it will have
an effect on what version of components get run.

 
Answer #13    Answered By: Amrita Durgude     Answered On: Feb 08

I figured it out. I wont bore you on how I came to figure out the fix (it
was certainly trial and error), but the bottomline is that in order to use a
2.0 app in a 1.1 SPS2003 virtual directory env you need to:

1. Add <startup><supportedRuntime version="v2.0.50727"/></startup> to the
web.config of the 2.0 app.
2. <clear/> and readd all the various httpmodules in the that section on the
2.0 app web.config.

A pretty simple solution that took about a week to figure out. I tried
several methods to prevent web.config inheritance but none seem to do the
job completely. One that was particularly irritating was the solution of
adding:

<location path="." inheritInChildApplications="false">
</location>

to the parent web.config. This WILL prevent the child app from inheriting
the parent web.config. However, since this is new to .net 2.0, the 1.1 env
gave cause an error for an unknow atribute.

 
Answer #14    Answered By: Maricela Conway     Answered On: Feb 08

It must run  as a virtual directory under SPS. I cannot set it as a seperate
application because of port conflictions. Im not that good with IIS so Im
not sure about how the host header in IIS or even if it will work in an SPS
environment.

 
Answer #15    Answered By: Vinay Thakur     Answered On: Feb 08

Well, I think the message is, it wont work under an SPS Virtual server (i.e. web
app)

 
Answer #16    Answered By: Shameka Rich     Answered On: Feb 08

No you cannot run  .NET 2.0 with SPS2003. It would kind of
work but you always got errors with search as it did not support .NET 2.0.
Most things did work but it was always the weird errors that you just
couldn't work out that caused the most problems.

 




Tagged: