Setting up an ASP.NET 2.0 application in a subfolder

J

Jimi

Hi all, we are deploying a test ASP.NET 2.0 website and as such our test url
looks something like

http://202.45.201.25/testfolder

Now if I go to the above url and view my default page

http://202.45.201.25/testfolder/default.aspx

I get the old

==========

Parser Error
Description: An error occurred during the parsing of a resource required to
service this request. Please review the following specific parse error
details and modify your source file appropriately.

Parser Error Message: Could not load type 'Default'.

Source Error:

Line 1: <%@ Page Language="C#" MasterPageFile="~/Default.master"
AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default"
Title="Untitled Page" %>
Line 2:
Line 3: <%@ Register Src="UserControls/AdminNav.ascx" TagName="AdminNav"
TagPrefix="uc1" %>


==========

As I believe that the ASP.NET engine is looking for the bin files in the
root folder

e.g.

http://202.45.201.25/bin

instead of

http://202.45.201.25/testfolder/bin

in the 1.1 framework I would have simply copied the necessary dll out of the
BIN folder under http://202.45.201.25/testfolder/bin and placed it in the
bin folder under http://202.45.201.25/bin

How can I do this in ASP.NET 2.0??

TIA
Mark
 
J

Juan T. Llibre

re:
How can I do this in ASP.NET 2.0??

The same way you do it in ASP.NET 1.1 :

You create an IIS application which points to testfolder.
Then, you'll be able to place your testfolder dll's in testfolder/bin
 
G

Guest

Hi Jimi
If you want a project that is similar to Asp.net 1.1 download this add on
for vs2005.
Using this you can easily migrate your web application from previous version
and all the code behind is compiled into a single assembly
The link is
http://msdn.microsoft.com/asp.net/reference/infrastructure/wap/

If you don;t want this try using publising wizard inside vs2005 to deploy
your project.

Thanks
Shailesh
 
J

Juan T. Llibre

I should add a bit to this reply.

What I wrote reflects the idea that, in ASP.NET 2.0, you can deploy assemblies
to the /bin directory just like you can with the 1.1 .Net Framework/ASP.NET 1.1.

To do that, you just compile, from the command-line,
your dll's and place them in the /bin directory.

What might be confusing is that you are really referring
to the way VS 2003 and VS 2005 deploy their websites.

VS 2003 builds its websites as a single dll which it places in the /bin directory.
VS 2005 builds its websites as many dll's, with random names.

As Shailesh points out, the WAP can compile your websites created
with VS 2005 using the same compilation model as VS 2003.

If you decide to go that way, make sure you read Scott Guthrie's tutoriqals :
http://webproject.scottgu.com/

Also, don't forget to visit the WAP forum :
http://forums.asp.net/1019/showforum.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top