开发者

Adding web.config to ASP.NET Data Access Component

How do I add a web.config to a class library? I'm trying to build a data access component with two classes, one class that represents one thing and the other to perform data operation开发者_运维问答s on that thing. However when I right click the project and click add item, I don't see information for adding a web.config, I just see information for adding an app.config. Maybe I'm doing this wrong? I'd like this component to be available to other asp.net apps that I will build in the future....


You can't add a config file to a dll, because you can't directly execute a dll. Config files are for executables and web sites.

If you want to create a reference config, that just gives an example of how the config settings for your dll should look, then try creating a text file.


Why do you need to add a web.config? All you would need to be able to make the component available to other ASP.NET apps is add a reference, either to the project or the dll itself.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜