473,287 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Creating a file that can be seen in the browser

Hi;

My ASP.NET app (C# calling J# under .net 2.0) creates a png file in a
subdirectory to display as part of the created page. However, the bitmap will
not display due to a security violation.

Everything is the default settings I believe. IIS is running under Local
System. In IIS the DefaultAppPool is running under Network Service.
Annonymous access uses the account IUSR_JASMINE (machine name is Jasmine).

The application is an ASP.NET application. You can go to
http://www.windwardreports.com/RunRe...eportForm.aspx, select the html
output, and run it to see the problem.

The images directory where the file is created has granted to IUSR_JASMINE
Read & Execute, List Folder Contents, and Read permissions. Under Advanced it
has checked "Allow inheritable permissions..."

I also had to give IIS_WPG write permissions in images to create the file.
The creation occurs fine. However the created files only have permissions for
Administrators, Network Service, Power Users, and System.

The file is created with and written to using new
FileOutputStream("c:\Intepub\wwwroot\windwardrepor ts\images\wr_tempname.png")

Is this a J# issue, or an IIS issue, or an ASP.NET issue? (Or is it me?)
Somehow the created file is not getting the permissions of the directory it
is being created in.

??? - thanks - dave

Dec 20 '05 #1
15 2747
Try giving ASPNET write permission on the directory you want your output
file created in.
"David Thielen" <th*****@nospam.nospam> wrote in message
news:FF**********************************@microsof t.com...
Hi;

My ASP.NET app (C# calling J# under .net 2.0) creates a png file in a
subdirectory to display as part of the created page. However, the bitmap
will
not display due to a security violation.

Everything is the default settings I believe. IIS is running under Local
System. In IIS the DefaultAppPool is running under Network Service.
Annonymous access uses the account IUSR_JASMINE (machine name is Jasmine).

The application is an ASP.NET application. You can go to
http://www.windwardreports.com/RunRe...eportForm.aspx, select the
html
output, and run it to see the problem.

The images directory where the file is created has granted to IUSR_JASMINE
Read & Execute, List Folder Contents, and Read permissions. Under Advanced
it
has checked "Allow inheritable permissions..."

I also had to give IIS_WPG write permissions in images to create the file.
The creation occurs fine. However the created files only have permissions
for
Administrators, Network Service, Power Users, and System.

The file is created with and written to using new
FileOutputStream("c:\Intepub\wwwroot\windwardrepor ts\images\wr_tempname.png")

Is this a J# issue, or an IIS issue, or an ASP.NET issue? (Or is it me?)
Somehow the created file is not getting the permissions of the directory
it
is being created in.

??? - thanks - dave

Dec 20 '05 #2
Give ASPNET write permission in the appropriate directory. This is the
built-in account for ASP.NET, not IUSR_JASMINE as you had assumed.
"David Thielen" <th*****@nospam.nospam> wrote in message
news:FF**********************************@microsof t.com...
Hi;

My ASP.NET app (C# calling J# under .net 2.0) creates a png file in a
subdirectory to display as part of the created page. However, the bitmap
will
not display due to a security violation.

Everything is the default settings I believe. IIS is running under Local
System. In IIS the DefaultAppPool is running under Network Service.
Annonymous access uses the account IUSR_JASMINE (machine name is Jasmine).

The application is an ASP.NET application. You can go to
http://www.windwardreports.com/RunRe...eportForm.aspx, select the
html
output, and run it to see the problem.

The images directory where the file is created has granted to IUSR_JASMINE
Read & Execute, List Folder Contents, and Read permissions. Under Advanced
it
has checked "Allow inheritable permissions..."

I also had to give IIS_WPG write permissions in images to create the file.
The creation occurs fine. However the created files only have permissions
for
Administrators, Network Service, Power Users, and System.

The file is created with and written to using new
FileOutputStream("c:\Intepub\wwwroot\windwardrepor ts\images\wr_tempname.png")

Is this a J# issue, or an IIS issue, or an ASP.NET issue? (Or is it me?)
Somehow the created file is not getting the permissions of the directory
it
is being created in.

??? - thanks - dave

Dec 20 '05 #3
Is it just a created file having problems or what happens if you place a
static file there? Can you access static files at that location?

Folders under the virtual root, should have the correct access as the rights
are usually inherited, therefore, see what happens if you remove and
re-create the "images" folder.

"David Thielen" <th*****@nospam.nospam> wrote in message
news:FF**********************************@microsof t.com...
Hi;

My ASP.NET app (C# calling J# under .net 2.0) creates a png file in a
subdirectory to display as part of the created page. However, the bitmap
will
not display due to a security violation.

Everything is the default settings I believe. IIS is running under Local
System. In IIS the DefaultAppPool is running under Network Service.
Annonymous access uses the account IUSR_JASMINE (machine name is Jasmine).

The application is an ASP.NET application. You can go to
http://www.windwardreports.com/RunRe...eportForm.aspx, select the
html
output, and run it to see the problem.

The images directory where the file is created has granted to IUSR_JASMINE
Read & Execute, List Folder Contents, and Read permissions. Under Advanced
it
has checked "Allow inheritable permissions..."

I also had to give IIS_WPG write permissions in images to create the file.
The creation occurs fine. However the created files only have permissions
for
Administrators, Network Service, Power Users, and System.

The file is created with and written to using new
FileOutputStream("c:\Intepub\wwwroot\windwardrepor ts\images\wr_tempname.png")

Is this a J# issue, or an IIS issue, or an ASP.NET issue? (Or is it me?)
Somehow the created file is not getting the permissions of the directory
it
is being created in.

??? - thanks - dave

Dec 20 '05 #4
Hello;

I earlier gave IIS_WPG write permissions and that was sufficient to create
the file (it's reading it that is the problem.

I just tried as you suggested and also gave ASPNET write permission, but no
help. Still created with the same 4 permissions and the end user cannot view
the png file.

--
thanks - dave
"Phillip N Rounds" wrote:
Give ASPNET write permission in the appropriate directory. This is the
built-in account for ASP.NET, not IUSR_JASMINE as you had assumed.
"David Thielen" <th*****@nospam.nospam> wrote in message
news:FF**********************************@microsof t.com...
Hi;

My ASP.NET app (C# calling J# under .net 2.0) creates a png file in a
subdirectory to display as part of the created page. However, the bitmap
will
not display due to a security violation.

Everything is the default settings I believe. IIS is running under Local
System. In IIS the DefaultAppPool is running under Network Service.
Annonymous access uses the account IUSR_JASMINE (machine name is Jasmine).

The application is an ASP.NET application. You can go to
http://www.windwardreports.com/RunRe...eportForm.aspx, select the
html
output, and run it to see the problem.

The images directory where the file is created has granted to IUSR_JASMINE
Read & Execute, List Folder Contents, and Read permissions. Under Advanced
it
has checked "Allow inheritable permissions..."

I also had to give IIS_WPG write permissions in images to create the file.
The creation occurs fine. However the created files only have permissions
for
Administrators, Network Service, Power Users, and System.

The file is created with and written to using new
FileOutputStream("c:\Intepub\wwwroot\windwardrepor ts\images\wr_tempname.png")

Is this a J# issue, or an IIS issue, or an ASP.NET issue? (Or is it me?)
Somehow the created file is not getting the permissions of the directory
it
is being created in.

??? - thanks - dave


Dec 20 '05 #5
Hi;

I copied a file there and I created a file in the directory and both
included read permissions for IUSR_JASMINE. So it is something in how the
file is created in J# I think...

--
thanks - dave
"Peter Rilling" wrote:
Is it just a created file having problems or what happens if you place a
static file there? Can you access static files at that location?

Folders under the virtual root, should have the correct access as the rights
are usually inherited, therefore, see what happens if you remove and
re-create the "images" folder.

"David Thielen" <th*****@nospam.nospam> wrote in message
news:FF**********************************@microsof t.com...
Hi;

My ASP.NET app (C# calling J# under .net 2.0) creates a png file in a
subdirectory to display as part of the created page. However, the bitmap
will
not display due to a security violation.

Everything is the default settings I believe. IIS is running under Local
System. In IIS the DefaultAppPool is running under Network Service.
Annonymous access uses the account IUSR_JASMINE (machine name is Jasmine).

The application is an ASP.NET application. You can go to
http://www.windwardreports.com/RunRe...eportForm.aspx, select the
html
output, and run it to see the problem.

The images directory where the file is created has granted to IUSR_JASMINE
Read & Execute, List Folder Contents, and Read permissions. Under Advanced
it
has checked "Allow inheritable permissions..."

I also had to give IIS_WPG write permissions in images to create the file.
The creation occurs fine. However the created files only have permissions
for
Administrators, Network Service, Power Users, and System.

The file is created with and written to using new
FileOutputStream("c:\Intepub\wwwroot\windwardrepor ts\images\wr_tempname.png")

Is this a J# issue, or an IIS issue, or an ASP.NET issue? (Or is it me?)
Somehow the created file is not getting the permissions of the directory
it
is being created in.

??? - thanks - dave


Dec 20 '05 #6
Hi Dave,

I've just tried the link you provided, when I submit to generate a html/css
report, the page will popup authenticate dialog to ask me
username/password.... I think this should be the problem. Is that
"images" sub folder being protected by certain authentication in IIS(Allow
anonymous) or what's the IIS's virtual dirctory access permission setting
(not NTFS permission setting), you can check this in the IIS manager's home
directory tab( for that "images" sub virtualdir....)...
Also, please check the IIS log to see the error entry about the accessing
to the image file ( the error status code....)

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: Creating a file that can be seen in the browser
| thread-index: AcYFrctS5I1SEXpLSguepNq8Il5g4A==
| X-WBNR-Posting-Host: 199.45.247.98
| From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <th*****@nospam.nospam>
| References: <FF**********************************@microsoft.co m>
<eY**************@TK2MSFTNGP12.phx.gbl>
| Subject: Re: Creating a file that can be seen in the browser
| Date: Tue, 20 Dec 2005 13:39:02 -0800
| Lines: 60
| Message-ID: <CB**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:366112
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hello;
|
| I earlier gave IIS_WPG write permissions and that was sufficient to
create
| the file (it's reading it that is the problem.
|
| I just tried as you suggested and also gave ASPNET write permission, but
no
| help. Still created with the same 4 permissions and the end user cannot
view
| the png file.
|
| --
| thanks - dave
|
|
| "Phillip N Rounds" wrote:
|
| > Give ASPNET write permission in the appropriate directory. This is the
| > built-in account for ASP.NET, not IUSR_JASMINE as you had assumed.
| >
| >
| > "David Thielen" <th*****@nospam.nospam> wrote in message
| > news:FF**********************************@microsof t.com...
| > > Hi;
| > >
| > > My ASP.NET app (C# calling J# under .net 2.0) creates a png file in a
| > > subdirectory to display as part of the created page. However, the
bitmap
| > > will
| > > not display due to a security violation.
| > >
| > > Everything is the default settings I believe. IIS is running under
Local
| > > System. In IIS the DefaultAppPool is running under Network Service.
| > > Annonymous access uses the account IUSR_JASMINE (machine name is
Jasmine).
| > >
| > > The application is an ASP.NET application. You can go to
| > > http://www.windwardreports.com/RunRe...eportForm.aspx, select
the
| > > html
| > > output, and run it to see the problem.
| > >
| > > The images directory where the file is created has granted to
IUSR_JASMINE
| > > Read & Execute, List Folder Contents, and Read permissions. Under
Advanced
| > > it
| > > has checked "Allow inheritable permissions..."
| > >
| > > I also had to give IIS_WPG write permissions in images to create the
file.
| > > The creation occurs fine. However the created files only have
permissions
| > > for
| > > Administrators, Network Service, Power Users, and System.
| > >
| > > The file is created with and written to using new
| > >
FileOutputStream("c:\Intepub\wwwroot\windwardrepor ts\images\wr_tempname.png"
)
| > >
| > > Is this a J# issue, or an IIS issue, or an ASP.NET issue? (Or is it
me?)
| > > Somehow the created file is not getting the permissions of the
directory
| > > it
| > > is being created in.
| > >
| > > ??? - thanks - dave
| > >
| >
| >
| >
|

Dec 21 '05 #7
Hello;

I looked in the properties but did not see anything about what permissions
to set for files created in my ASP app. What should I look for.

The base problem is that when my ASP app creates a file, IUSR_JASMINE has no
rights to the file. IUSR_JASMINE does have rights to the images directory it
is placed in.

What should I try next?

--
thanks - dave
"Steven Cheng[MSFT]" wrote:
Hi Dave,

I've just tried the link you provided, when I submit to generate a html/css
report, the page will popup authenticate dialog to ask me
username/password.... I think this should be the problem. Is that
"images" sub folder being protected by certain authentication in IIS(Allow
anonymous) or what's the IIS's virtual dirctory access permission setting
(not NTFS permission setting), you can check this in the IIS manager's home
directory tab( for that "images" sub virtualdir....)...
Also, please check the IIS log to see the error entry about the accessing
to the image file ( the error status code....)

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: Creating a file that can be seen in the browser
| thread-index: AcYFrctS5I1SEXpLSguepNq8Il5g4A==
| X-WBNR-Posting-Host: 199.45.247.98
| From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <th*****@nospam.nospam>
| References: <FF**********************************@microsoft.co m>
<eY**************@TK2MSFTNGP12.phx.gbl>
| Subject: Re: Creating a file that can be seen in the browser
| Date: Tue, 20 Dec 2005 13:39:02 -0800
| Lines: 60
| Message-ID: <CB**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:366112
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hello;
|
| I earlier gave IIS_WPG write permissions and that was sufficient to
create
| the file (it's reading it that is the problem.
|
| I just tried as you suggested and also gave ASPNET write permission, but
no
| help. Still created with the same 4 permissions and the end user cannot
view
| the png file.
|
| --
| thanks - dave
|
|
| "Phillip N Rounds" wrote:
|
| > Give ASPNET write permission in the appropriate directory. This is the
| > built-in account for ASP.NET, not IUSR_JASMINE as you had assumed.
| >
| >
| > "David Thielen" <th*****@nospam.nospam> wrote in message
| > news:FF**********************************@microsof t.com...
| > > Hi;
| > >
| > > My ASP.NET app (C# calling J# under .net 2.0) creates a png file in a
| > > subdirectory to display as part of the created page. However, the
bitmap
| > > will
| > > not display due to a security violation.
| > >
| > > Everything is the default settings I believe. IIS is running under
Local
| > > System. In IIS the DefaultAppPool is running under Network Service.
| > > Annonymous access uses the account IUSR_JASMINE (machine name is
Jasmine).
| > >
| > > The application is an ASP.NET application. You can go to
| > > http://www.windwardreports.com/RunRe...eportForm.aspx, select
the
| > > html
| > > output, and run it to see the problem.
| > >
| > > The images directory where the file is created has granted to
IUSR_JASMINE
| > > Read & Execute, List Folder Contents, and Read permissions. Under
Advanced
| > > it
| > > has checked "Allow inheritable permissions..."
| > >
| > > I also had to give IIS_WPG write permissions in images to create the
file.
| > > The creation occurs fine. However the created files only have
permissions
| > > for
| > > Administrators, Network Service, Power Users, and System.
| > >
| > > The file is created with and written to using new
| > >
FileOutputStream("c:\Intepub\wwwroot\windwardrepor ts\images\wr_tempname.png"
)
| > >
| > > Is this a J# issue, or an IIS issue, or an ASP.NET issue? (Or is it
me?)
| > > Somehow the created file is not getting the permissions of the
directory
| > > it
| > > is being created in.
| > >
| > > ??? - thanks - dave
| > >
| >
| >
| >
|

Dec 22 '05 #8
Hi Dave,

Though the dynamic image file is created by the asp.net process account
(not IUSER_machine account), however, we can set the parent folder's NTFS
permissions to let everyone read that folder (need to check the permssion
inheritance....). Also, have you go to the images folder and lookup the
NTFS permission setting of those dynamic created files?

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| Thread-Topic: Creating a file that can be seen in the browser
| thread-index: AcYHE7PgY7pq8NyTSVOeelQTMB/Xnw==
| X-WBNR-Posting-Host: 199.45.247.98
| From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <th*****@nospam.nospam>
| References: <FF**********************************@microsoft.co m>
<eY**************@TK2MSFTNGP12.phx.gbl>
<CB**********************************@microsoft.co m>
<Fn**************@TK2MSFTNGXA02.phx.gbl>
| Subject: Re: Creating a file that can be seen in the browser
| Date: Thu, 22 Dec 2005 08:21:03 -0800
| Lines: 142
| Message-ID: <04**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:366591
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hello;
|
| I looked in the properties but did not see anything about what
permissions
| to set for files created in my ASP app. What should I look for.
|
| The base problem is that when my ASP app creates a file, IUSR_JASMINE has
no
| rights to the file. IUSR_JASMINE does have rights to the images directory
it
| is placed in.
|
| What should I try next?
|
| --
| thanks - dave
|
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi Dave,
| >
| > I've just tried the link you provided, when I submit to generate a
html/css
| > report, the page will popup authenticate dialog to ask me
| > username/password.... I think this should be the problem. Is that
| > "images" sub folder being protected by certain authentication in
IIS(Allow
| > anonymous) or what's the IIS's virtual dirctory access permission
setting
| > (not NTFS permission setting), you can check this in the IIS manager's
home
| > directory tab( for that "images" sub virtualdir....)...
| > Also, please check the IIS log to see the error entry about the
accessing
| > to the image file ( the error status code....)
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| > --------------------
| > | Thread-Topic: Creating a file that can be seen in the browser
| > | thread-index: AcYFrctS5I1SEXpLSguepNq8Il5g4A==
| > | X-WBNR-Posting-Host: 199.45.247.98
| > | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <th*****@nospam.nospam>
| > | References: <FF**********************************@microsoft.co m>
| > <eY**************@TK2MSFTNGP12.phx.gbl>
| > | Subject: Re: Creating a file that can be seen in the browser
| > | Date: Tue, 20 Dec 2005 13:39:02 -0800
| > | Lines: 60
| > | Message-ID: <CB**********************************@microsoft.co m>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:366112
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | Hello;
| > |
| > | I earlier gave IIS_WPG write permissions and that was sufficient to
| > create
| > | the file (it's reading it that is the problem.
| > |
| > | I just tried as you suggested and also gave ASPNET write permission,
but
| > no
| > | help. Still created with the same 4 permissions and the end user
cannot
| > view
| > | the png file.
| > |
| > | --
| > | thanks - dave
| > |
| > |
| > | "Phillip N Rounds" wrote:
| > |
| > | > Give ASPNET write permission in the appropriate directory. This is
the
| > | > built-in account for ASP.NET, not IUSR_JASMINE as you had assumed.
| > | >
| > | >
| > | > "David Thielen" <th*****@nospam.nospam> wrote in message
| > | > news:FF**********************************@microsof t.com...
| > | > > Hi;
| > | > >
| > | > > My ASP.NET app (C# calling J# under .net 2.0) creates a png file
in a
| > | > > subdirectory to display as part of the created page. However, the
| > bitmap
| > | > > will
| > | > > not display due to a security violation.
| > | > >
| > | > > Everything is the default settings I believe. IIS is running
under
| > Local
| > | > > System. In IIS the DefaultAppPool is running under Network
Service.
| > | > > Annonymous access uses the account IUSR_JASMINE (machine name is
| > Jasmine).
| > | > >
| > | > > The application is an ASP.NET application. You can go to
| > | > > http://www.windwardreports.com/RunRe...eportForm.aspx,
select
| > the
| > | > > html
| > | > > output, and run it to see the problem.
| > | > >
| > | > > The images directory where the file is created has granted to
| > IUSR_JASMINE
| > | > > Read & Execute, List Folder Contents, and Read permissions. Under
| > Advanced
| > | > > it
| > | > > has checked "Allow inheritable permissions..."
| > | > >
| > | > > I also had to give IIS_WPG write permissions in images to create
the
| > file.
| > | > > The creation occurs fine. However the created files only have
| > permissions
| > | > > for
| > | > > Administrators, Network Service, Power Users, and System.
| > | > >
| > | > > The file is created with and written to using new
| > | > >
| >
FileOutputStream("c:\Intepub\wwwroot\windwardrepor ts\images\wr_tempname.png"
| > )
| > | > >
| > | > > Is this a J# issue, or an IIS issue, or an ASP.NET issue? (Or is
it
| > me?)
| > | > > Somehow the created file is not getting the permissions of the
| > directory
| > | > > it
| > | > > is being created in.
| > | > >
| > | > > ??? - thanks - dave
| > | > >
| > | >
| > | >
| > | >
| > |
| >
| >
|

Dec 23 '05 #9
Yes on both. The images directory gives IUSR_JASMINE full read rights. The
created files do not even list IUSR_JASMINE in the security properties.

--
thanks - dave
"Steven Cheng[MSFT]" wrote:
Hi Dave,

Though the dynamic image file is created by the asp.net process account
(not IUSER_machine account), however, we can set the parent folder's NTFS
permissions to let everyone read that folder (need to check the permssion
inheritance....). Also, have you go to the images folder and lookup the
NTFS permission setting of those dynamic created files?

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| Thread-Topic: Creating a file that can be seen in the browser
| thread-index: AcYHE7PgY7pq8NyTSVOeelQTMB/Xnw==
| X-WBNR-Posting-Host: 199.45.247.98
| From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <th*****@nospam.nospam>
| References: <FF**********************************@microsoft.co m>
<eY**************@TK2MSFTNGP12.phx.gbl>
<CB**********************************@microsoft.co m>
<Fn**************@TK2MSFTNGXA02.phx.gbl>
| Subject: Re: Creating a file that can be seen in the browser
| Date: Thu, 22 Dec 2005 08:21:03 -0800
| Lines: 142
| Message-ID: <04**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:366591
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hello;
|
| I looked in the properties but did not see anything about what
permissions
| to set for files created in my ASP app. What should I look for.
|
| The base problem is that when my ASP app creates a file, IUSR_JASMINE has
no
| rights to the file. IUSR_JASMINE does have rights to the images directory
it
| is placed in.
|
| What should I try next?
|
| --
| thanks - dave
|
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi Dave,
| >
| > I've just tried the link you provided, when I submit to generate a
html/css
| > report, the page will popup authenticate dialog to ask me
| > username/password.... I think this should be the problem. Is that
| > "images" sub folder being protected by certain authentication in
IIS(Allow
| > anonymous) or what's the IIS's virtual dirctory access permission
setting
| > (not NTFS permission setting), you can check this in the IIS manager's
home
| > directory tab( for that "images" sub virtualdir....)...
| > Also, please check the IIS log to see the error entry about the
accessing
| > to the image file ( the error status code....)
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| > --------------------
| > | Thread-Topic: Creating a file that can be seen in the browser
| > | thread-index: AcYFrctS5I1SEXpLSguepNq8Il5g4A==
| > | X-WBNR-Posting-Host: 199.45.247.98
| > | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <th*****@nospam.nospam>
| > | References: <FF**********************************@microsoft.co m>
| > <eY**************@TK2MSFTNGP12.phx.gbl>
| > | Subject: Re: Creating a file that can be seen in the browser
| > | Date: Tue, 20 Dec 2005 13:39:02 -0800
| > | Lines: 60
| > | Message-ID: <CB**********************************@microsoft.co m>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:366112
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | Hello;
| > |
| > | I earlier gave IIS_WPG write permissions and that was sufficient to
| > create
| > | the file (it's reading it that is the problem.
| > |
| > | I just tried as you suggested and also gave ASPNET write permission,
but
| > no
| > | help. Still created with the same 4 permissions and the end user
cannot
| > view
| > | the png file.
| > |
| > | --
| > | thanks - dave
| > |
| > |
| > | "Phillip N Rounds" wrote:
| > |
| > | > Give ASPNET write permission in the appropriate directory. This is
the
| > | > built-in account for ASP.NET, not IUSR_JASMINE as you had assumed.
| > | >
| > | >
| > | > "David Thielen" <th*****@nospam.nospam> wrote in message
| > | > news:FF**********************************@microsof t.com...
| > | > > Hi;
| > | > >
| > | > > My ASP.NET app (C# calling J# under .net 2.0) creates a png file
in a
| > | > > subdirectory to display as part of the created page. However, the
| > bitmap
| > | > > will
| > | > > not display due to a security violation.
| > | > >
| > | > > Everything is the default settings I believe. IIS is running
under
| > Local
| > | > > System. In IIS the DefaultAppPool is running under Network
Service.
| > | > > Annonymous access uses the account IUSR_JASMINE (machine name is
| > Jasmine).
| > | > >
| > | > > The application is an ASP.NET application. You can go to
| > | > > http://www.windwardreports.com/RunRe...eportForm.aspx,
select
| > the
| > | > > html
| > | > > output, and run it to see the problem.
| > | > >
| > | > > The images directory where the file is created has granted to
| > IUSR_JASMINE
| > | > > Read & Execute, List Folder Contents, and Read permissions. Under
| > Advanced
| > | > > it
| > | > > has checked "Allow inheritable permissions..."
| > | > >
| > | > > I also had to give IIS_WPG write permissions in images to create
the
| > file.
| > | > > The creation occurs fine. However the created files only have
| > permissions
| > | > > for
| > | > > Administrators, Network Service, Power Users, and System.
| > | > >
| > | > > The file is created with and written to using new
| > | > >
| >
FileOutputStream("c:\Intepub\wwwroot\windwardrepor ts\images\wr_tempname.png"
| > )
| > | > >
| > | > > Is this a J# issue, or an IIS issue, or an ASP.NET issue? (Or is
it
| > me?)
| > | > > Somehow the created file is not getting the permissions of the
| > directory
| > | > > it
| > | > > is being created in.
| > | > >
| > | > > ??? - thanks - dave
| > | > >
| > | >
| > | >
| > | >
| > |
| >
| >
|

Dec 23 '05 #10
Hi;

One other thing. When I added this asp to IIS 6.0 (running on Win 2003), I
created a virtual directory but did not create a website for it. I access it
through my windwardreports website.

Do I need to create a website too? The directory this is in is not a
subdirectory of the windwardreports website home directory.

??? - thanks - dave
Dec 23 '05 #11
Hi;

ALso, this works fine on my dev machine which is XP and IIS 5. It's just on
the server which is Win 2003 & IIS 6 that is the problem.

Is there a special way files are supposed to be created under asp .net?

thanks - dave
Dec 23 '05 #12
Hi;

It appears to be a J# issue.

string filename = Request.PhysicalApplicationPath + "images\\tmp_" + fn +
".txt";
FileStream fs = new FileStream(filename, FileMode.Create, FileAccess.Write,
FileShare.ReadWrite);
works.

But using J# new FileOutputStream() for the png fails.

thanks - dave

Dec 23 '05 #13
Thanks for your followup Dave,

So when using C#, you can correctly create the temp file in that folder and
also read it later, yes? If so, the NTFS file permission should be ok.
Also, since you're going to read the file, why don't you use the
FileInputStream instead of FileOutputStream?

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: Creating a file that can be seen in the browser
| thread-index: AcYH6bgPMHlxvP/IQnmTHNZzAHo7hw==
| X-WBNR-Posting-Host: 199.45.247.98
| From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <th*****@nospam.nospam>
| References: <FF**********************************@microsoft.co m>
<eY**************@TK2MSFTNGP12.phx.gbl>
<CB**********************************@microsoft.co m>
<Fn**************@TK2MSFTNGXA02.phx.gbl>
<04**********************************@microsoft.co m>
<G8**************@TK2MSFTNGXA02.phx.gbl>
| Subject: Re: Creating a file that can be seen in the browser
| Date: Fri, 23 Dec 2005 09:53:02 -0800
| Lines: 14
| Message-ID: <C5**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:366817
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi;
|
| It appears to be a J# issue.
|
| string filename = Request.PhysicalApplicationPath + "images\\tmp_" + fn +
| ".txt";
| FileStream fs = new FileStream(filename, FileMode.Create,
FileAccess.Write,
| FileShare.ReadWrite);
| works.
|
| But using J# new FileOutputStream() for the png fails.
|
| thanks - dave
|
|

Dec 26 '05 #14
Hello;

First off, I use FileOutputStream because I create the file on the server -
then I put a <img src='file'> in the response for the page to display the
file in the page the asp .net app returns.

With more testing here is what I found. If my asp.net creates the file,
using either FileStream or java.io.FileOutputStream, it has the correct
permissions.

But if my C# .net app calls a C# dll which calls a J# dll which then makes
the exact same call to java.io.FileOutputStream, then I have the permission
problem. So somehow .net has decided since it is being created inside the
dll, to give it different permissions.

Both DLLs are strong named and authenticode signed.

Any ideas???

--
thanks - dave
"Steven Cheng[MSFT]" wrote:
Thanks for your followup Dave,

So when using C#, you can correctly create the temp file in that folder and
also read it later, yes? If so, the NTFS file permission should be ok.
Also, since you're going to read the file, why don't you use the
FileInputStream instead of FileOutputStream?

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: Creating a file that can be seen in the browser
| thread-index: AcYH6bgPMHlxvP/IQnmTHNZzAHo7hw==
| X-WBNR-Posting-Host: 199.45.247.98
| From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <th*****@nospam.nospam>
| References: <FF**********************************@microsoft.co m>
<eY**************@TK2MSFTNGP12.phx.gbl>
<CB**********************************@microsoft.co m>
<Fn**************@TK2MSFTNGXA02.phx.gbl>
<04**********************************@microsoft.co m>
<G8**************@TK2MSFTNGXA02.phx.gbl>
| Subject: Re: Creating a file that can be seen in the browser
| Date: Fri, 23 Dec 2005 09:53:02 -0800
| Lines: 14
| Message-ID: <C5**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:366817
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi;
|
| It appears to be a J# issue.
|
| string filename = Request.PhysicalApplicationPath + "images\\tmp_" + fn +
| ".txt";
| FileStream fs = new FileStream(filename, FileMode.Create,
FileAccess.Write,
| FileShare.ReadWrite);
| works.
|
| But using J# new FileOutputStream() for the png fails.
|
| thanks - dave
|
|

Dec 26 '05 #15
Thanks for your further response Dave,

I've also noticed your another new thread in this group, Since the problem
seems something related to mixed programming through c# and J# IO api, I'll
continue to discuss with you in that one...

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| Thread-Topic: Creating a file that can be seen in the browser
| thread-index: AcYJwTMRhRokaE7HTgifPCS9KUW41w==
| X-WBNR-Posting-Host: 199.45.247.98
| From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <th*****@nospam.nospam>
| References: <FF**********************************@microsoft.co m>
<eY**************@TK2MSFTNGP12.phx.gbl>
<CB**********************************@microsoft.co m>
<Fn**************@TK2MSFTNGXA02.phx.gbl>
<04**********************************@microsoft.co m>
<G8**************@TK2MSFTNGXA02.phx.gbl>
<C5**********************************@microsoft.co m>
<$8**************@TK2MSFTNGXA02.phx.gbl>
| Subject: Re: Creating a file that can be seen in the browser
| Date: Sun, 25 Dec 2005 18:08:02 -0800
| Lines: 93
| Message-ID: <8C**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:366997
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hello;
|
| First off, I use FileOutputStream because I create the file on the server
-
| then I put a <img src='file'> in the response for the page to display the
| file in the page the asp .net app returns.
|
| With more testing here is what I found. If my asp.net creates the file,
| using either FileStream or java.io.FileOutputStream, it has the correct
| permissions.
|
| But if my C# .net app calls a C# dll which calls a J# dll which then
makes
| the exact same call to java.io.FileOutputStream, then I have the
permission
| problem. So somehow .net has decided since it is being created inside the
| dll, to give it different permissions.
|
| Both DLLs are strong named and authenticode signed.
|
| Any ideas???
|
|
|
| --
| thanks - dave
|
|
| "Steven Cheng[MSFT]" wrote:
|
| > Thanks for your followup Dave,
| >
| > So when using C#, you can correctly create the temp file in that folder
and
| > also read it later, yes? If so, the NTFS file permission should be ok.
| > Also, since you're going to read the file, why don't you use the
| > FileInputStream instead of FileOutputStream?
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| > --------------------
| > | Thread-Topic: Creating a file that can be seen in the browser
| > | thread-index: AcYH6bgPMHlxvP/IQnmTHNZzAHo7hw==
| > | X-WBNR-Posting-Host: 199.45.247.98
| > | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <th*****@nospam.nospam>
| > | References: <FF**********************************@microsoft.co m>
| > <eY**************@TK2MSFTNGP12.phx.gbl>
| > <CB**********************************@microsoft.co m>
| > <Fn**************@TK2MSFTNGXA02.phx.gbl>
| > <04**********************************@microsoft.co m>
| > <G8**************@TK2MSFTNGXA02.phx.gbl>
| > | Subject: Re: Creating a file that can be seen in the browser
| > | Date: Fri, 23 Dec 2005 09:53:02 -0800
| > | Lines: 14
| > | Message-ID: <C5**********************************@microsoft.co m>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:366817
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | Hi;
| > |
| > | It appears to be a J# issue.
| > |
| > | string filename = Request.PhysicalApplicationPath + "images\\tmp_" +
fn +
| > | ".txt";
| > | FileStream fs = new FileStream(filename, FileMode.Create,
| > FileAccess.Write,
| > | FileShare.ReadWrite);
| > | works.
| > |
| > | But using J# new FileOutputStream() for the png fails.
| > |
| > | thanks - dave
| > |
| > |
| >
| >
|

Dec 26 '05 #16

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: aa | last post by:
Is a PHP variable supposed to be seen in a .js file included into a .php file? I have a client side javascript code stored in a .js file which is included into a PHP file using <script...
2
by: PK | last post by:
Hello, I am looking for help on the following. I'm trying to create a custom browser toolbar button that will do a few things. One that I'm trying to do at the moment is just simply return the...
20
by: Steve | last post by:
I have a web app that needs to parse through a file that is located on the client machine. I get the file string from a query string & then parse it. It is working fine on my development box but...
4
by: Howard Jess | last post by:
In a javascript-heavy page, an iframe is created to hold information from a secondary server CGI process, and the resulting data (in the iframe) is used to rewrite some content in the main page. To...
7
by: Russ | last post by:
Hi All, I have a problem getting the following simple example of "document.write" creating a script on the fly to work in all html browsers. It works in I.E., Firefox, and Netscape 7 above. It...
5
by: jen_designs | last post by:
How do I create custom controls for an embeded video. I need stop, play, pause, etc. Any thoughts?
8
by: memento | last post by:
Hello, How to include file into an ASP program? I was trying with this command: <!-#include file="INC_file.asp" -> but unfortunately it does not work :( There isn't any error message. IIS...
10
by: Ron Vecchi | last post by:
I am creating a custom web control that uses an enum for a property {Remote,InLine}. If the property is set to inline then text is read from the embedded resource and sent to the browser in the...
9
by: William | last post by:
Heya, I have been looking all over Google for ways to *create* an XML document using any Javascript object, and it seems that no one has ever tried or ever needed this. I want to send the...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
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...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
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...
1
isladogs
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...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.