App_Code 폴더의 클래스 파일 만 ASP .NET 웹 사이트 응용 프로그램의 파일에서 참조 할 수 있습니다. 왜 그렇게?ASP .NET 웹 사이트 응용 프로그램의 파일에있는 App_Code 폴더의 클래스 파일 만 참조 할 수 있습니다.
답변
Only the class files inside App_Code folder is able to refer in a file in
ASP .NET website application. Why its so?
대답은 매우 단순한 웹 사이트 응용 프로그램으로 설계된 것입니다.
App_Code 폴더는 특별한 ASP.NET RUNTIME 폴더입니다.이 폴더의 모든 파일은 사이트가 실제로 서버에서 실행될 때 ASP.NET에 의해 컴파일됩니다.
This essentially allows you to drop random class/code files in this folder to be compiled on the server side. For this very reason if you drop something new into the App_Code folder of your running web site, it is like resetting it coz ASP.NET runtime now recognizes that there is a new class which needs to be kept in consideration during running the site. This magical folder brings with itself various connotations when it comes to different project types
courtesy
ASP.NET이 포함 된 파일을 기반으로 App_Code 폴더에 대한 호출하는 컴파일러 런타임에 결정합니다. App_Code 폴더에 .vb
개의 파일이 있으면 ASP.NET은 VB compiler
을 사용합니다. 파일에 .cs
이 포함되어 있으면 ASP.NET은 C# compiler
을 사용하며 ...
다음 리소스도 참조 할 수 있습니다.
ASP.NET WebSite and ASP.NET Web Application
의 차이점이 있습니다. 코드 파일이 App_Code
폴더에 저장된 웹 사이트가 생성 된 것처럼 보입니다. 웹 응용 프로그램을 만들면 컴파일 할 위치에 코드를 배치하여 bin 폴더에 복사 할 어셈블리에 배치 할 수 있습니다. 이렇게하면 웹 서버에 소스 코드를 배포 할 필요가 없습니다.