English 中文(简体)
ASP. NET 管道结构、环境问题
原标题:ASP.NET plug-in architecture, settings problem

我想将 as网应用的商业层面分成多个部分。 每个组成部分都是一个网络级图书馆,作为独立的DLL编制。 这些组成部分应有自己的组合文件。 例如,“MyName Space.Users.dll”载有网站用户课程,有密码政策对密码长度至少为X性质的情况进行检查。 当网络总长编辑这部DLL的汇合档案,并确定X至 y 然后,部件(DL)今后应使用新的价值(y),并至少执行密码。 我希望每个组成部分都成为一个单一项目,并单独汇编(而不是将所有项目纳入视觉演播室的解决办法),并将这些图书馆的DLLs置于我的伙伴关系的“Bin”夹中。 NET应用软件。

Is it possible ? Where should I put these config files ?

最佳回答

4.0. 网上发布的“可适用性框架”

http://mef.codeplex.com

问题回答

imho 它是可能的,但并非从盒子中删除。

ASP.NET uses by defautl only the one web.config in the web root (and pproriate machine .config files higher up in the hierarchy). But you can create custom settings providers for each of your dlls that read values from separate .config files. see http://msdn.microsoft.com/en-us/library/ms228060.aspx This way you create different SettingsManager providing settings to parts of the App and reading the info from files.

加上你可以使用文件系统 添加的栏目中重载数值的观察器。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签