将所有资源打包到一个.dll中 [英] Pack all resources in one .dll

查看:120
本文介绍了将所有资源打包到一个.dll中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个Asp.Net应用程序并将其打包到一个DLL中.实际上,我想实现FlurioneFX Asp.Net库所具有的相同效果.要安装此库,您只需要在Bin文件夹中复制一个DLL,然后创建空的Gateway.aspx.之后,您可以打开:
浏览器中的http://yourhost/FlurioneFx.aspx(实际上并不存在),所有资源都将从此Dll加载.

我该怎么做?

I want to create an Asp.Net application and pack it into one DLL. Actually I want to achieve the same effect FlurioneFX Asp.Net library does. To install this library, you just need to copy one DLL inside of Bin folder, and create empty Gateway.aspx. After that, you can open:
http://yourhost/FlurioneFx.aspx in your browser (which doesn''t physically exists) and all resources will be loaded from this Dll.

How can I do the same?

推荐答案

您可以使用反射来查看他们的代码,看看他们是如何做的.我想象他们使用某种形式的URL重定向来完成此操作,该URL重定向在其dll中运行aspx,然后将其发送以响应对不在物理上的页面的页面请求.我不确定为什么有人会这样做.
You can use reflection to look at their code and see how they do it. I imagine they do it with some form of URL redirection, which runs the aspx inside their dll, and sends it in response to a page request for a page that is not physically there. I''m not sure why anyone would want to do this.


感谢有关URL重定向的提示.我想可能是这样.

之所以要这样做,是因为我想将我的应用程序分发到一个文件中.为了轻松地将其添加到现有网站,而无需复制图像,css/javascript文件等.
Thanks for the tip about URL redirection. I think it probably it.

The reason, why I want to do it, is that I want to distribute my application in a single file. To make it easy to add it to existent Website, without necessary of copying images, css/javascript files, etc.


这篇关于将所有资源打包到一个.dll中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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