By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,319 Members | 2,361 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,319 IT Pros & Developers. It's quick & easy.

question about using multiple asp.net projects for a web site

P: n/a
I have broken up my web site into smaller web site projects. When I look at
the precompiled files, it always has the virtual directory in them ie:

<preserve resultType="3" virtualPath="/Security/DefaultLogin.aspx"
hash="fde4916e6" filehash="ffffe84d717a4765" flags="110000"
assembly="App_Web_-xo1n4yg" type="ASP.defaultlogin_aspx">
<filedeps>
<filedep name="/Security/DefaultLogin.aspx" />
</filedeps>
</preserve>

The /security - how can I get the compile/system to pre-compile without the
virtual path ie "/security"

Also, is it possible to break a web site up into smaller units and combine
this units to make a bigger site? If so, where is the documentation on the
recommended way to do it?

Thanks

Eric

Feb 22 '06 #1
Share this Question
Share on Google+
10 Replies


P: n/a
There are three approaches you could use:

1) The VS 2005 Web Deployment Project. This includes the aspnet_merge.exe utility
that will merge assemblies into a single well named assembly. This is what you'd want
to use if you want to use the VS 2005 Web Site Project option and generate a single
named assembly :

http://msdn.microsoft.com/asp.net/re...p/default.aspx

2) The VS 2005 Web Application Project. This provides a VS 2003-like compilation model
where the project always gets compiled into a single assembly. Here is a tutorial that walks
through how to-do this with the current preview:

http://webproject.scottgu.com/CSharp...rControls.aspx

3) You can use either the publish web or aspnet_compiler MSBuild task with the released
VS 2005 and generate fixed name assemblies that are updatable (which means that .ascx files
are preserved).

This blog post walksthrough how to-do this:

http://weblogs.asp.net/scottgu/archi...28/423888.aspx


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"eswanson" <ej*******@newsgroups.nospam> wrote in message
news:CF**********************************@microsof t.com...
I have broken up my web site into smaller web site projects. When I look at
the precompiled files, it always has the virtual directory in them ie:

<preserve resultType="3" virtualPath="/Security/DefaultLogin.aspx"
hash="fde4916e6" filehash="ffffe84d717a4765" flags="110000"
assembly="App_Web_-xo1n4yg" type="ASP.defaultlogin_aspx">
<filedeps>
<filedep name="/Security/DefaultLogin.aspx" />
</filedeps>
</preserve>

The /security - how can I get the compile/system to pre-compile without the
virtual path ie "/security"

Also, is it possible to break a web site up into smaller units and combine
this units to make a bigger site? If so, where is the documentation on the
recommended way to do it?

Thanks

Eric


Feb 22 '06 #2

P: n/a
If we were to use option 1. Would we build each of our asp.net web projects
into separate named assemblies?

I used the IDE to publish the web sites, but it sounds like I would use the
option of creating a named assembly for each of our web projects?

What we are attempting to do, is if a set of web pages change, we only want
to move those modified webpages up to the production server while leaving the
rest of the web site alone.

Say we have 20 pages, which are divided into 5 projects. We would build the
5 projects and copy these assembies up to our prod web site. Later if one of
the projects changes, we would rebuild this project and copy it back up to
the prod server. Is this correct?

Thanks

Eric
"Juan T. Llibre" wrote:
There are three approaches you could use:

1) The VS 2005 Web Deployment Project. This includes the aspnet_merge.exe utility
that will merge assemblies into a single well named assembly. This is what you'd want
to use if you want to use the VS 2005 Web Site Project option and generate a single
named assembly :

http://msdn.microsoft.com/asp.net/re...p/default.aspx

2) The VS 2005 Web Application Project. This provides a VS 2003-like compilation model
where the project always gets compiled into a single assembly. Here is a tutorial that walks
through how to-do this with the current preview:

http://webproject.scottgu.com/CSharp...rControls.aspx

3) You can use either the publish web or aspnet_compiler MSBuild task with the released
VS 2005 and generate fixed name assemblies that are updatable (which means that .ascx files
are preserved).

This blog post walksthrough how to-do this:

http://weblogs.asp.net/scottgu/archi...28/423888.aspx


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"eswanson" <ej*******@newsgroups.nospam> wrote in message
news:CF**********************************@microsof t.com...
I have broken up my web site into smaller web site projects. When I look at
the precompiled files, it always has the virtual directory in them ie:

<preserve resultType="3" virtualPath="/Security/DefaultLogin.aspx"
hash="fde4916e6" filehash="ffffe84d717a4765" flags="110000"
assembly="App_Web_-xo1n4yg" type="ASP.defaultlogin_aspx">
<filedeps>
<filedep name="/Security/DefaultLogin.aspx" />
</filedeps>
</preserve>

The /security - how can I get the compile/system to pre-compile without the
virtual path ie "/security"

Also, is it possible to break a web site up into smaller units and combine
this units to make a bigger site? If so, where is the documentation on the
recommended way to do it?

Thanks

Eric


Feb 22 '06 #3

P: n/a
Hi Eric,

All of the options Juan has posted in his message is based on single web
project, the aspnet_compiler or aspnet_merge tool all precompile single
website's source files and UI components into different assemblies. If
you've separated a single website into multiple website, I'm afraid those
option(like web deployment project) won't work.

Generally, we just consider for a single web site web application, then we
can use the Web Deployment Project to help make the whole precompiled
website has only one assembly which contains all the precompiled web UI
component classes and other helper classes.... For detailed mechanism of
the asp.net 2.0 precompilation and the web deployment project, see the
articles linked in the following page:

http://msdn.microsoft.com/asp.net/re...p/default.aspx

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Feb 23 '06 #4

P: n/a
I think I understand that the developers only looked at a single web site as
a single web application.

What I am talking about is a single web site, single web application made up
of multiple VS.Net web projects. In the end I want a single web site, single
web application made up of multiple VS.NET web projects compiled into
multiple assemblies stored in the bin directory of the single web site. The
bin directory would contain multiple assemblies storing the source code of
our application components. Is this possible with option number 1 of Juan's
options?

Thanks

Eric

"Steven Cheng[MSFT]" wrote:
Hi Eric,

All of the options Juan has posted in his message is based on single web
project, the aspnet_compiler or aspnet_merge tool all precompile single
website's source files and UI components into different assemblies. If
you've separated a single website into multiple website, I'm afraid those
option(like web deployment project) won't work.

Generally, we just consider for a single web site web application, then we
can use the Web Deployment Project to help make the whole precompiled
website has only one assembly which contains all the precompiled web UI
component classes and other helper classes.... For detailed mechanism of
the asp.net 2.0 precompilation and the web deployment project, see the
articles linked in the following page:

http://msdn.microsoft.com/asp.net/re...p/default.aspx

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Feb 23 '06 #5

P: n/a
Thanks for making that clearer, Steven!

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:%2***************@TK2MSFTNGXA01.phx.gbl...
Hi Eric,

All of the options Juan has posted in his message is based on single web
project, the aspnet_compiler or aspnet_merge tool all precompile single
website's source files and UI components into different assemblies. If
you've separated a single website into multiple website, I'm afraid those
option(like web deployment project) won't work.

Generally, we just consider for a single web site web application, then we
can use the Web Deployment Project to help make the whole precompiled
website has only one assembly which contains all the precompiled web UI
component classes and other helper classes.... For detailed mechanism of
the asp.net 2.0 precompilation and the web deployment project, see the
articles linked in the following page:

http://msdn.microsoft.com/asp.net/re...p/default.aspx

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Feb 23 '06 #6

P: n/a
Thanks for the response Eric,

I think this is just the problem here.

As you mentioned, in your case there're multiple vs 2005 web projects
making up of a single website. However, the precompilation of the VS
2005(aspnet_compiler) or web deployment project(aspnet_merge) is targeting
a single web project(not a logical site in your scenario. So if you want
to build a single assembly for your whole site, you need to do the
precompilation after you've intergrated all those seprate vs 2005 web
projects into single main web project, then use the options mentioned in
previous message on that single project.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Feb 24 '06 #7

P: n/a
Hi Steven,

Can you have multiple compiled assemblies make up a web site? If so, it
looks like the best way would be to make them updateble. Is this the correct
assumption. What I do not want to do is to make one giantic assembly for the
web site.

Instead we are attempting to make smaller assemblies that will make up the
whole web site. Is this possible under VS 2005?

Thanks

Eric

"Steven Cheng[MSFT]" wrote:
Thanks for the response Eric,

I think this is just the problem here.

As you mentioned, in your case there're multiple vs 2005 web projects
making up of a single website. However, the precompilation of the VS
2005(aspnet_compiler) or web deployment project(aspnet_merge) is targeting
a single web project(not a logical site in your scenario. So if you want
to build a single assembly for your whole site, you need to do the
precompilation after you've intergrated all those seprate vs 2005 web
projects into single main web project, then use the options mentioned in
previous message on that single project.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Feb 26 '06 #8

P: n/a
Thanks for your response Eric,

Well, I've got that what you want is make the whole website separated into
multiple parts and precompiled them into separate assemblies rather than
generate a single too huge one. I'm afraid this not supported by the
current precompilation model. The current precompiler will perform the
precompilation based on project/website level. So when precompiling the
website, it'll build some application scope data and helper
classes(internal use) into the precompiled assembly, if we separate one
web site project into multiple ones and precompile the separately, I'm
afraid there will cause those assemblies contains duplicate items which
will conflict with one another. In addition ,the path problem you mentioned
is also one of the potenital issues.

Currently I think the "merge each individual folder output to its own
assembly" option of the "Web Deployment Project" may be one possible
workaround, this can help make each sub folder( the page or resources in
it) in the applicaiton be precompiled into a separate assembly.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Feb 27 '06 #9

P: n/a
I will try this.

Thanks

Eric

"Steven Cheng[MSFT]" wrote:
Thanks for your response Eric,

Well, I've got that what you want is make the whole website separated into
multiple parts and precompiled them into separate assemblies rather than
generate a single too huge one. I'm afraid this not supported by the
current precompilation model. The current precompiler will perform the
precompilation based on project/website level. So when precompiling the
website, it'll build some application scope data and helper
classes(internal use) into the precompiled assembly, if we separate one
web site project into multiple ones and precompile the separately, I'm
afraid there will cause those assemblies contains duplicate items which
will conflict with one another. In addition ,the path problem you mentioned
is also one of the potenital issues.

Currently I think the "merge each individual folder output to its own
assembly" option of the "Web Deployment Project" may be one possible
workaround, this can help make each sub folder( the page or resources in
it) in the applicaiton be precompiled into a separate assembly.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Feb 27 '06 #10

P: n/a
Good luck Eric,

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Feb 28 '06 #11

This discussion thread is closed

Replies have been disabled for this discussion.