Hi all,
I have made an ASP.NET 1.1 application on windows 2000 advanced server.
In the application, i have saved the file using the following code
string str;
str="this is my data";
FileStream fs=new FileStream("mytxt.txt",FileMode.open);
StreamWriter sr=new StreamWriter (fs);
sr.Write(str);
Now i can write the file and even read it on my system. It saves the
file in my C:\WINNT\System32. Now my C Drive is FAT32. Please note that
name of my application is "MyWebProject".
Now i copy my project folder i.e. "MyWebProject" from wwwrooot and take
to other system and saves the file in other system that is running Win
XP which has IIS installed. I have made a virtual directory that maps
to the file i just copied from Win 2000. Please also note that C Drive
of Win XP is NTFS.
Now when i try to run my application on Win XP, it throws an error
which is as following
---------------------------------------------------------------------------*-----------------------------------------
Access to the path "C:\WINDOWS\system32\mytxt.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.
---------------------------------------------------------------------------*-----------------------------------------
Now please let me know what i am doing wrong here, if i have to set
some seucrity permissions within my XP machine then please let me know
how should i go about it?
OR if there is some other error then please let me know what it is....
I appreciate your time and thanks in advance.
-Erland 2 1112
Do you really want your web application to write to the system32 directory??
Is this an anonymous web site? If so, you'll need to give the IUSR_ account
(or ASPNET) account WRITE access to the system32 directory!
Jeff
"Erland" <Er************@gmail.com> wrote in message
news:11**********************@z34g2000cwc.googlegr oups.com...
Hi all,
I have made an ASP.NET 1.1 application on windows 2000 advanced server.
In the application, i have saved the file using the following code
string str;
str="this is my data";
FileStream fs=new FileStream("mytxt.txt",FileMode.open);
StreamWriter sr=new StreamWriter (fs);
sr.Write(str);
Now i can write the file and even read it on my system. It saves the
file in my C:\WINNT\System32. Now my C Drive is FAT32. Please note that
name of my application is "MyWebProject".
Now i copy my project folder i.e. "MyWebProject" from wwwrooot and take
to other system and saves the file in other system that is running Win
XP which has IIS installed. I have made a virtual directory that maps
to the file i just copied from Win 2000. Please also note that C Drive
of Win XP is NTFS.
Now when i try to run my application on Win XP, it throws an error
which is as following
---------------------------------------------------------------------------*-----------------------------------------
Access to the path "C:\WINDOWS\system32\mytxt.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.
---------------------------------------------------------------------------*-----------------------------------------
Now please let me know what i am doing wrong here, if i have to set
some seucrity permissions within my XP machine then please let me know
how should i go about it?
OR if there is some other error then please let me know what it is....
I appreciate your time and thanks in advance.
-Erland
Completely bad ju-ju in there, Boss. Don't do it. No. What problem are you
trying to solve by doing this?
"Erland" wrote: Hi all,
I have made an ASP.NET 1.1 application on windows 2000 advanced server.
In the application, i have saved the file using the following code
string str; str="this is my data"; FileStream fs=new FileStream("mytxt.txt",FileMode.open); StreamWriter sr=new StreamWriter (fs); sr.Write(str);
Now i can write the file and even read it on my system. It saves the file in my C:\WINNT\System32. Now my C Drive is FAT32. Please note that
name of my application is "MyWebProject".
Now i copy my project folder i.e. "MyWebProject" from wwwrooot and take
to other system and saves the file in other system that is running Win XP which has IIS installed. I have made a virtual directory that maps to the file i just copied from Win 2000. Please also note that C Drive of Win XP is NTFS. Now when i try to run my application on Win XP, it throws an error which is as following ---------------------------------------------------------------------------Â*-----------------------------------------
Access to the path "C:\WINDOWS\system32\mytxt.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. ---------------------------------------------------------------------------Â*----------------------------------------- Now please let me know what i am doing wrong here, if i have to set some seucrity permissions within my XP machine then please let me know how should i go about it? OR if there is some other error then please let me know what it is.... I appreciate your time and thanks in advance.
-Erland
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: deko |
last post by:
Do I need to use flock() when reading a file into an array? It's possible that
the file in question could be open at the time the file('filename') request is
made. I realize flock() is required...
|
by: Anna |
last post by:
Hi all,
I posted the same question this afternoon but my message isn't showing up, so I thought I'd give it another try....
in case you should see it later I apologize for posting the same...
|
by: stuart dent via .NET 247 |
last post by:
XML validation error. Help required
If anyone can help me, thankyou, thankyou...
When I run this code code I get this error:
The data at the root level is invalid. Line 1, position 39.
I...
|
by: Alex Clark |
last post by:
Hi All,
I'm having some problems reading a network stream. I'm writing a
lightweight POP client to handle a very specific task, but I keep
unexpectedly reaching the end of the datastream when...
|
by: saleemahmad70 |
last post by:
Hi..
I am stuck with a problem where I need to extract some information from
a File in C++.e.g File size,date of creation, Location on the Disk etc.
I haven't been able to find any particular...
|
by: katz911 |
last post by:
Hello,
I've encountered a strange problem which I can't seem to explain.
I've written a simple C++ class that deals with a certian binary file.
In one of the methods there, I wish to update a...
|
by: miss time |
last post by:
Hi all,
my java friends ^-^
I have next week quiz in reading file text ,and understand the topic very well.
can any one give some question related to this topic .this help me more to...
|
by: Coldfire |
last post by:
Hi,
The strange problem i am having is,
the input element of type='file' not reading file names after 20 file elements. It simple returns null on reading the 'name' of file.
The code is...
|
by: bjoarn |
last post by:
I have an Application C# handling file reading, building index on this file, using dll wrapped with SWIG. The dll is originaly programmed in C++.
Dll reports back to the the C# programm throug...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| | |