1
Answer

Now able to build Visual Studio 2005 Web Site because access denied error

Photo of Sreenath G

Sreenath G

13y
2k
1
 

Hi,

I am gettin an error like "Access to the path 'C:\Documents and Settings\username\Local Settings\Temp\~6d4\bin\App_WebReferences.compiled' is denied." when I  Build my web site.

Any help.

Thanks

Sreenath

Answers (1)

2
Photo of Manav Pandya
NA 7.1k 24.1k 7y
Hello
 
You should do like this :
 
  1. class Program  
  2.     {  
  3.         readonly bool flag ;  
  4.         Program()  
  5.         {  
  6.             flag = true;  
  7.         }  
  8.           
  9.         static void Main(string[] args)  
  10.         {  
  11.             Program p = new Program();  
  12.             Console.WriteLine(p.flag);  
  13.             Console.ReadKey();  
  14.         }  
  15.     }  
Explaination :
 
There is two possibility to define value to readonly property :
 
1 . You can directly define when declaration like :
 
  1. readonly bool flag =false ;  
2 . Define value with constructor  :
 
  1. Program()  
  2.         {  
  3.             flag = true;  
  4.         }  
I hope it helps 
 
Thanks
 
Accepted
1
Photo of Manav Pandya
NA 7.1k 24.1k 7y
Hello 
 
Always welcomed any doubts in future !!!
 
Thanks 
1
Photo of Dinesh Kudale
NA 7 151 7y
Thank you Manav Pandya !   You have cleared my doubt.