[ NeznamTkoSam @ 29.12.2004. 19:00 ] @
Server Error in '/CSharpASP' Application.
--------------------------------------------------------------------------------

Access to the path "c:\inetpub\wwwroot\CSharpASP\brojac.txt" is denied.
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.UnauthorizedAccessException: Access to the path "c:\inetpub\wwwroot\CSharpASP\brojac.txt" is denied.

The ASP.NET process is not authorized to access the requested resource. For security reasons the default ASP.NET process identity is '{machinename}\ASPNET', which has limited privileges. Consider granting access rights to the resource to the ASP.NET process identity.

To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the "{machinename}\ASPNET" user. Highlight the ASP.NET account, and check the Write box in the Allow column.


Sto ne valja u IIS?
[ spartak @ 29.12.2004. 19:56 ] @
Citat:
To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the "{machinename}\ASPNET" user. Highlight the ASP.NET account, and check the Write box in the Allow column.


Da li si uradio ovo?

Ako ASPNET nalog nema prava pristupa tom fajlu, ne moze ni da pishe/brishe po njemu.
[ NeznamTkoSam @ 29.12.2004. 22:10 ] @
Evo sto sve treba napraviti da se to sredi:

1. Kliknuti desnom tipkom misa u Exploreru
2. Odabrati "Properties"
3. Oznaciti Security tab
4. Kliknuti "Add" za dodati "{machinename}\ASPNET" korisnika
5. Oznaciti ASP.NET racun
6. Odabrati Write polje u Allow stupcu

Ja idem to rijesiti:
1. Desnom tipkom misa kliknem na fajl ("brojac.txt")
2. Odaberem "Properties"
3. U Propertiesu nema Security taba
4. -
5. -
6. -
[ spartak @ 29.12.2004. 23:58 ] @
U Windows Explorer uradis sledecu stvar:

1. Tools -> Folder Options
2. Odaberi tab "View"
3. Skroluj do poslednje stavke i iskljuci je (Use simple file sharing).
4. Klikni na Apply, Ok ili sta vec beshe tamo ima za potvrdu.

E sada bi trebalo da vidis Security tab kada uradis right click pa properties.
[ NeznamTkoSam @ 30.12.2004. 18:16 ] @
Hvala, radi.
Btw, molio bih te jos samo za jedan savjet:
da li za brojace posjeta koristim .txt fajlove ili baze podataka?
[ spartak @ 30.12.2004. 22:05 ] @
Ako imas bazu na raspolaganju i vec radis nesto sa njom, iskoristi je. Ako ne, mozes i text file.

Nekako mi je samo za brojac previse koristiti bazu, kao da pucas topom na dzivdzana. Ali kao sto rekoh, ako je aktivna, koristi bazu.