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

Posted: February 6, 2008 in ASP.NET
Tags:

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

Comments
  1. Anonymous says:

    Gracias. Me sirvió mucho!

  2. Anonymous says:

    Thanks it worked!

  3. Guru says:

    Thanks this is helpful.

  4. Anonymous says:

    Add Network Services user to your Temp directory with write acces.

  5. Anonymous says:

    very very helpful…. Thanks a ton

  6. Mike C says:

    Much thanks

  7. Hemal says:

    Thanks.

  8. Anonymous says:

    Thanks a lot …. you saved my time.

  9. Anonymous says:

    Thank you so much. Saved so much time. Very grateful.

  10. buttar says:

    Thanks man, Saved me from googling around

  11. Anonymous says:

    This was awesome!! it solved a problem that took out our production app.

    Thanks!!

  12. Jitesh Rana says:

    It’s very helpful.
    It solves my problem.

    Cheers !

  13. Pilo says:

    Cheers !
    It worked perfectly.

  14. Ryan says:

    Very helpful. It solves my problem. thanks a lot

  15. song says:

    yeah,pretty good,it confused me a lot .Thank you very much!

  16. Saumi says:

    Thanks Its very helpful

  17. [...] Comments 2010 in review … on Unable to generate a temporary…2010 in review … on Using Hyperlink in WPF ap…2010 in review … on Creating [...]

  18. [...] Unable to generate a temporary class (result=1). error CS2001: Source file ‘C:WINDOWSTEMPfi… February 2008 30 comments 4 [...]

  19. Bonginkosi says:

    Thanks a million Dude

  20. Anton says:

    thanks, this is very helpful!!!

  21. claudio says:

    you ara a genius!!!! thanks!!!!

  22. Hansin Vogado says:

    Does This DLL work inside a MTS environment when I call it form an ASP page ?

  23. 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

  24. needHelp says:

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

  25. Ricardo says:

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

  26. Smitha says:

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

  27. Akshat says:

    still if u cant run give right to NETWORK SERVICES

  28. Anonymous says:

    Thank you.

  29. Piyush says:

    Good One….

  30. Anonymous says:

    Thanks, it save me times.

  31. lizy says:

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

    Lizy

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

  33. kk says:

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

  34. Juan Marcelo says:

    THANKS VERY MUCH !

  35. Peter Rees says:

    Nice writing

  36. Chris Hart says:

    Very good

  37. Bill Wolfe says:

    You saved me. Thanks much.

  38. Ron says:

    Exactly what i needed, thanks!

  39. tamim says:

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

  40. madhu says:

    very helpful ,thanks a lot

  41. Tharanath says:

    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…

  42. Pinky says:

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

    cheers, Pinky!

  43. Anonymous says:

    Muchas gracias…it´s OK :)

  44. Anonymous says:

    Very very helpful indeed. Thanks.

  45. ganesh says:

    need to install dotnet 2.0 framework

  46. manish says:

    thanks
    its very helpful

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s