function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JamesT77JamesT77 

Unable to generate a temporary class (result=1). error CS2001:

im getting the following error when i try to login
 
Unable to generate a temporary class (result=1).
error CS2001: Source file 'C:\WINDOWS\TEMP\oqt-a62h.0.cs' could not be found.
 
the error is on the following line of code within 

Public Class EnterpriseLoginBean

    Public Sub initByUsername()

        salesForceService = New SforceService()
 
 
SuperfellSuperfell
Are you using ASP.NET ? I've seen some .NET installs where ASP.NET assumes it can read/write from the temp directory, but it actually can't, you need to manually go fix the file perms on the directory.
JamesT77JamesT77
Thanks this was the answer
WhyserWhyser

Permissions for who and for what temp folder?

 

I'm running into the same problem too. Here is the full error message that I'm getting

 

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.InvalidOperationException: Unable to generate a temporary class (result=1).
error CS0583: Internal Compiler Error (0xc0000005 at address 5A0F0A15): likely culprit is 'IMPORT'.
error CS0584: Internal Compiler Error: stage 'IMPORT' symbol 'string'
error CS0584: Internal Compiler Error: stage 'IMPORT' symbol 'Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSforceService.Write16_SessionHeader(string, string, sforce.SessionHeader, bool, bool)'
error CS0584: Internal Compiler Error: stage 'DEFINE' symbol 'Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSforceService.Write16_SessionHeader(string, string, sforce.SessionHeader, bool, bool)'
error CS0584: Internal Compiler Error: stage 'DEFINE' symbol 'Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSforceService'
error CS0584: Internal Compiler Error: stage 'DEFINE' symbol 'Microsoft.Xml.Serialization.GeneratedAssembly'
error CS0584: Internal Compiler Error: stage 'DEFINE' symbol 'Microsoft.Xml.Serialization'
error CS0584: Internal Compiler Error: stage 'DEFINE' symbol 'Microsoft.Xml'
error CS0584: Internal Compiler Error: stage 'DEFINE' symbol 'Microsoft'
error CS0584: Internal Compiler Error: stage 'DEFINE' symbol '<global namespace>'
error CS0586: Internal Compiler Error: stage 'DEFINE'
error CS0587: Internal Compiler Error: stage 'DEFINE'
error CS0587: Internal Compiler Error: stage 'BEGIN'


Source Error:

Line 77:         
Line 78:         /// <remarks/>
Line 79:         public SforceService() {
Line 80:             string urlSetting = System.Configuration.ConfigurationManager.AppSettings["sforce.enterprise"];
Line 81:             if ((urlSetting != null)) {

Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\salesforcekeygenerator\b5785b68\c43089d6\App_WebReferences.zjb8gzb7.0.cs    Line: 79

Stack Trace:

[InvalidOperationException: Unable to generate a temporary class (result=1).
error CS0583: Internal Compiler Error (0xc0000005 at address 5A0F0A15): likely culprit is 'IMPORT'.
error CS0584: Internal Compiler Error: stage 'IMPORT' symbol 'string'
error CS0584: Internal Compiler Error: stage 'IMPORT' symbol 'Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSforceService.Write16_SessionHeader(string, string, sforce.SessionHeader, bool, bool)'
error CS0584: Internal Compiler Error: stage 'DEFINE' symbol 'Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSforceService.Write16_SessionHeader(string, string, sforce.SessionHeader, bool, bool)'
error CS0584: Internal Compiler Error: stage 'DEFINE' symbol 'Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSforceService'
error CS0584: Internal Compiler Error: stage 'DEFINE' symbol 'Microsoft.Xml.Serialization.GeneratedAssembly'
error CS0584: Internal Compiler Error: stage 'DEFINE' symbol 'Microsoft.Xml.Serialization'
error CS0584: Internal Compiler Error: stage 'DEFINE' symbol 'Microsoft.Xml'
error CS0584: Internal Compiler Error: stage 'DEFINE' symbol 'Microsoft'
error CS0584: Internal Compiler Error: stage 'DEFINE' symbol '<global namespace>'
error CS0586: Internal Compiler Error: stage 'DEFINE'
error CS0587: Internal Compiler Error: stage 'DEFINE'
error CS0587: Internal Compiler Error: stage 'BEGIN'
]
   System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence) +1010
   System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies) +1902
   System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence) +74
   System.Xml.Serialization.XmlSerializer.GetSerializersFromCache(XmlMapping[] mappings, Type type) +693
   System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type) +341
   System.Web.Services.Protocols.SoapClientType..ctor(Type type) +486
   System.Web.Services.Protocols.SoapHttpClientProtocol..ctor() +265
   sforce.SforceService..ctor() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\salesforcekeygenerator\b5785b68\c43089d6\App_WebReferences.zjb8gzb7.0.cs:79
   _Default.Page_Load(Object sender, EventArgs e) in d:\wwwsite\SalesForce\SalesForceKeyGenerator\SalesForceKeyGenerator.aspx.cs:29
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627