Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Unsafe Code in a ASP project

Unsafe Code in a ASP project

Scheduled Pinned Locked Moved ASP.NET
visual-studiocsharphelptutorial
3 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    csharp_developer
    wrote on last edited by
    #1

    I am trying to use unsafe code within an ASP project and I receive this error: Compiler Error Message: CS0227: Unsafe code may only appear if compiling with /unsafe I am developing using the cassini personal webserver. I am not using visual studio. I saw on various posts how to allow unsafe code using visual studio IDE setting in visual studio. I then added this to web.config in hopes to accomplish the same thing as the IDE setting: and received this error: Parser Error Message: File or assembly name System, or one of its dependencies, was not found. Line 16:

    L A 2 Replies Last reply
    0
    • C csharp_developer

      I am trying to use unsafe code within an ASP project and I receive this error: Compiler Error Message: CS0227: Unsafe code may only appear if compiling with /unsafe I am developing using the cassini personal webserver. I am not using visual studio. I saw on various posts how to allow unsafe code using visual studio IDE setting in visual studio. I then added this to web.config in hopes to accomplish the same thing as the IDE setting: and received this error: Parser Error Message: File or assembly name System, or one of its dependencies, was not found. Line 16:

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Are you trying to place html or javascript in your website. To tired to think not sure if this helpes http://asp.net/faq/RequestValidation.aspx

      1 Reply Last reply
      0
      • C csharp_developer

        I am trying to use unsafe code within an ASP project and I receive this error: Compiler Error Message: CS0227: Unsafe code may only appear if compiling with /unsafe I am developing using the cassini personal webserver. I am not using visual studio. I saw on various posts how to allow unsafe code using visual studio IDE setting in visual studio. I then added this to web.config in hopes to accomplish the same thing as the IDE setting: and received this error: Parser Error Message: File or assembly name System, or one of its dependencies, was not found. Line 16:

        A Offline
        A Offline
        Andrew Quinn AUS
        wrote on last edited by
        #3

        Hi, Have you tried different combinations, e.g. the switch also supports: -unsafe If this still doesn't work, you could always put the unsafe code in an assembly then include the switch when using the csc compiler. Hope this helps, Andy

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups