单个DLL - 如何摆脱ASPX文件? [英] Single DLL - How to get rid of ASPX files?

查看:69
本文介绍了单个DLL - 如何摆脱ASPX文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2005下的Web部署项目。


我希望能够部署到新服务器的只是\bin \\ br />
文件夹和web.config(可能还有其他一些支持文件)。但是基本上我不想要部署所有ASPX,图像,.js等等。


有没有办法实现这个目标?


我似乎记得某种特殊的ASP.NET标记文件,你可以把它放在

的应用程序根目录下,它会告诉它获取所有的ASPX内容来自

DLL。我有没有梦想过?


谢谢,

- 鲍里斯Y

I''m using a Web Deployment Project under Visual Studio 2005.

What I would love to be able to deploy to a fresh server is just the \bin
folder and the web.config (and perhaps a couple of other support files). But
essentially I don''t want to have to deploy all the ASPXs, images, .js etc.

Is there a way to achieve this?

I seem to remember some sort of special ASP.NET marker file you could put in
the application root which would tell it to get all the ASPX content from the
DLL. Did I dream it?

Thanks,
- Boris Y

推荐答案

带有dll编译的ASPX文件是占位符。如果他们不在那里,

你得到404.如果是,那么DLL有智能在代码中找到指针。

这是一个不幸的副作用。 AFAIK,如果你想完全摆脱它们的b $ b,你需要创建自己的处理程序来重定向404.


-

Gregory A. Beamer

MVP; MCP:+ I,SE,SD,DBA
http://gregorybeamer.spaces。 live.com


******************************* ******************

在盒子外面思考!

********** *******************************************

鲍里斯叶利钦" < bo **** @ nospam.nospamwrote in message

news:2A ************************** ******** @ microsof t.com ...
The ASPX files, with a dll compile, are placeholders. If they are not there,
you get a 404. If they are, the DLL has smarts to find the pointer in code.
It is an unfortunate side effect. AFAIK, if you want to completely get rid
of them, you would need to create your own handler that redirects the 404.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside of the box!
*************************************************
"Boris Yeltsin" <bo****@nospam.nospamwrote in message
news:2A**********************************@microsof t.com...

我在Visual Studio 2005下使用Web部署项目。


我希望能够部署到新服务器的只是\bin

文件夹和web.config(以及其他一些支持文件) )。

但是

基本上我不想要部署所有ASPX,图像,.js等。


有没有办法实现这个目标?


我似乎记得某种特殊的ASP.NET标记文件你可以把它放在

中>
应用程序root,它会告诉它从

获取所有ASPX内容的

DLL。我有没有梦想过?


谢谢,

- 鲍里斯Y
I''m using a Web Deployment Project under Visual Studio 2005.

What I would love to be able to deploy to a fresh server is just the \bin
folder and the web.config (and perhaps a couple of other support files).
But
essentially I don''t want to have to deploy all the ASPXs, images, .js etc.

Is there a way to achieve this?

I seem to remember some sort of special ASP.NET marker file you could put
in
the application root which would tell it to get all the ASPX content from
the
DLL. Did I dream it?

Thanks,
- Boris Y



" Boris Yeltsin"写道:
"Boris Yeltsin" wrote:

我希望能够部署到新服务器的只是\bin

文件夹和网络。 config(也许还有其他一些支持文件)。但是基本上我不想要部署所有ASPX,图像,.js等等。


有没有办法实现这个目标?
What I would love to be able to deploy to a fresh server is just the \bin
folder and the web.config (and perhaps a couple of other support files). But
essentially I don''t want to have to deploy all the ASPXs, images, .js etc.

Is there a way to achieve this?



是的,打开一个命令提示符并cd到你的2.0框架文件夹(某些东西

就像C:\ WINDOWS \ MicrosoftMrosros.NET \ Framework \v2.0.50727)并使用

aspnet_compiler.exe,如下所示:


aspnet_compiler.exe -v / VirtualDirName -p C:\\ \\ ProjectPath C:\ OnputFolder

然后,您可以将C:\ OnputFolder的内容复制到IIS服务器上的虚拟目录

/ VirtualDirName。记得要确保虚拟的

目录设置为使用.net框架的v2,否则你只需要获得

占位符文本(因为所有的aspx文件仍然存在)存在,它们只是空白的)

Yes, open a command prompt and cd to your 2.0 framework folder (something
like C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727) and use
aspnet_compiler.exe, like this:

aspnet_compiler.exe -v /VirtualDirName -p C:\ProjectPath C:\OutputFolder

You can then copy the contents of C:\OutputFolder to the virtual directory
/VirtualDirName on your IIS server. Remember to make sure the virtual
directory is set to use v2 of the .net framework, or you''ll just get
placeholder text (as all the aspx files still exists, they are just blank)


好的,这类似于标准的发布功能。它几乎就在那里。


一些问题:


1)bin文件夹中的每个文件都有程序集(DLL) ,而不仅仅是一个

网站的单个DLL


2)我的外部资源(图片,JavaScript文件)没有编译成

DLL


所以,如果我们能找到这些解决方案,我们就会摇摆不定!


谢谢,

- 鲍里斯Y


" Leon Mayne"写道:
OK, this is similar to the standard publish function. It''s almost there though.

Some issues:

1) There are assemblies (DLLs) for each file in the bin folder, not just a
single DLL for the web site

2) My external resources (Images, JavaScript files) are not compiled into
the DLL

So, if we can find solutions to these, we''ll be rocking!

Thank you,
- Boris Y

"Leon Mayne" wrote:

" Boris Yeltsin"写道:
"Boris Yeltsin" wrote:

我希望能够部署到新服务器的只是\bin

文件夹和网络。 config(也许还有其他一些支持文件)。但是基本上我不想要部署所有ASPX,图像,.js等等。


有没有办法实现这个目标?
What I would love to be able to deploy to a fresh server is just the \bin
folder and the web.config (and perhaps a couple of other support files). But
essentially I don''t want to have to deploy all the ASPXs, images, .js etc.

Is there a way to achieve this?



是的,打开一个命令提示符并cd到你的2.0框架文件夹(某些东西

就像C:\ WINDOWS \ MicrosoftMrosros.NET \ Framework \v2.0.50727)并使用

aspnet_compiler.exe,如下所示:


aspnet_compiler.exe -v / VirtualDirName -p C:\\ \\ ProjectPath C:\ OnputFolder

然后,您可以将C:\ OnputFolder的内容复制到IIS服务器上的虚拟目录

/ VirtualDirName。记得要确保虚拟的

目录设置为使用.net框架的v2,否则你只需要获得

占位符文本(因为所有的aspx文件仍然存在)存在,它们只是空白的)


Yes, open a command prompt and cd to your 2.0 framework folder (something
like C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727) and use
aspnet_compiler.exe, like this:

aspnet_compiler.exe -v /VirtualDirName -p C:\ProjectPath C:\OutputFolder

You can then copy the contents of C:\OutputFolder to the virtual directory
/VirtualDirName on your IIS server. Remember to make sure the virtual
directory is set to use v2 of the .net framework, or you''ll just get
placeholder text (as all the aspx files still exists, they are just blank)


这篇关于单个DLL - 如何摆脱ASPX文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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