Unable to generate a temporary class (result=1)
Asked Answered
B

2

8

I have a c# executable that triggers the WCF webservice in the same server.It was working fine until it started to throws this error message

Message : Unable to generate a temporary class (result=1).
error CS2001: Source file 'C:\Windows\TEMP\mchgnxs3.0.cs' could not be found
error CS2008: No inputs specified

What I tried so far: Provided read/write access to the account that triggers the WCF

Recently the server crashed and restored from a backup server.Is there any chance that it is related to the error?

Brigidbrigida answered 15/6, 2013 at 14:9 Comment(3)
Check the C Drive and make sure that file 'C:\Windows\TEMP\mchgnxs3.0.cs is there, and that its permissions allow access by the account the c# executable is running under (logged on as). It's possible that the restore from backup did not include either the file or the appropriate permissions for the file.Microseism
This is not about the file or its name.Everytime the temp file name changes when I run the applicationBrigidbrigida
It seems the same problem as #1718074Cairistiona
B
10

I solved it.You have to provide the write access to temporary folder . I was providing this access to different user.The correct user id is the one that is mentioned in application pool of your web service.

Brigidbrigida answered 23/6, 2013 at 7:9 Comment(1)
This happened to us after upgrading to Windows 10 and using a WinForms app; Before with Windows 7, was working fine. Enabling full control to the user did solve the problem.Thilde
G
1

I think your project storing in Windows's temporal folder and 'mchgnxs3.0.cs' file can be deleted. Otherwise you should try to rename your script file (maybe 'mchgnxs3.0.cs' to 'mchgnxs3_0.cs').

Gump answered 15/6, 2013 at 14:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.