How to Hide ASP.Net Website Source Code after Deployment - asp.net

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.

Related

Browserlink CSS autosync not working ASP.NET Core 2.0

I cannot get the CSS to sync in ASP.NET Core 2.0.
Here's what I do:
Create brand new application using MS template
Launch the generated template (app.UseBrowserLink() is present)
Try to modify site.css by setting the background-color to yellow
Nothing happens
I have the CSS autosync enabled, in the browserlink dashboard I can see the connected browser and I can also use the Refresh button on the dashboard
.
Funny enough, when I create a new project using the classic old ASP.NET MVC template, CSS autosync does indeed work, however I cannot make it run on ASP.NET Core template
I've also tried installing the BrowserLink.Loader assembly and referencing thatone but to no avail...
Any help greatly appreciated
It looks like this is an open issue with Visual studio, and as of October "CSS Auto-Sync isn't supported on ASP.NET Core yet".
Something you could try is to use Chrome's "add folder to workspace" feature as suggested here and you can also try enabling browser link for static files which has helped some people to make it work.
You can also vote on this to encourage Microsoft to implement CSS autosync for ASP.NET Core.

F12 Go To Definition not working for CSS in CSHTML files - VS2017

I am working on my first Asp.net Core 2.0 Mvc web site.
Normally I use web forms, but I'm trying something new.
In my .cshtml files I cannot F12 or right click and "go to definition" on CSS classes. I thought something may be wrong with my install but I was able to open up a web forms application and it works just fine from an ASPX page.
I have seen topics from 2013 about this issue, but no solutions.
I have installed web essentials, but that didn't work either.
This is something I use regularly and it is hard to do it manually especially when you are looking at a minified CSS file.
I'm using Visual Studio 2017 Pro.
The ReSharper extension for Visual Studio adds this feature.
https://www.jetbrains.com/help/resharper/ReSharper_by_Language__CSS__Navigation.html#navigation-within-css-file

How to update internal enterprise web page without Visual Studio project?

Problem 1 : I am not a web developer, but since people think all developers can do everything, I've been asked to look at a company's internal web site for the purpose of updating it.
Problem 2 : The company does not have the original Visual Studio project for the web site.
Question 1 : Can the files running the web site be used to manually build a working VS project?
Question 2 : Is it better or necessary to rebuild the web site from scratch?
Two are two ways to deploy ASP.NET:
Compile project and deploy aspx pages and dlls (I'm talking about webforms here, not MVC).
Source code (dynamic compilation available starting Framework 2)
In second case you can download all code, create project and add all files there.
If you have only complied version, it's more complex. You can get aspx files, but for code behind you can use for example Reflector or DotPeek.
PS. If you have ASP files, it's classic ASP, you have all source inside ASP (VBScript), so you can get everything and edit in VS or even in notepad.

How to add extra functionality to a compiled and hosted website in 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!

Including links to external resources in Visual Studio 2010 Web project

I have a ASP.NET project which relies upon the FreeImage .NET wrapper. This is loaded using a reference to a external directory. The wrapper relies upon the FreeImage.dll being present to work (clearly).
How do I get Visual Studio to include a reference to the FreeImage dll. It's not a .NET assembly, i think it was built in something else (so I can't add it as a reference).
I don't really want to have a copy for this project as these files reside in a different SVN repository
Add a pre-build macro/script to copy the file across each time you build. There's no way to add a symbolic link into a visstudio afaik.
I am assuming the .dll was built using a .NET supported language like C#.
You can just right click over the site and select 'Add Reference'.
Browse to the .dll you are looking for and then click 'Ok' to add it.
It should add a .refresh file to your site and the dll. The .refresh file is what is checked into your source control letting the site know the relative location of the .dll to the site.

Resources