关于为网站使用多个asp.net项目的问题 [英] question about using multiple asp.net projects for a web site

查看:108
本文介绍了关于为网站使用多个asp.net项目的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将我的网站分解为较小的网站项目。当我查看

预编译文件时,它总是有虚拟目录,即:


< preserve resultType =" 3" virtualPath =" /Security/DefaultLogin.aspx"

hash =" fde4916e6" filehash = QUOT; ffffe84d717a4765" flags =" 110000"

assembly =" App_Web_-xo1n4yg" type =" ASP.defaultlogin_aspx">

< filedeps>

< filedep name =" /Security/DefaultLogin.aspx" />

< / filedeps>

< / preserve>


/ security - 我怎样才能获得编译/系统预编译没有

虚拟路径,即/ security


此外,是否有可能将网站分解为更小单位和组合

这个单位,以建立一个更大的网站?如果是这样的话,

推荐方法的文件在哪里?


谢谢


Eric

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

推荐答案

您可以使用三种方法:


1)VS 2005 Web部署项目。这包括aspnet_merge.exe实用程序

,它将程序集合并到一个命名良好的程序集中。如果你想使用VS 2005网站项目选项并生成一个名为

命名的程序集,那么这就是你想要使用的


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


2)VS 2005 Web应用程序项目。这提供了一个类似VS 2003的编译模型

,其中项目总是被编译成单个程序集。这是一个教程,通过如何使用当前预览来完成



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


3)您可以使用已发布的

VS 2005发布web或aspnet_compiler MSBuild任务,并生成可更新的固定名称程序集(这意味着.ascx文件

是保留)。


这篇博客文章介绍了如何做到这一点:

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>在消息中写道

新闻:CF ********************************** @ microsof t.com ...
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...
我已将我的网站分解为较小的网站项目。当我查看预编译文件时,它总是有虚拟目录,即:

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

/ security - 如何在没有
虚拟路径即/ security

此外,是否可以将网站分成更小的单元并将这些单元组合成一个更大的网站?如果是这样的话,建议的方式文件在哪里?

谢谢

Eric
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






如果我们使用选项1.我们是否会将每个asp.net Web项目

构建到单独的命名程序集中?


我使用IDE发布网站,但听起来我会使用

选项为我们的每个网站项目创建命名程序集?

我们试图做的是,如果一组网页发生变化,我们只需要

将这些经过修改的网页移到生产服务器上,同时留下

单独的网站其余部分。


假设我们有20个页面,分为5个项目。我们将构建

5项目并将这些组合复制到我们的prod网站。稍后如果项目发生变化,我们会重建这个项目,然后将其复制回pr />
prod服务器。这是正确的吗?


谢谢


Eric

" Juan T. Llibre"写道:
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:
您可以使用三种方法:

1)VS 2005 Web部署项目。这包括aspnet_merge.exe实用程序
,它将程序集合并到一个命名良好的程序集中。如果您想使用VS 2005 Web站点项目选项并生成一个名为的程序集,那么这就是您想要使用的内容:

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

2)VS 2005 Web应用程序项目。这提供了一个类似VS 2003的编译模型,其中项目总是被编译成单个程序集。这是一个教程,介绍如何使用当前预览:

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

3)你可以使用发布web或aspnet_compiler MSBuild任务与发布的
VS 2005并生成可更新的固定名称程序集(这意味着.ascx文件被保留)。

这篇博文文章如何通过如何要做到这一点:

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/
foro s de asp.net,en espa?±ol: http://asp.net.do / foros /
===================================
" eswanson" < EJ ******* @ newsgroups.nospam>在消息中写道
新闻:CF ********************************** @ microsof t.com。 ..
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...
我已将我的网站分解为较小的网站项目。当我查看预编译文件时,它总是有虚拟目录,即:

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

/ security - 如何在没有
虚拟路径即/ security

此外,是否可以将网站分成更小的单元并将这些单元组合成一个更大的网站?如果是这样的话,建议的方式文件在哪里?

谢谢

Eric
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




嗨Eric,


Juan在他的留言中发布的所有选项都基于单一网页

项目,aspnet_compiler或aspnet_merge工具都将单个

网站的源文件和UI组件预编译到不同的程序集中。如果你将一个网站分成多个网站,我恐怕那些

选项(比如网络部署项目)不会工作。


一般来说,我们只考虑单个网站的Web应用程序,然后我们

可以使用Web部署项目帮助制作整个预编译的

网站只有一个程序集,其中包含所有预编译的Web UI

组件类和其他帮助程序类....对于详细的机制

asp.net 2.0预编译和Web部署项目,请参阅以下页面中链接的

文章:

http://msdn.microsoft.com/asp.net/re...p/default.aspx < br $>

问候,


Steven Cheng

微软在线支持


安全! www.microsoft.com/security

(此帖子按原样提供,不作任何保证,并且不授予

权利。)

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.)


这篇关于关于为网站使用多个asp.net项目的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆