HighTechTalks DotNet Forums  

Web application - writeing to disk

Dotnet General Discussions microsoft.public.dotnet.general


Discuss Web application - writeing to disk in the Dotnet General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
budhA
 
Posts: n/a

Default Web application - writeing to disk - 08-02-2005 , 11:35 AM






Hi!

What do I need to do if I want to write (with a stream) to file that is in a
root dir of Web application or any other file on the disk.

Thnx



Reply With Quote
  #2  
Old   
Cor Ligthert [MVP]
 
Posts: n/a

Default Re: Web application - writeing to disk - 08-02-2005 , 11:48 AM






Budha,

Quote:
What do I need to do if I want to write (with a stream) to file that is in
a root dir of Web application or any other file on the disk.


You mean on the same computer?

Cor




Reply With Quote
  #3  
Old   
budhA
 
Posts: n/a

Default Re: Web application - writeing to disk - 08-02-2005 , 11:54 AM



Quote:
You mean on the same computer?
Yes, on the same computer.




Reply With Quote
  #4  
Old   
Patrice
 
Posts: n/a

Default Re: Web application - writeing to disk - 08-02-2005 , 12:56 PM



Try :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconWritingTextToFile.asp

Or if you tried something what is the problem ?

---
Patrice


"budhA" <Ivan.BudiscakMAKNI_OVO (AT) gmail (DOT) com> a écrit dans le message de
news:dco7bs$qlr$1 (AT) ss405 (DOT) t-com.hr...
Quote:
Hi!

What do I need to do if I want to write (with a stream) to file that is in
a
root dir of Web application or any other file on the disk.

Thnx





Reply With Quote
  #5  
Old   
budhA
 
Posts: n/a

Default Re: Web application - writeing to disk - 08-02-2005 , 01:07 PM




"Patrice" <nobody (AT) nowhere (DOT) com> wrote

Quote:
Try :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconWritingTextToFile.asp

Or if you tried something what is the problem ?
The problem is that when I open a stream to the file I can only read it and
not write to it (CanWrite prperty is set to false). I think that the problem
is with the premissions of the virtual dir where web app is, but I don't
know how to set those premissions in IIS (not exactly).
If I open a stream to the file with win app or something else that is not a
Web site (VS 2005 beta2) I can read and write but with web app I can't. Why?




Reply With Quote
  #6  
Old   
Patrice
 
Posts: n/a

Default Re: Web application - writeing to disk - 08-03-2005 , 03:29 AM



Please always show us the whole picture. It's far easier to react to a
particular problem rather than to let us list all unrelated failures that
could arise...

The web app runs under the ASPNET account. You could :
- put the file in a directory made for this purpose
- set the NTFS file permission so that ASPNET (or the account you are using)
is allowed to write the content
- if under the web root, you may want to disable IIS access (clear the
"Read" checkbox in IIS for this directory security)

--

Patrice

"budhA" <Ivan.BudiscakMAKNI_OVO (AT) gmail (DOT) com> a écrit dans le message de
news:dcocpe$4kk$1 (AT) ss405 (DOT) t-com.hr...
Quote:
"Patrice" <nobody (AT) nowhere (DOT) com> wrote in message
news:ebbuTu4lFHA.3144 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
Try :

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconWritingTextToFile.asp

Or if you tried something what is the problem ?

The problem is that when I open a stream to the file I can only read it
and
not write to it (CanWrite prperty is set to false). I think that the
problem
is with the premissions of the virtual dir where web app is, but I don't
know how to set those premissions in IIS (not exactly).
If I open a stream to the file with win app or something else that is not
a
Web site (VS 2005 beta2) I can read and write but with web app I can't.
Why?





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.