Re: Frustrated setting up write permission to a folder



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.
.



Relevant Pages

  • Re: Frustrated setting up write permission to a folder
    ... public static string FindPhysicalRootDirectory ... out the machine account which runs the web application. ... The png images are saved successfully into that folder, ... you may be wondering about the path to the png images. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Frustrated setting up write permission to a folder
    ... out the machine account which runs the web application. ... The png images are saved successfully into that folder, ... you may be wondering about the path to the png images. ... The ASPNET account needs to have modify permission (which includes ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Frustrated setting up write permission to a folder
    ... out the machine account which runs the web application. ... The png images are saved successfully into that folder, ... you may be wondering about the path to the png images. ... The ASPNET account needs to have modify permission (which includes ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Frustrated setting up write permission to a folder
    ... In a DEV environment, you may have to grant permissions to this directory ... It could reset the permissions and screw you. ... would like to save the charts png images in a particular folder. ... you should see a Security tab. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Access is Denied - WinXP Home Edition
    ... >user accounts. ... >subfolders and files from the old accounts. ... >ownership and grant permissions to one folder at a time. ...
    (microsoft.public.windowsxp.security_admin)