Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 29, 2013 06:00 AM by cnranasinghe
Jan 27, 2013 10:29 PM|LINK
An ASPX.CS file cannot create and write to a text file on the same server.
The environment is a hosted server where the directories, for the time being, have read, write, and delete privileges. The ASPX.CS code only needs to create
a text file and write a line to it; periodically, the code also needs to append the file with a line. Attempts in using the StreamWriter and FileIOPermission classes have been used to perform this job, but the server responds with error messages of type 400
and 500. It seems that there is some security privilege acting as a barrier.
Example code, or advice, is needed to implement this very elementary,
but tricky process.
Jan 28, 2013 03:58 AM|LINK
check following article
folder you are saving the text file to folder require to grant read/write permission.
Jan 28, 2013 05:28 PM|LINK
Thank you for your response, but unless you are trying to have me perform a test, or you just didn't read the background information on this matter, you should have known this was not going to work. None the less, I ran the code for you and received a "500
- Internal Server Error."
Sincerely, Mr. Foxcroft
Jan 28, 2013 08:00 PM|LINK
Add following code in web.config
<identity impersonate="true" />
Jan 28, 2013 08:42 PM|LINK
That had no effect. But after removing the tag, matters became worse. Now the server refuses to send the directory structure where the test files are located.
Jan 29, 2013 01:39 AM|LINK
Check this thread any hint is available
Jan 29, 2013 04:26 AM|LINK
I have already fiddled around with the Trust configuration without any success.
I think you are trying to help, and I appreciate that, but you are actually just sending me on a wild goose chase. Please don't send me to read other people's problems to determine if my problem is identical to theirs.
My expectation is that someone in this forum has a deep enough background knowledge of such problems, and that they
have the ability to provide real and systematic steps to "diagnose" this problem. It seems that nobody really knows how to perform basic diagnostic work. You know, like how a mechanic diagnoses electrical problems
in a car. That's the help I need.
Mean while, I'll continue to diagnose it on my own.
Jan 29, 2013 06:00 AM|LINK
I understand that, you are looking for a silver bullet here, but it is worth mentioning that information you have posted here will not be any mean to a forum surfer or a professinal to guide you or to help. There are many professionals from different countries
using this forum and willing to provide some assitance as far as they can. What i suggest you is to get a quick free support be specific with problem else bullet goes without a target. Good luck with your own process.