Re: Website set as application?

From: Juan T. Llibre (nomailreplies_at_nowhere.com)
Date: 01/23/05


Date: Sun, 23 Jan 2005 12:07:19 -0400

OK...

If you open the VS.NET 2002 project in VS.NET 2003,
VS.NET 2003 will attempt to convert the project
and report back any problems which it found.

It also should create a backup of your 2002 project files.

Then, when you attempt the build, you may find build errors.
You would then have to determine the correct way to fix them.

What I would do is *not* try to open the old project.

I'd create a new, empty, web project, in VS.NET 2003,
and use the "add existing items" feature of VS.NET
to thenew project.

Then, I'd look in the previous project's VS.NET project file,
identify the references which don't exist in the empty
project, and add them to the new project.

That would ensure that the references are correct for .Net 1.1

Then, I'd compile the new version in VS.NET 2003.

You still might get build errors which you'd have to fix,
but you won't be saddled with conversion problems
should there be any.

Another thing to watch out for is whether the "old" project
had sub-projects in it.

Some web applications use more than one project.
You'd have add the additional projects, too, if there's any.

Hopefully it's a one-project solution and it'd be simpler.

Juan T. Llibre
ASP.NET MVP
===========
"Chris" <Chris@discussions.microsoft.com> wrote in message
news:CB3619AE-EA32-4CB1-B968-A4D5B4791307@microsoft.com...
> Last set of questions I promise:
>
> If I bring in the project into my VS.NET 2003 copy and recompile, will
> that
> automaticaly copy the versions in 1.0 that are in 1.1 to 1.1?
> So in theory I should be able to look at the project file and see them
> using
> the 1.1 directory and not the 1.0 like I do now. And is there also the
> assumption that if the project using 1.0 specific class, etc then they
> won't
> be upgraded and I can see that in the project file as well.
> Or do you have to "remove" each reference" then add it back thus ensuring
> it
> to be 1.1? I.e. system.web, etc. I've looked at the project file after
> re-compiling in VS2003 and they still point to 1.0.
> I've used the article to response.write the version of the framework that
> is
> running on the machine and I've confirmed 1.1.
>
> Thanx for all your help.
>
>
> "Juan T. Llibre" wrote:
>
>> re:
>> > I don't need 1.0 on my Win2003 server.
>> > The assumption is that the highest revision of
>> > the framework is always backward compatible correct?
>>
>> No.
>>
>> Your 1.0 application may call assemblies which don't exist any more,
>> or whose functions have been changed in later versions.
>>
>> That's why .Net versions run "side-by-side",
>> instead of the latest version just replacing the "old" version.
>>
>> You need the *particular* version of .Net for which the application
>> was compiled for to be installed, and enabled, in order to be assured
>> of being able to run a .Net application compiled for a previous
>> version of the .Net Framework you've got installed.
>>
>> Also, the assembly versioning in machine.config is different
>> for different versions of the .Net framework.
>>
>> For example, see the differences between v1.1 and v2.0 :
>>
>> 1.1 :
>> <section name="webServices"
>> type="System.Web.Services.Configuration.WebServicesConfigurationSectionHandler,
>> System.Web.Services, Version=1.0.5000.0,
>>
>> 2.0 :
>> <section name="webServices"
>> type="System.Web.Services.Configuration.WebServicesConfigurationSectionHandler,
>> System.Web.Services, Version=2.0.3600.0,
>>
>> Notice the difference between the Version numbers.
>> It's a different one for .Net 1.0, too.
>>
>>
>>
>>
>> Juan T. Llibre
>> ASP.NET MVP
>> ===========
>> "Chris" <Chris@discussions.microsoft.com> wrote in message
>> news:4ABB2A42-BDD5-4B82-A7BF-641555B51A95@microsoft.com...
>> >I don't know what I was thinking, becuase I read that v1.1 is backward
>> > compatible to v1.0, so I don't need 1.0 on my Win2003 server. If I move
>> > to
>> > 2.0 then it will have to updated on the server. The assumption is that
>> > the
>> > highest revision of the framework is always backward compatible
>> > correct?
>> >
>> > thanx.
>>
>> > "Juan T. Llibre" wrote:
>> >
>> >> If you've gotten that far, maybe you can get
>> >> v1.0.3705 to work by running aspnet_regiis -i
>> >> from the v1.0.3705 directory.
>> >>
>> >> Then, you could switch the application's version,
>> >> so it runs under v1.0.3705, by running Denis Bauer's
>> >> "ASP.NET Version Switcher" to change the .net
>> >> version the Application will runs as.
>> >>
>> >> http://www.denisbauer.com/NETTools/ASPNETVersionSwitcher.aspx
>> >>
>> >> When you run the "ASP.NET Version Switcher"
>> >> check the .net version your Application is running as.
>> >>
>> >> If it's listed as running under v1.1, change it to v1.0.
>> >> ( *after* you run aspnet_regiis -i ).
>> >>
>> >> To do that, select ASP.NET version 1.0,
>> >> and click the "Switch .Net Framework Version" button.
>> >>
>> >> I don't guarantee you results,
>> >> but if it works you owe me a virtual beer !
>> >>
>> >> ;-)
>> >>
>> >>
>> >>
>> >> Juan T. Llibre
>> >> ASP.NET MVP
>> >> ===========
>> >> "Chris" <Chris@discussions.microsoft.com> wrote in message
>> >> news:C0CE6695-C24A-485B-9214-7FA05C1A916D@microsoft.com...
>> >> >I right click on that file and I do get: 1.1.4322.2032.
>> >> >
>> >> > In the file you listed before:
>> >> > drive:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG\machine.config
>> >> > on my win2003 server:
>> >> > <section name="webServices"
>> >> > type="System.Web.Services.Configuration.WebServicesConfigurationSectionHandler,
>> >> > System.Web.Services, Version=1.0.5000.0, Culture=neutral,
>> >> > PublicKeyToken=b03f5f7f11d50a3a"/>
>> >> >
>> >> > On local development box (VS.net on win2k):
>> >> > I get the same.
>> >> >
>> >> > I do have, on my 2003 server, a v1.0.3705 framework build now that I
>> >> > installed 1.0. This is where I tried to create a new pooling choice
>> >> > using
>> >> > it's 'aspnet_isapi.dll' file.
>> >> >
>> >> > what about my other question? Any of this make sense? I use updater
>> >> > service
>> >> > on both the server and workstation to keep updated.
>> >> >
>> >> > thanx.
>> >> >
>> >> >
>> >> > I get:
>> >> >
>> >> > "Juan T. Llibre" wrote:
>> >> >
>> >> >> Version 1.1 should be 1.1.4322, not 1.0.5000.0
>> >> >>
>> >> >> If you right-click aspnet_isapi.dll in the
>> >> >> drive:\WINDOWS\Microsoft.NET\Framework\v1.1.4322
>> >> >> directory and select "properties", and then select
>> >> >> the "Version" tab, doesn't it have the version number
>> >> >> "1.1.4322.2032" ?
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> Juan T. Llibre
>> >> >> ASP.NET MVP
>> >> >> ===========
>> >> >> "Chris" <Chris@discussions.microsoft.com> wrote in message
>> >> >> news:A795292A-AFED-4BCF-AB12-8C05473739BE@microsoft.com...
>> >> >> > Also, looked at my Win2003 server in the directory you list below
>> >> >> > /CONFIG/
>> >> >> > and I found:
>> >> >> >
>> >> >> > in v1.0....
>> >> >> > Version=1.0.3300.0
>> >> >> >
>> >> >> > in v1.1...
>> >> >> > Version=1.0.5000.0
>> >> >> >
>> >> >> > Is this right, I assume 1.0.5 is 1.1???? Where do you find the
>> >> >> > reference
>> >> >> > to
>> >> >> > 1.1 as the framework?
>> >> >> >
>> >> >> > thanx.
>> >> >> > "Juan T. Llibre" wrote:
>> >> >> >
>> >> >> >> Hmmm...that is a problem.
>> >> >> >>
>> >> >> >> If you take a look at
>> >> >> >> drive:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG\machine.config
>> >> >> >>
>> >> >> >> you'll see that the references to v1.1.4322's
>> >> >> >> System.Web.Services are completely different.
>> >> >> >>
>> >> >> >> I'm not even sure that you can *run*
>> >> >> >> ..Net Framework v1.0.3705 in W2K3.
>> >> >> >>
>> >> >> >> Windows Server 2003 is the first OS which runs
>> >> >> >> the .Net Framework 1.1.4322 "out of the box".
>> >> >> >>
>> >> >> >> It doesn't even come with the
>> >> >> >> ..Net Framework v1.0.3705 installed.
>> >> >> >>
>> >> >> >> You could try to register the .Net Framework v1.0.3705,
>> >> >> >> if you copied the whole directory structure from the W2K box,
>> >> >> >> by running aspnet_regiis -i from the
>> >> >> >> drive:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\ directory but,
>> >> >> >> quite frankly, this might screw up your system.
>> >> >> >>
>> >> >> >> It's bound to be quite a complicated, and risky, task
>> >> >> >> to run a deprecated version of the .Net Framework
>> >> >> >> in an OS which doesn't even come with it, but comes
>> >> >> >> with a later version.
>> >> >> >>
>> >> >> >> About the best thing I'd recommend is that VS.NET 2003
>> >> >> >> be installed in the *original* W2K box, and then that the
>> >> >> >> application be recompiled and debugged for the .Net 1.1
>> >> >> >> Framework.
>> >> >> >>
>> >> >> >> Then, you could copy the *Application*
>> >> >> >> to your W2K3 box and run it under .Net 1.1.
>> >> >> >>
>> >> >> >> best regards,
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> Juan T. Llibre
>> >> >> >> ASP.NET MVP
>> >> >> >> ===========
>> >> >> >> "Chris" <Chris@discussions.microsoft.com> wrote in message
>> >> >> >> news:AD6760C7-3CC8-4772-B263-233FE07DC723@microsoft.com...
>> >> >> >> > I'm not sure if this is the issue; they're running this app on
>> >> >> >> > a
>> >> >> >> > Window
>> >> >> >> > 2K
>> >> >> >> > box and I'mnot sure but the VS.NET project file has reference
>> >> >> >> > to
>> >> >> >> > Framework
>> >> >> >> > 1.0, see below:
>> >> >> >> >
>> >> >> >> > <Reference Name = "System.Web.Services"
>> >> >> >> > AssemblyName = "System.Web.Services"
>> >> >> >> > HintPath =
>> >> >> >> > "..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Web.Services.dll"
>> >> >> >> > />
>> >> >> >> >
>> >> >> >> > My Win2003 server only has accepted to run v1.1, is that the
>> >> >> >> > issue?
>> >> >> >> > If
>> >> >> >> > so,
>> >> >> >> > do I need to install v1.0? I moved the folder over to my
>> >> >> >> > server for
>> >> >> >> > the
>> >> >> >> > framework.
>> >> >> >> >
>> >> >> >> > Thanx.
>> >> >> >> >
>> >> >> >> > "Juan T. Llibre" wrote:
>> >> >> >> >
>> >> >> >> >> To create an Application using a Virtual Directory
>> >> >> >> >> as its starting point, open the IIS Manager, scroll
>> >> >> >> >> down to the virtual directory, select it, and rght-click it.
>> >> >> >> >>
>> >> >> >> >> From the pop-up menu, select "Properties".
>> >> >> >> >>
>> >> >> >> >> Then, click on the "Create" button.
>> >> >> >> >> That will make your virtual directory an Application.
>> >> >> >> >>
>> >> >> >> >> If you do that, your error message should disappear.
>> >> >> >> >> Please let us know how you do.
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >> Juan T. Llibre
>> >> >> >> >> ASP.NET MVP
>> >> >> >> >> ===========
>> >> >> >> >> "Chris" <Chris@discussions.microsoft.com> wrote in message
>> >> >> >> >> news:731AE0B4-7DDF-4C20-88E6-6C289D346B03@microsoft.com...
>> >> >> >> >> > I'm trying to get an existing VS.NET project up on my
>> >> >> >> >> > Win2003
>> >> >> >> >> > server
>> >> >> >> >> > and I
>> >> >> >> >> > get the following error (on the actual website page):
>> >> >> >> >> >
>> >> >> >> >> > "It is an error to use a section registered as
>> >> >> >> >> > allowDefinition='MachineToApplication' beyond application
>> >> >> >> >> > level.
>> >> >> >> >> > This
>> >> >> >> >> > error
>> >> >> >> >> > can be caused by a virtual directory not being configured
>> >> >> >> >> > as an
>> >> >> >> >> > application
>> >> >> >> >> > in IIS."
>> >> >> >> >> >
>> >> >> >> >> > I've been told by the previous developer that the website
>> >> >> >> >> > needs
>> >> >> >> >> > to
>> >> >> >> >> > be
>> >> >> >> >> > set
>> >> >> >> >> > as
>> >> >> >> >> > a "application". I assume this means what process it runs
>> >> >> >> >> > under?
>> >> >> >> >> > I've
>> >> >> >> >> > created
>> >> >> >> >> > a virtual directory to the location and the site can be
>> >> >> >> >> > seen. but
>> >> >> >> >> > I
>> >> >> >> >> > get
>> >> >> >> >> > that
>> >> >> >> >> > error listed above?
>> >> >> >> >> > The application pools are:
>> >> >> >> >> >
>> >> >> >> >> > DEFAULTAPPPOOL (default)
>> >> >> >> >> > MSSHAREPOINTAPPPOOL
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> > What does this developer mean? Thanx
>>