Re: Frustrated setting up write permission to a folder
- From: gnewsgroup <gnewsgroup@xxxxxxxxx>
- Date: Tue, 26 Feb 2008 11:04:37 -0800 (PST)
On Feb 26, 1:31 pm, "sloan" <sl...@xxxxxxxxx> wrote:
I don't see any issues from your description.
Is this DEV or Production??
In a DEV environment, you may have to grant permissions to this directory
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\MyWebSite\ChartImages\
(alter for your version of dotnet, and your app name of course)
-----------------
One thing I do...when encountering something like this....
is "make sure you know who YOU are".
private string FindIIdentity()
{
try
{
//'Dim user As WindowsPrincipal =
CType(System.Threading.Thread.CurrentPrincipal, WindowsPrincipal)
//'Dim ident As IIdentity = user.Identity
string returnValue = string.Empty;
WindowsIdentity ident = WindowsIdentity.GetCurrent();
returnValue = ident.Name;
try
{
returnValue += " on " + System.Environment.MachineName;
}
catch (Exception ex)
{
}
return returnValue;
}
catch (Exception ex)
{
return "Error Finding Identity";
}
}
That's some crappy code..but it might point to something you don't see.
..
Make sure when deploying...you don't accidently unzip (or whatever your
deploy strategy is)..overwrite the folder.
It could reset the permissions and screw you.
Thank you for the code. I didn't know how to programmatically find
out the machine account which runs the web application. I stole your
code and found it out. The answer is
my_machine_name\ASPNET on my_machine_name
This also answers Mark's question. So, it is indeed running under the
ASPNET account.
I do see some change while I keep playing with it.
The png images are saved successfully into that folder, but the
browser does not show me that image, but instead a red X.
Now, you may be wondering about the path to the png images. So, it's
helpful to clarify. I am using Dundas charting library. We specify
the URL to the chart images like so:
chart.ImageUrl = "~/ChartImages/ChartPic_#SEQ(300,3)";
And that's exactly what I did.
BTW, the Temporary ASP.NET Files folder does not have the folder
hierarchy I have in my development folder. It only has some folders
with arbitrary names like 2998aebf, de838ef. So, this Temporary
ASP.NET Files folder is probably irrelevant.
.
- Follow-Ups:
- Re: Frustrated setting up write permission to a folder
- From: gnewsgroup
- Re: Frustrated setting up write permission to a folder
- References:
- Frustrated setting up write permission to a folder
- From: gnewsgroup
- Re: Frustrated setting up write permission to a folder
- From: sloan
- Frustrated setting up write permission to a folder
- Prev by Date: vs2005 reformating my html - Why
- Next by Date: How to bind a class property to a textbox
- Previous by thread: Re: Frustrated setting up write permission to a folder
- Next by thread: Re: Frustrated setting up write permission to a folder
- Index(es):
Relevant Pages
|