Class Library project for Asp.Net deploying other files than dll
i've made a开发者_运维百科 Class Library project for Asp.Net applications, consisting in some classes plus some support js, css, and image files that need to be deployed in the hosting web application.
The problem is that the support files are copied in the bin\ directory of application, so they becomes unavailable on the iis (HTTP 403 errors), infact the bin folder is only for dll files.
Any idea on how to publish these support files to make them available to main app?
Thanks.
You need to embed your resources into your class library. Your js, css and image files will then be contained within your dll and accessible to your other projects.
Here is a walkthrough.
you should use visual studio's publish feature when deploying web applications. Right click on the web application project and you should see the 'publish' option which enables you to publish the content files and assemblies without a hassle.
Take the js, css and image files out of the class library. The class library is just that - a project that compiles into a DLL.
精彩评论