Re: Creating a file that can be seen in the browser



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==?=" <thielen@xxxxxxxxxxxxx>
| References: <FF8E0EB4-A61A-4CAD-A76A-EA525E8E2A87@xxxxxxxxxxxxx>
<eYtfnxaBGHA.1864@xxxxxxxxxxxxxxxxxxxx>
<CBFEA6D6-57D8-4215-A3D9-4F85DFD9A56D@xxxxxxxxxxxxx>
<Fnh7AShBGHA.2560@xxxxxxxxxxxxxxxxxxxxx>
<04FCF1C2-A403-402E-BD9C-7983EFD17FFD@xxxxxxxxxxxxx>
<G83puh6BGHA.1236@xxxxxxxxxxxxxxxxxxxxx>
<C51EEF45-CA78-4DD3-85CF-76D97599F0FA@xxxxxxxxxxxxx>
<$8saW2bCGHA.1236@xxxxxxxxxxxxxxxxxxxxx>
| 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: <8CB21AE8-3B75-4FF1-B184-B3D36F555B98@xxxxxxxxxxxxx>
| 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!TK2MSFTNGXA03.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==?=" <thielen@xxxxxxxxxxxxx>
| > | References: <FF8E0EB4-A61A-4CAD-A76A-EA525E8E2A87@xxxxxxxxxxxxx>
| > <eYtfnxaBGHA.1864@xxxxxxxxxxxxxxxxxxxx>
| > <CBFEA6D6-57D8-4215-A3D9-4F85DFD9A56D@xxxxxxxxxxxxx>
| > <Fnh7AShBGHA.2560@xxxxxxxxxxxxxxxxxxxxx>
| > <04FCF1C2-A403-402E-BD9C-7983EFD17FFD@xxxxxxxxxxxxx>
| > <G83puh6BGHA.1236@xxxxxxxxxxxxxxxxxxxxx>
| > | 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: <C51EEF45-CA78-4DD3-85CF-76D97599F0FA@xxxxxxxxxxxxx>
| > | 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!TK2MSFTNGXA03.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
| > |
| > |
| >
| >
|

.



Relevant Pages

  • Re: Cant use web links from messages
    ... What registering a DLL does is add/update some entries in the registry. ... That's necessary if some other program deleted or modified the registry entries. ... > Choose 'Extract One File From Installation Disk'. ... >> How to Make Internet Explorer the Default Web Browser ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Problem using a UNC Path within a COM component in asp.net
    ... If you write a VB6 app, does the dll work with the string? ... I have granted permissions on the FileServer to ... ¤ I would appreciate any help that would shed some light on this problem... ...
    (microsoft.public.vb.general.discussion)
  • QueryInterface for interface * failed. (Using COM Interop dll in web application)
    ... I wrote a COM dll in Visual C++ 6.0 and MFC that generates some report. ... // log general exception ... of the browser. ... I can use com obj only first time when I make request to instantiate ...
    (microsoft.public.dotnet.framework.interop)
  • Re: OS Developer-Need Childrens User Option
    ... > browser, but the one offered limits all users and the user ... HOW TO Set, View, Change, or Remove File and Folder Permissions ... HOW TO Set the My Documents Folder as Private in Windows XP ...
    (microsoft.public.windowsxp.general)
  • Re: Advice please-browser hijacker..
    ... >As a temporary measure ive installed mozilla firefox as a web browser. ... This will list all dll which are also BHO. ... which are hostile & which are unknown. ... tend to create random names for the BHO dll. ...
    (alt.computer.security)