Re: Frustrated setting up write permission to a folder



On Feb 26, 2:04 pm, gnewsgroup <gnewsgr...@xxxxxxxxx> wrote:
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.

To sum up after I found out.

The ASPNET account needs to have modify permission (which includes
read and write, I think) to that folder.
And, the Internet Guest Account (i.e., the IUSR_MY_MACHINE_NAME) must
have read, read & execute permission.

Neither of these 2 accounts need to inherit the permission settings of
its parent.

This seems to be working fine now. Thanks again for hinting.
.



Relevant Pages

  • 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: dts and access db
    ... How can I setup permission for sa account under \\server\data folder? ... The service account for SQL Server ... >>already opened exclusively by another user, or you need permission to view ...
    (microsoft.public.sqlserver.dts)
  • RE: IIS anonymous access
    ... Since your asp page only needs to read the file from the unix folder, I'd suggest you can only grant the read permission to this domain account on ...
    (microsoft.public.inetserver.iis.security)
  • RE: User name password dialogue box
    ... If you site doesn't grant the permission to one account and disable the ... Right-click the 1033 folder to open the folder property dialog. ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: IIS 6 & UNC Share Scurity Issue
    ... server admin tool that the permission was applied to the share locally ... The access is being denied is for the account rcareyad, ... have full NTFS right on the folder. ... cluster is 64 bit and all are VM's inside VMware ESX 3.5. ...
    (microsoft.public.inetserver.iis.security)

Loading