The Sandbox Thread

13 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

light Zip,ready for Office12 .

Back to Forum: The Sandbox
  • User profile image
    leighsword

    I wrote it for the smart phone in the early year (2004.06 ,now I am quit this game), so this code is ugly, but it does work.

    Note: the managed code only for test.

    bug report in this post.

  • User profile image
    Steve411

    Well done. Smiley

  • User profile image
    DADA

    good!it's so perfect!

  • User profile image
    xpherion

    good code...
    xpherion

  • User profile image
    Deactivated User

    Comment removed at user's request.

  • User profile image
    leighsword

    Programous wrote:

    Nice, but (I haven’t looked thought all the code yet, but from what I see) your program tries to open a file on the local system. This is fine, except that if it is running as a partially trusted app it will throw a security error. The way around this is to open an Open File Dialog box and use the get the stream, not the file name to open the file. Same thing with saving (only use the Save File Dialog).


    this bug is an OS bug, not mine, the bug also is out of our control, the OS should not allow users to running my app as a partially trusted app.

  • User profile image
    leighsword

    resolve method:
    run regedit.exe  (or programming to modify register, in run time), makes our app be a fully trusted app.

    another way:
    find 'RunAs' key in the register and delete it all.

  • User profile image
    Tensor

    leighsword wrote:
    Programous wrote:

    Nice, but (I haven’t looked thought all the code yet, but from what I see) your program tries to open a file on the local system. This is fine, except that if it is running as a partially trusted app it will throw a security error. The way around this is to open an Open File Dialog box and use the get the stream, not the file name to open the file. Same thing with saving (only use the Save File Dialog).


    this bug is an OS bug, not mine, the bug also is out of our control, the OS should not allow users to running my app as a partially trusted app.



    Does anyone else find this as hilarious as me?

    BUG: Wont work unless run in full trust.
    FIX: Run in full trust.

  • User profile image
    leighsword

    Tensor wrote:
    leighsword wrote:
    Programous wrote:

    Nice, but (I haven’t looked thought all the code yet, but from what I see) your program tries to open a file on the local system. This is fine, except that if it is running as a partially trusted app it will throw a security error. The way around this is to open an Open File Dialog box and use the get the stream, not the file name to open the file. Same thing with saving (only use the Save File Dialog).


    this bug is an OS bug, not mine, the bug also is out of our control, the OS should not allow users to running my app as a partially trusted app.



    Does anyone else find this as hilarious as me?

    BUG: Wont work unless run in full trust.
    FIX: Run in full trust.


    this is similar to
    BUG: Your app are unable to save file to a read-only Flash USB stroage
    FIX: Make sure the Flash USB stroage is writable.

    can you find a better solution for the similar problems?

  • User profile image
    Sven Groot

    leighsword wrote:
    the OS should not allow users to running my app as a partially trusted app.

    You should demand the appropriate permissions at assembly level to prevent an app from being run with insufficient permissions. If you don't tell the OS what permissions you require, you can't really expect it to guess can you?

    In this case, you need FileIOPermission, so you should do:
    [assembly: FileIOPermission(SecurityAction.RequireMinimum, Unrestricted=true)]

  • User profile image
    Deactivated User

    Comment removed at user's request.

  • User profile image
    leighsword

    Sven Groot wrote:
    leighsword wrote:the OS should not allow users to running my app as a partially trusted app.

    You should demand the appropriate permissions at assembly level to prevent an app from being run with insufficient permissions. If you don't tell the OS what permissions you require, you can't really expect it to guess can you?

    In this case, you need FileIOPermission, so you should do:
    [assembly: FileIOPermission(SecurityAction.RequireMinimum, Unrestricted=true)]

    well,it's my mistake, this is not an OS bug,but it absolutely is an .Net framework bug, and i hope this bug will be fixed in .net 2.0 .

    why we need to write extra statements to fix a MS bug in our apps,is it really need?
    old chinese told us, '画蛇添足'.

    画蛇添足 (hua4 she2 tian1 zu2)(draw+snake+add+foot)
    • Literally: adding legs when painting a snake
    • Moral: Don't overdo something.
    • English equivalent: to gild the lily

  • User profile image
    Deactivated User

    Comment removed at user's request.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.