Posted by: Nishant Rana | February 6, 2008

Unable to generate a temporary class (result=1). error CS2001: Source file ‘C:\WINDOWS\TEMP\filename.cs’ could not be found error CS2008: No inputs specified

Hi,

I was getting this error when I was trying to call a .NET dll from an ASP page.

The dll was making use of a web service.

And while searching for it I found that if we are making use of a web service from

an asp page, the page tries to create a temporary file in windows\temp directory and because it hasn’t got rights for the same we get the error.

 

We can resolve it by giving it the appropriate rights for the windows/temp folder

 

1) Right click the temp folder à Select properties

2) Go to security tab

3) Click on Add and add ASPNET account. ( In locations select your machine )

4) Then add one more account IWAM_D-0824 (i.e. IWAM_YourMachineName)

5) Try running the ASP page again. The page should run without any error.

Bye


Responses

  1. thanks
    its very helpful

  2. need to install dotnet 2.0 framework

  3. Very very helpful indeed. Thanks.

  4. Muchas gracias…it´s OK :)

  5. Somehow i missed the point. Probably lost in translation :) Anyway … nice blog to visit.

    cheers, Pinky!

  6. If your the web site is running in some other service account. you have to add that account also in the security tab…

    Happy coding…

  7. very helpful ,thanks a lot

  8. kool!! very handy… saved me a lot of time! cheerz for that…

  9. Exactly what i needed, thanks!

  10. You saved me. Thanks much.

  11. Very good

  12. Nice writing

  13. THANKS VERY MUCH !

  14. thanks a lot ….. i saved me a lot of time … thanks have a wonderful day

  15. Pingback http://haditeo.wordpress.com/2009/04/30/unable-to-generate-a-temporary-class-result1-error-cs2001-source-file-%e2%80%98cwindowstempfilenamecs%e2%80%99-could-not-be-found-error-cs2008-no-inputs-specified/

  16. [...] DirectorySecurity Tip: Conficker creating Windows TEMP files – Use Clean Up utility …Unable to generate a temporary class (result=1). error CS2001: Source file … Comments [...]

  17. Hi its really very useful. Thanks for the thought of posting this

    Lizy

  18. Thanks, it save me times.

  19. Good One….

  20. Thank you.

  21. still if u cant run give right to NETWORK SERVICES

  22. Hey!!! Thank you!! it worked for me…

  23. you might also be able to solve it when you
    Run C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i

  24. I am not sure how to add the ASPNET and IWAM accounts in the security tab.
    Please help.

    • hi check this

      http://www.opcg.com/index.php/2007/06/27/error_in_asp_net_failed_to_execute_the_r_1?blog=2

      there you could see a screeen shot .

  25. Awesome, this worked for me. Had Network Service with write permissions, but that wasn’t doing it. But got it working.

    The perms on this folder were all screwed up, not sure how it happened in the first place with is scary.

    James – DotNetNuke Expert


Leave a response

Your response:

Categories