Click to See Complete Forum and Search --> : Hidden code in an ASP.NET site?


Nostromo77
03-16-2007, 05:18 PM
Hello,

I'm new to ASP.NET, and I am working on an existing ASP.NET 1.x website using Visual Basic.

I want to make some minor changes to the validation code of the site, but I am having trouble locating the code in question, either as inline code on the .aspx page, or in a code behind page. The .aspx pages seem to reference code-behind files that don't exist (i.e. "Codebehind="checkout_main.aspx.vb"").

The code must be there somewhere, as it is functioning. Is it possible that the original developer compiled the code, but did not include the code-behind pages that the compilation was based on? Is there any way to get into the code to make the small changes I want to do, or is it easier just to start over?

Thanks very much for any comments or advice.

Chitra Xavier
03-19-2007, 07:05 AM
Without the needed codebehind file the page wont execute.Its there somewhere,search for it.
I guess if u search in IIS u can find it easily.

PeOfEo
03-19-2007, 09:03 AM
What exactly is the code in question doing. The code may have been included from the class library and being called from that, which is the case (not explicitly) if you are using the built in form validation controls.

Nostromo77
03-19-2007, 11:52 AM
What exactly is the code in question doing. The code may have been included from the class library and being called from that, which is the case (not explicitly) if you are using the built in form validation controls.

I think I may be all set with this question now: someone told me that codebehind files are routinely taken away after the site is compiled and made public, for security reasons. I downloaded the Lutz Roeder Reflector app, and it seems to decompile the .dll just fine.

The code I want to change is part of a checkout procedure in a small commerce site - I just want to make minor changes to validation text and such.

Thank you!

lmf232s
03-19-2007, 12:59 PM
Yes, when you publish a web site you have an option to compile the site into .dlls which means that none of the .vb files will be copied to the server.

So be getting that app and decompiling those .dlls you should be able to see the code behind pages.

Although you might run into problems. In order to make a change to the .vb files you must recompile the web site thus creating the new .dlls. If you dont have the source code for the entrie site then I'm not sure if your going to be able to recompile the website.

I guess if the decompiler app got all the files for you, you could always create a new project with all the files.

Again i dont know your entire situation so you might not have any problems.