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. General Programming
  3. C#
  4. Lost cs Files in ASP.NET Website.... Now I need to make additions.

Lost cs Files in ASP.NET Website.... Now I need to make additions.

Scheduled Pinned Locked Moved C#
questioncsharpasp-netvisual-studiowinforms
7 Posts 2 Posters 0 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.
  • O Offline
    O Offline
    ortaparmak
    wrote on last edited by
    #1

    Hello all, I have coded a quite-complex (for me) website that contains many controls and some loaded code-behind pages. I launched the website, no problems there. A few months after all files are gone in a harddisk crash. Now I have a fully functioning ASP.NET website at hosting company's computer, but no code behind files... As long as website works, noo problem I thought, I can work on it "someday" in the future. But now hosting company changed their configuration and one of the user controls that contained hard-coded directory path does not work anymore (oh yes I know I shouldn't have hardcoded and instead used settings files... But "it" happens)... I really don't have time to code all that stuff and code behind pages contained many SEO tweaks, I don't think I can get them all right in one go (last time it took mo more than 2 months to get it almost-right). I have temporarily solved the situation by removing the problematic user control. Now website works but that spot looks kinda empty and in a week or so I have to put there something and I don't really feel like coding the entire code behind pages. It took me 2 months to get together this babe... My question is this: Is there an easier way around? For instance, can't I just write a single replacement user control and have it compiled? When I tried it (on VS 2005) it tells me the website is already pre-built and refuses to build/publish the website. When I wrote a simple user control, inserted in site.master and clicked on Preview I can see it's working, but I can't publish/build. So I figure there should be a way... Any recommendations please? (P.S. I am a newbie and I am not a professional programmer; please take it easy on me :D) Thanks, Haluk

    O 1 Reply Last reply
    0
    • O ortaparmak

      Hello all, I have coded a quite-complex (for me) website that contains many controls and some loaded code-behind pages. I launched the website, no problems there. A few months after all files are gone in a harddisk crash. Now I have a fully functioning ASP.NET website at hosting company's computer, but no code behind files... As long as website works, noo problem I thought, I can work on it "someday" in the future. But now hosting company changed their configuration and one of the user controls that contained hard-coded directory path does not work anymore (oh yes I know I shouldn't have hardcoded and instead used settings files... But "it" happens)... I really don't have time to code all that stuff and code behind pages contained many SEO tweaks, I don't think I can get them all right in one go (last time it took mo more than 2 months to get it almost-right). I have temporarily solved the situation by removing the problematic user control. Now website works but that spot looks kinda empty and in a week or so I have to put there something and I don't really feel like coding the entire code behind pages. It took me 2 months to get together this babe... My question is this: Is there an easier way around? For instance, can't I just write a single replacement user control and have it compiled? When I tried it (on VS 2005) it tells me the website is already pre-built and refuses to build/publish the website. When I wrote a simple user control, inserted in site.master and clicked on Preview I can see it's working, but I can't publish/build. So I figure there should be a way... Any recommendations please? (P.S. I am a newbie and I am not a professional programmer; please take it easy on me :D) Thanks, Haluk

      O Offline
      O Offline
      ortaparmak
      wrote on last edited by
      #2

      Oh another thing, I don't want to put static HTML there. I want to put another user control that prints a random list of keywords (tag cloud) from a wide list of keywords... So static HTML is not the option.

      M 1 Reply Last reply
      0
      • O ortaparmak

        Oh another thing, I don't want to put static HTML there. I want to put another user control that prints a random list of keywords (tag cloud) from a wide list of keywords... So static HTML is not the option.

        M Offline
        M Offline
        moon_stick
        wrote on last edited by
        #3

        I think your best bet is to download a copy of Reflector[^] (don't worry, it's free) and use this to disassemble the DLLs in the website. You can then recreate the project (though it might be a bit of a slow process).

        It definitely isn't definatley

        O 1 Reply Last reply
        0
        • M moon_stick

          I think your best bet is to download a copy of Reflector[^] (don't worry, it's free) and use this to disassemble the DLLs in the website. You can then recreate the project (though it might be a bit of a slow process).

          It definitely isn't definatley

          O Offline
          O Offline
          ortaparmak
          wrote on last edited by
          #4

          Thank you really. It seems a good solution in the long run (i.e. for recovering the entire website). But I still need a quick and dirty solution for adding a new user control to my published website...

          M 1 Reply Last reply
          0
          • O ortaparmak

            Thank you really. It seems a good solution in the long run (i.e. for recovering the entire website). But I still need a quick and dirty solution for adding a new user control to my published website...

            M Offline
            M Offline
            moon_stick
            wrote on last edited by
            #5

            You're effectively talking about making changes to a compiled piece of code which leaves you with two options: 1. Recreate the project as described above; edit, rebuild & deploy. 2. Disassemble the DLL using ildasm.exe (prob found in c:\program files\visual studio 8\sdk\v2.0\bin) to get the IL code, amend this code by hand (if you're just changing hard coded references this might not be too difficult) and then use ilasm.exe to reassemble the DLL which you can then redeploy. Given that you say you're not an experienced developer, I'd recommend that you invest a couple of hours in the first solution; the second is quick and dirty but it definitely isn't trivial.

            It definitely isn't definatley

            O 2 Replies Last reply
            0
            • M moon_stick

              You're effectively talking about making changes to a compiled piece of code which leaves you with two options: 1. Recreate the project as described above; edit, rebuild & deploy. 2. Disassemble the DLL using ildasm.exe (prob found in c:\program files\visual studio 8\sdk\v2.0\bin) to get the IL code, amend this code by hand (if you're just changing hard coded references this might not be too difficult) and then use ilasm.exe to reassemble the DLL which you can then redeploy. Given that you say you're not an experienced developer, I'd recommend that you invest a couple of hours in the first solution; the second is quick and dirty but it definitely isn't trivial.

              It definitely isn't definatley

              O Offline
              O Offline
              ortaparmak
              wrote on last edited by
              #6

              I checked ildasm already. It looked rather complicated and its been a few months since I coded this. So I guess I'll go with Refractor. Thank you for your time and valuable help. Kind Regards, Haluk

              1 Reply Last reply
              0
              • M moon_stick

                You're effectively talking about making changes to a compiled piece of code which leaves you with two options: 1. Recreate the project as described above; edit, rebuild & deploy. 2. Disassemble the DLL using ildasm.exe (prob found in c:\program files\visual studio 8\sdk\v2.0\bin) to get the IL code, amend this code by hand (if you're just changing hard coded references this might not be too difficult) and then use ilasm.exe to reassemble the DLL which you can then redeploy. Given that you say you're not an experienced developer, I'd recommend that you invest a couple of hours in the first solution; the second is quick and dirty but it definitely isn't trivial.

                It definitely isn't definatley

                O Offline
                O Offline
                ortaparmak
                wrote on last edited by
                #7

                I came back to thank you. Thanks to Reflector I recovered all the code from binaries and rebuilt the website in just 5 hours :D Thanks for pointing me to right direction. You saved me a lot of time. All the best.:thumbsup:

                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