Lost cs Files in ASP.NET Website.... Now I need to make additions.
-
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
-
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
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.
-
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.
-
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...
-
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...
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
-
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
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
-
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
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: