Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

ASP.NET - Problem s pisanjem u fajlove

[es] :: .NET :: ASP.NET :: ASP.NET - Problem s pisanjem u fajlove

[ Pregleda: 2884 | Odgovora: 5 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

NeznamTkoSam

Član broj: 39660
Poruke: 279
*.cmu.carnet.hr.



Profil

icon ASP.NET - Problem s pisanjem u fajlove29.12.2004. u 19:00 - pre 234 meseci
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?
 
Odgovor na temu

spartak

Član broj: 5625
Poruke: 631
*.ppp-bg.sezampro.yu.



+3 Profil

icon Re: ASP.NET - Problem s pisanjem u fajlove29.12.2004. u 19:56 - pre 234 meseci
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.
 
Odgovor na temu

NeznamTkoSam

Član broj: 39660
Poruke: 279
*.cmu.carnet.hr.



Profil

icon Re: ASP.NET - Problem s pisanjem u fajlove29.12.2004. u 22:10 - pre 234 meseci
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. -
 
Odgovor na temu

spartak

Član broj: 5625
Poruke: 631
*.dialup.sezampro.yu.



+3 Profil

icon Re: ASP.NET - Problem s pisanjem u fajlove29.12.2004. u 23:58 - pre 234 meseci
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.
 
Odgovor na temu

NeznamTkoSam

Član broj: 39660
Poruke: 279
*.cmu.carnet.hr.



Profil

icon Re: ASP.NET - Problem s pisanjem u fajlove30.12.2004. u 18:16 - pre 234 meseci
Hvala, radi.
Btw, molio bih te jos samo za jedan savjet:
da li za brojace posjeta koristim .txt fajlove ili baze podataka?
 
Odgovor na temu

spartak

Član broj: 5625
Poruke: 631
*.dialup.sezampro.yu.



+3 Profil

icon Re: ASP.NET - Problem s pisanjem u fajlove30.12.2004. u 22:05 - pre 234 meseci
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.
 
Odgovor na temu

[es] :: .NET :: ASP.NET :: ASP.NET - Problem s pisanjem u fajlove

[ Pregleda: 2884 | Odgovora: 5 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.