How to add extra functionality to a compiled and hosted website in ASP.NET? - asp.net

I have an ASP.NET 2.0 legacy website with me, in which I have to fix two bugs in the website.
The problem is that we ( me and client ) do not have the source code for this website.
All we have is the FTP where the compiled and hosted version of the website resides.
Now, we are pretty sure that the developer has not intentionally done anything to obfuscate that compiled code with any other third party tools. He have just used the standard Visual Studio compiler.
My questions are
Is it possible to get the source code from the compiled version?
How can I get the source code from this compiled version?
What other options do I have?
Will .NET reflector be handy to extract the code?

Yes, .Net Reflector should be all you need to decompile the code (without comments, anyway).
Try opening the DLL files from the bin directory inside .Net Reflector and see if you can make sense of it.
EDIT: It appears that after investigating ILSpy, which Adrian Iftode mentioned, there is an open source plugin for .Net Reflector called Reflexil that does what you need - modifying compiled DLLs. That would be well worth a look at!

Related

is it possible to recover .net source code from published project?

I am given a task to move an old ASP.net project from one server to the other. The server on which the project is currently hosted has the 'Published' version and the actual 'source code' along with the solution is completely missing. Is there any way to recover the source code from the published version of the project?
You can use Reflector to decompile the EXEs or DLLs, providing that they have not been obfuscated (in this case you would get a very difficult to understand source code)

What default dll's are imported into an asp.net webforms project

I've inherited a legacy code base that doesn't currently compile and has no project or solution file (there are multiple repositories including winforms and asp.net).
I'm not certain what .net version the original code was written in, nor what the project template was, although I know some are web forms.
I'm re-creating new solution and project files to import the code into, but need to find some of the default dll's included in old Visual Studio project templates (e.g. webforms).
Any ideas where I might find this information?
Anyone know an MSDN link with this on it?
P.S. I don't have access to the production code, although it is running in production.

How to Hide ASP.Net Website Source Code after Deployment

Am using Visual studio 2012 i cant hide ASP.NET Website source code .
Please support me.
Am try to see some tutorials those tutorials are for Project not for website.
If you are referring to the HTML or JavaScript code in your site, you can't hide that because it is required by the users browser to render the website.
If you are referring to the C# code files those should be compiled into binaries and only the binaries should be published out to the website folder. If the C# files are being included you probably need to set the Build Action on these files from "Content" to "Compile" via the Property window.
That being said the DLL binaries can be de-compiled in most cases. You can buy tools that will try to obfuscate your code which will make it harder but not impossible to de-compile.

Compiling ASP.NET

I'm compiling ASP.NET code for the first time ever and I'm stumped.
I downloaded MINGW-Get and just finished installing it. The client gave me the source code and I found a file called RSConfig.exe.
So I assumed that was the config file, ran it, and then tried "make" but got the error
No targets specified and no makefile found. Stop
Any idea what I'm supposed to do? I don't see anything that would resemble a makefile in the source code.
Thanks in advance!
Do yourself a favour and install Visual Studio Express:
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express
It makes development easier and fast
It sounds like you might want to get familiar with the background concepts around asp.net and it's defacto development environment Visual Studio (there are many versions of visual studio).
As Andrei recommends, using Visual Studio Express is a good free way of getting started. The version most suited for web development is Visual Web Developer Express.
Attempting to compile .net code from a toolset such as MinGW isn't a typical route for using asp.net, however I've not used MinGW before and not sure it's possible to compile .net code from it.... Although it is perfectly possible to compile .net code from the command line (using the .net framework sdk) , I certainly wouldn't recommend it if you are getting started.
I'm going to make a guess that it is an ASP.net web forms project, it being the most prolific asp.net project type at the moment.
This official asp.net site http://www.asp.net/web-forms will guide you through what web forms are and how to get the development environment setup. Having this sort of background will aid you in solving your particular situation.

ASP.NET Browser Caps update

I'm trying to update the browser caps using the ".browser" files (browserCaps section of the web.config is deprecated in .NET framework 2.0). So far, I found this project on CodePlex that provides updated files:
http://aspnet.codeplex.com/releases/view/41420
From the Visual Studio 2008 command promt, I ran the command "aspnet_regbrowsers -i" wich creates an assembly (ASP.BrowserCapsFactory.dll) and installs it in the GAC.
So far so good, the updated definitions take effect in my asp.net application.
The question is, is it possible tu use that assembly outside the GAC, like add it as reference in a Web application (I tried it and unless I'm doing something wrong, it doesn't work)?
I'm aware of the "App_Browser" folder solution, but I'm looking for a solution that will ensure the same browsers definitions for several web application without having to put an assembly in the GAC.
Thanks in advance for your answers!
ASP.NET 4 White paper
According to ASP.NET 4 whitepaper, you can manage browser capabilities within your code by extending the ASP.NET Browser capabilities or totally replace it. So far, it's the best you could do instead of using the aspnet_regbrowsers

Resources