开发者

Migrating from ASP.NET Web Site to Web Application. Where to put App_Code files

I am migrating my web site to web application and not sure where to put app_code files? I have moved the whole app_code开发者_JS百科 folder to web application but while compiling web app I get error that classes are not found.


I think once an Web Application, the App_Code folder is relatively useless...as in, it doesn't have its special meaning that it has within a WebSite project. So there's nothing stopping you still having a folder called App_Code and putting your classes (and whatever other files) in there.

It may make more sense to put the files within folders and namespace the classes with relevance logical groupings (helper classes, business rules, data access, whatever) or perhaps move the classes into a separate Windows Class Library project (DLL) which your web application references...


I just found that I must mark files inside app_code as compile and everything will work.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜