Read and write .aspx file through vb.net code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maliksleo
    New Member
    • Feb 2009
    • 115

    Read and write .aspx file through vb.net code

    Hi

    my problem is that i want to generate a .aspx file at runtime using vb.net code
    how is it possible help me
    user will enter his code in the area provided and i wnat to generate the file having that code if any one have any idea how this will happen then plz guide me

    maliksleo
  • balame2004
    New Member
    • Mar 2008
    • 142

    #2
    You Write code into a new file and save it as .aspx file by using IO.File objects.

    Comment

    • shawpnendu
      New Member
      • Jun 2009
      • 3

      #3
      After save according to the previous poster you can read the below post which will help you a lot:
      PGBET merupakan sebuah situs game online dengan sejuta permainan seru dan menarik. Unduh APK game untuk mendapatkan promosi terbaru dan tips trik tergacor hari ini.


      Regards
      <link removed>
      Last edited by Frinavale; Jun 1 '09, 03:07 PM. Reason: Link to personal blog removed. Reason: not relevant to question.

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        Originally posted by maliksleo
        Hi

        my problem is that i want to generate a .aspx file at runtime using vb.net code
        how is it possible help me
        user will enter his code in the area provided and i wnat to generate the file having that code if any one have any idea how this will happen then plz guide me

        maliksleo
        This is a rather dangerous requirement.

        An anonymous web user will be able to supply code to the server and execute it...

        Are you Sure that you want to allow anyone (including malicious users) to be able to execute their own code on your sever?

        They could do some real damage!

        Comment

        • maliksleo
          New Member
          • Feb 2009
          • 115

          #5
          Originally posted by Frinavale
          This is a rather dangerous requirement.

          An anonymous web user will be able to supply code to the server and execute it...

          Are you Sure that you want to allow anyone (including malicious users) to be able to execute their own code on your sever?

          They could do some real damage!
          yes i know but my requirement is just like that no problem i have the solution for that malicious users the code will not run on the upload by the user. First of all that code will be reviewed and then placed on the server and any thing dangerous found then that user will be blocked.
          Any how this is another story first of all i have to read and write the .aspx file using IO.file objects

          maliksleo

          Comment

          • maliksleo
            New Member
            • Feb 2009
            • 115

            #6
            i have a new thing in my mind can i change the extenssion of a file from .txt to .aspx
            or copy the .txt file to another location with .aspx extenssion
            if it is possible then please tell me i am waiting

            maliksleo

            Comment

            • Frinavale
              Recognized Expert Expert
              • Oct 2006
              • 9749

              #7
              ASPX pages are compiled when they are requested unless they are precompiled.
              Therefore, if you place the ASPX page in a website that is hosting the proper .NET framework it will be compiled and executed when it is requested.

              Comment

              Working...