6

My application works fine whenever I run under VS 2010. When I upload it on a server and I run from IIS it gives Complie error : CS0433: 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\~\App_Web_dzybh5am.DLL' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\~\App_Web_znctdhjf.DLL'

Error:

Line 146:    
Line 147:    [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
Line 148:    public class default_aspx : global::_Default, System.Web.SessionState.IRequiresSessionState, System.Web.IHttpHandler {
Line 149:        
Line 150:        private static bool @__initialized;

A quick search on google revealed that deleting those temporary files solved the problem.

Is it useful to delete those temporary files, will it affect my application in future ?

I just want to know should I delete all files from temporary folder.

leppie
  • 115,091
  • 17
  • 196
  • 297
Satinder singh
  • 10,100
  • 16
  • 60
  • 102
  • Which Temp files are you talking about? Do you take the IIS website offline before deploying? – Alex Moore May 16 '12 at 11:21
  • @AlexMoore: i mean assembly files created underc:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\~\App_Web_znctdhjf.DLL' – Satinder singh May 16 '12 at 11:37
  • Check your code and classes also. Try to pre-compile the project it will give you more detailed info on what is causing the problem. That was my case, maybe your is different. And deleting temporary files from there, was not a problem. If you need info on precompile, tell me to give you the details. it's a simple one. – zdrsh May 16 '12 at 11:54
  • @zdrsh : i think error cause of content page "<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Adminhomepage.aspx.cs" Inherits="_Default" MasterPageFile="~/MasterPage2.master" %> where it inherit="_Default" which is not there in my project earlier have remaned my _Default with adminpage.aspx. Am still doing R&D.. – Satinder singh May 16 '12 at 11:58
  • duplicate of http://stackoverflow.com/a/1757324/21336 – devio May 16 '12 at 12:02
  • @devio: Thanx for reply. that what i asking if i delete those files further will it effect to my application – Satinder singh May 16 '12 at 12:05

1 Answers1

2

As long as your web app is shut down, it shouldn't have any effect on the application.
.Net / IIS uses that temp folder as a place to hold the compiled versions of your aspx/razor pages.

Keep in mind though that other IIS web apps may be using that temp folder, so be careful about when you do it.

Alex Moore
  • 3,415
  • 1
  • 23
  • 39