asp.net source code?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jay

    asp.net source code?

    Is it possible to view the source code for .NET classes?

    Thanks.
    Jay
  • Curt_C [MVP]

    #2
    Re: asp.net source code?

    after compilation I'm assuming you mean?
    You may be able to view some process info but the exact code isn't easily retreived.
    Are you trying to or trying to avoid someone else doing it to you?

    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    Site: http://www.Darkfalz.com
    Blog: http://blog.Darkfalz.com


    "Jay" <me@somewhere.c om> wrote in message news:%23OeHVGKd EHA.592@TK2MSFT NGP11.phx.gbl.. .
    Is it possible to view the source code for .NET classes?

    Thanks.
    Jay

    Comment

    • Ken Cox [Microsoft MVP]

      #3
      Re: asp.net source code?

      Hi Jay,

      To a certain extent, yes.

      Get a copy of Reflector, open the DLL and use the Disassembler.




      "Reflector is a class browser for .NET components. It supports assembly and
      namespace views, type and member search, XML documentation, call and callee
      graphs, IL, Visual Basic, Delphi and C# disassembler, dependency trees, base
      type and derived type hierarchies and resource viewers. "

      Ken


      "Jay" <me@somewhere.c om> wrote in message
      news:%23OeHVGKd EHA.592@TK2MSFT NGP11.phx.gbl.. .
      Is it possible to view the source code for .NET classes?

      Thanks.
      Jay

      Comment

      • Kevin Spencer

        #4
        Re: asp.net source code?

        You couldn't program with .Net if you couldn't view/edit the source code.
        ;-) If you're asking if you can view the source code inside a compiled DLL,
        well, that depends. First, one would have to gain access to the file, which,
        unless one has permission, is highly unlikely. Assuming that some hacker did
        gain access to the DLL, well, they could view the MSIL code that is in the
        DLL, yes. Of course, if you use an obfuscator when building your DLLs, that
        isn't going to happen either. Finally, if you haven't compiled a DLL, and
        are using scripted CodeBehind, again, someone would have to gain access to
        these files in order to view the source code. And we're back to the same
        issue we started with again. If you're concerned about Security, the bottom
        line is this: How good would your server's security be if people could gain
        access to the file system? Because that is the only way anyone could
        possibly view the source code for any .Net class on the server.

        --
        HTH,
        Kevin Spencer
        ..Net Developer
        Microsoft MVP
        Big things are made up
        of lots of little things.

        "Jay" <me@somewhere.c om> wrote in message
        news:#OeHVGKdEH A.592@TK2MSFTNG P11.phx.gbl...
        Is it possible to view the source code for .NET classes?

        Thanks.
        Jay


        Comment

        • Bryant Hankins

          #5
          Re: asp.net source code?

          Check out Anikrino:




          It decompiles .NET assemblies to C# source code.

          --
          Hope this helps,
          Bryant Hankins
          Numinet Systems Inc.





          "Jay" <me@somewhere.c om> wrote in message
          news:%23OeHVGKd EHA.592@TK2MSFT NGP11.phx.gbl.. .
          Is it possible to view the source code for .NET classes?

          Thanks.
          Jay


          Comment

          • Kevin Spencer

            #6
            Re: asp.net source code?

            > Isn't it better not to have the code behind files on the server, just the
            ..aspx and .dll files? In which case even if the hacker did gain access to
            the file system they would still need to decompile the .dll files since
            source files do not exist on the server.

            If anyone could gain access to my server's file system, I would consider
            that a MUCH bigger (read "EMERGENCY" ) security hole.

            --
            HTH,
            Kevin Spencer
            ..Net Developer
            Microsoft MVP
            Big things are made up
            of lots of little things.

            "Ryan Riddell" <RyanRiddell@di scussions.micro soft.com> wrote in message
            news:356EEA2C-D036-4934-B7B0-8891BD4F9F96@mi crosoft.com...[color=blue]
            > Isn't it better not to have the code behind files on the server, just the[/color]
            ..aspx and .dll files? In which case even if the hacker did gain access to
            the file system they would still need to decompile the .dll files since
            source files do not exist on the server.[color=blue]
            >
            > "Kevin Spencer" wrote:
            >[color=green]
            > > You couldn't program with .Net if you couldn't view/edit the source[/color][/color]
            code.[color=blue][color=green]
            > > ;-) If you're asking if you can view the source code inside a compiled[/color][/color]
            DLL,[color=blue][color=green]
            > > well, that depends. First, one would have to gain access to the file,[/color][/color]
            which,[color=blue][color=green]
            > > unless one has permission, is highly unlikely. Assuming that some hacker[/color][/color]
            did[color=blue][color=green]
            > > gain access to the DLL, well, they could view the MSIL code that is in[/color][/color]
            the[color=blue][color=green]
            > > DLL, yes. Of course, if you use an obfuscator when building your DLLs,[/color][/color]
            that[color=blue][color=green]
            > > isn't going to happen either. Finally, if you haven't compiled a DLL,[/color][/color]
            and[color=blue][color=green]
            > > are using scripted CodeBehind, again, someone would have to gain access[/color][/color]
            to[color=blue][color=green]
            > > these files in order to view the source code. And we're back to the same
            > > issue we started with again. If you're concerned about Security, the[/color][/color]
            bottom[color=blue][color=green]
            > > line is this: How good would your server's security be if people could[/color][/color]
            gain[color=blue][color=green]
            > > access to the file system? Because that is the only way anyone could
            > > possibly view the source code for any .Net class on the server.
            > >
            > > --
            > > HTH,
            > > Kevin Spencer
            > > ..Net Developer
            > > Microsoft MVP
            > > Big things are made up
            > > of lots of little things.
            > >
            > > "Jay" <me@somewhere.c om> wrote in message
            > > news:#OeHVGKdEH A.592@TK2MSFTNG P11.phx.gbl...
            > > Is it possible to view the source code for .NET classes?
            > >
            > > Thanks.
            > > Jay
            > >
            > >
            > >[/color][/color]


            Comment

            • Jay

              #7
              Re: asp.net source code? -- THANKS

              Thanks to all:

              The Reflector browser is exactly what I need:



              Thanks.
              Jay

              Comment

              Working...