我在本地ISS上部署用http://localhost/访问是好的,
上传到网络空间就出现图片中的问题了
里面包括了错误提示和堆栈,但我始终无法解决问题。请高手帮帮忙
Server Error in '/' Application.
--------------------------------------------------------------------------------
 This application was precompiled with personalization turned off, but it appears to have been turned on after the precompilation, which is not supported. 
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: This application was precompiled with personalization turned off, but it appears to have been turned on after the precompilation, which is not supported.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): This application was precompiled with personalization turned off, but it appears to have been turned on after the precompilation, which is not supported.]
   System.Web.Compilation.ProfileBuildProvider.GetProfileTypeFromAssembly(Assembly assembly, Boolean isPrecompiledApp) +9946522
   System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +391
   System.Web.Compilation.BuildManager.CompileCodeDirectories() +382
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +252[HttpException (0x80004005): This application was precompiled with personalization turned off, but it appears to have been turned on after the precompilation, which is not supported.]
   System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +62
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +427
   System.Web.Compilation.BuildManager.CallAppInitializeMethod() +31
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +530[HttpException (0x80004005): This application was precompiled with personalization turned off, but it appears to have been turned on after the precompilation, which is not supported.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9874568
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
 

解决方案 »

  1.   

    搞个简单的aspx页面试试
    -------
    你本地什么开发环境,服务器是什么运行环境
      

  2.   

    Please review the stack trace for more information about the error and where it originated in the code. 
    --->错误提示叫检查源代码Exception Details: System.Web.HttpException: This application was precompiled with personalization turned off, but it appears to have been turned on after the precompilation, which is not supported.在web.config里面加一句:
    <compilation debug="true" targetFramework="4.0">