PDA

View Full Version : سوال: خطاي App_Code/' is not allowed because the application is precompiled



javadaghaiy
پنج شنبه 03 تیر 1389, 14:10 عصر
با سلام
من روي پروژه اي كار مي كنم كه يه بنده خداي نوشته حالا هم سايت بالا نمي ياد
سورسي كه به من دادن و اجراش مي كنم مدام اين خطا رو مي ده من تا حالا با اين خطا مواجه نشدم و هركارهم مي كنم درست نمي شه و به ظاهر ايرادي هم نداره



اين هم كد خطا:
The directory '/Source/App_Code/' is not allowed because the application is precompiled. body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size: .9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }


Server Error in '/Source' Application.

The directory '/Source/App_Code/' is not allowed because the application is precompiled.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The directory '/Source/App_Code/' is not allowed because the application is precompiled.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:

[HttpException (0x80004005): The directory '/Source/App_Code/' is not allowed because the application is precompiled.]
System.Web.Compilation.CodeDirectoryCompiler.GetCo deDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +3542110
System.Web.Compilation.BuildManager.CompileCodeDir ectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +125
System.Web.Compilation.BuildManager.CompileCodeDir ectories() +525
System.Web.Compilation.BuildManager.EnsureTopLevel FilesCompiled() +448




[HttpException (0x80004005): The directory '/Source/App_Code/' is not allowed because the application is precompiled.]
System.Web.Compilation.BuildManager.ReportTopLevel CompilationException() +57
System.Web.Compilation.BuildManager.EnsureTopLevel FilesCompiled() +612
System.Web.Hosting.HostingEnvironment.Initialize(A pplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +644




[HttpException (0x80004005): The directory '/Source/App_Code/' is not allowed because the application is precompiled.]
System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +3465427
System.Web.HttpRuntime.EnsureFirstRequestInit(Http Context context) +69
System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr) +279

javadaghaiy
دوشنبه 21 تیر 1389, 16:07 عصر
يعني هيچكي با اين خطا دستو پنچه نرم نكرده

:عصبانی++::عصبانی++::عصبانی++:

F1 F1 F1 F1 F1 F1 F1

hlikehamed
دوشنبه 21 تیر 1389, 16:27 عصر
دوست عزیز من یه بار به این خطا برخوردم.
این خطا وقتی رخ میده که توی App_Code یه کلاس تعریف شده باشه و توی بقیه قسمت های سایت از اون کلاس استفاده شده باشه.
احتمالا توی کامپایل کردن سایت مشکلی پیش اومده.
ساده ترین راه اینکه کلاس رو از اون قسمت خارج کنی (به بخش اصلی سایت اضافه کنی)بعد یه بار دیگه سایتت رو کامپایل کنی. مشکلت حل میشه.
البته اگر درست کامپایل کنی این مشکل به وجود نمیاد.

موفق باشی

amirjalili
دوشنبه 21 تیر 1389, 16:57 عصر
با سلام.
به لینک زیر مراجعه کنید
http://www.barnamenevis.org/forum/showthread.php?t=216042&page=7