CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2006
    Posts
    449

    ERROR!: Security related error... Please help me!

    Let me brief you what I was trying... I work on Visual Studio 2005 / MS-SQL / C#.

    The error what I get is:
    ===================================================
    System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
    ===================================================

    Whats this and how I do solve this error?

    Thanx & rgds
    Thank you for your support.

    Best regards,
    Lax

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: ERROR!: Security related error... Please help me!

    Where are you trying to write files? Some folders require more access than others.
    Have you tried run as administrator?

  3. #3
    Join Date
    Oct 2006
    Posts
    449

    Re: ERROR!: Security related error... Please help me!

    Thank you for your response.

    I was trying to pick up a file from the server folder (using server.mappath) and send as an attachment using asp.net mail.
    Thank you for your support.

    Best regards,
    Lax

  4. #4
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: ERROR!: Security related error... Please help me!

    Does your site have file i/o permissions for the folder in question?

  5. #5
    Join Date
    Oct 2006
    Posts
    449

    Re: ERROR!: Security related error... Please help me!

    Yes and I have even given full permission to the folder and the files.
    Thank you for your support.

    Best regards,
    Lax

  6. #6
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: ERROR!: Security related error... Please help me!

    Try mapping a folder and using it's drive letter
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  7. #7
    Join Date
    Oct 2006
    Posts
    449

    Re: ERROR!: Security related error... Please help me!

    Thank you for your response...

    Yes I have mapped to the complete path including the drive letter...
    Thank you for your support.

    Best regards,
    Lax

  8. #8
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: ERROR!: Security related error... Please help me!

    by the way, you checked out what path\filename you got after server.mappath... to be sure you really got the phisical path and filename you needed?
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured