如何使用ASP.NET Visual Studio 2017隐藏网站的源代码?

时间:2019-07-11 06:05:48

标签: html css asp.net dll visual-studio-2017

对不起,我是asp.net的初学者 我的任务是使用asp.net隐藏网站源代码(HTML,CSS和Javascript),并给出提示“将文件编译为dll”。 问题是编译后如何查看我的网站。 下面显示的代码是网络发布活动。

使用

转换的Web.config
C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\Web.Debug.config into obj\Debug\TransformWebConfig\transformed\Web.config.
Copying all files to temporary location below for package/publish:
obj\Debug\AspnetCompileMerge\Source.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v / -p "C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\AspnetCompileMerge\Source" -u -c "C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\AspnetCompileMerge\TempBuildDir" 
Auto ConnectionString Transformed obj\Debug\AspnetCompileMerge\TempBuildDir\Views\Web.config into obj\Debug\CSAutoParameterize\transformed\Views\Web.config.
Auto ConnectionString Transformed obj\Debug\AspnetCompileMerge\TempBuildDir\Web.config into obj\Debug\CSAutoParameterize\transformed\Web.config.
Copying all files to temporary location below for package/publish:
obj\Debug\Package\PackageTmp.
Packaging into C:\Users\KAI JIN NG\Documents\dll\Prototype_11\Prototype_11.zip.
Adding sitemanifest (sitemanifest).
Adding IIS Application (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp)
Creating application (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp)
Adding virtual path (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp)
Adding directory (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp).
Adding directory (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\Antlr3.Runtime.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\Antlr3.Runtime.pdb).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\App_global.asax.compiled).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\App_global.asax.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\Microsoft.AspNet.TelemetryCorrelation.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\Microsoft.Web.Infrastructure.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\Newtonsoft.Json.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\Prototype_11.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\Prototype_11.pdb).
Adding directory (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\csc.exe).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\csc.exe.config).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\csc.rsp).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\csi.exe).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\csi.exe.config).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\csi.rsp).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\Microsoft.Build.Tasks.CodeAnalysis.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\Microsoft.CodeAnalysis.CSharp.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\Microsoft.CodeAnalysis.CSharp.Scripting.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\Microsoft.CodeAnalysis.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\Microsoft.CodeAnalysis.Scripting.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\Microsoft.CodeAnalysis.VisualBasic.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\Microsoft.CSharp.Core.targets).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\Microsoft.DiaSymReader.Native.amd64.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\Microsoft.DiaSymReader.Native.x86.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\Microsoft.Managed.Core.targets).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\Microsoft.VisualBasic.Core.targets).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.AppContext.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.Collections.Immutable.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.Console.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.Diagnostics.FileVersionInfo.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.Diagnostics.StackTrace.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.IO.Compression.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.IO.FileSystem.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.IO.FileSystem.Primitives.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.IO.Pipes.AccessControl.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.IO.Pipes.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.Reflection.Metadata.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.Security.AccessControl.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.Security.Claims.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.Security.Cryptography.Algorithms.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.Security.Cryptography.Encoding.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.Security.Cryptography.Primitives.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.Security.Cryptography.X509Certificates.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.Security.Principal.Windows.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.Text.Encoding.CodePages.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.ValueTuple.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.Xml.ReaderWriter.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.Xml.XmlDocument.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.Xml.XPath.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\System.Xml.XPath.XDocument.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\vbc.exe).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\vbc.exe.config).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\vbc.rsp).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\VBCSCompiler.exe).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\roslyn\VBCSCompiler.exe.config).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\System.Diagnostics.DiagnosticSource.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\System.Web.Helpers.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\System.Web.Mvc.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\System.Web.Optimization.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\System.Web.Razor.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\System.Web.WebPages.Deployment.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\System.Web.WebPages.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\System.Web.WebPages.Razor.dll).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\bin\WebGrease.dll).
Adding directory (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Content).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Content\bootstrap-theme.css).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Content\bootstrap-theme.css.map).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Content\bootstrap-theme.min.css).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Content\bootstrap-theme.min.css.map).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Content\bootstrap.css).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Content\bootstrap.css.map).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Content\bootstrap.min.css).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Content\bootstrap.min.css.map).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Content\Site.css).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\favicon.ico).
Adding directory (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\fonts).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\fonts\glyphicons-halflings-regular.eot).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\fonts\glyphicons-halflings-regular.svg).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\fonts\glyphicons-halflings-regular.ttf).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\fonts\glyphicons-halflings-regular.woff).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\fonts\glyphicons-halflings-regular.woff2).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\PrecompiledApp.config).
Adding directory (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Scripts).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Scripts\bootstrap.js).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Scripts\bootstrap.min.js).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Scripts\jquery-3.3.1.js).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Scripts\jquery-3.3.1.min.js).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Scripts\jquery-3.3.1.min.map).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Scripts\jquery-3.3.1.slim.js).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Scripts\jquery-3.3.1.slim.min.js).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Scripts\jquery-3.3.1.slim.min.map).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Scripts\jquery.validate.js).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Scripts\jquery.validate.min.js).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Scripts\jquery.validate.unobtrusive.js).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Scripts\jquery.validate.unobtrusive.min.js).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Scripts\modernizr-2.8.3.js).
Adding directory (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Views).
Adding directory (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Views\Home).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Views\Home\About.cshtml).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Views\Home\Contact.cshtml).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Views\Home\Index.cshtml).
Adding directory (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Views\Shared).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Views\Shared\Error.cshtml).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Views\Shared\_Layout.cshtml).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Views\Web.config).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Views\_ViewStart.cshtml).
Adding file (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp\Web.config).
Adding ACLs for path (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp)
Adding ACLs for path (C:\Users\KAI JIN NG\source\repos\Prototype_11\Prototype_11\obj\Debug\Package\PackageTmp)
Adding declared parameter 'IIS Web Application Name'.
Package "Prototype_11.zip" is successfully created as single file at the following location:
file:///C:/Users/KAI%20JIN%20NG/Documents/dll/Prototype_11
To get the instructions on how to deploy the web package please visit the following link:
https://go.microsoft.com/fwlink/?LinkId=124618
Sample script for deploying this package is generated at the following location:
C:\Users\KAI JIN NG\Documents\dll\Prototype_11\Prototype_11.deploy.cmd
For this sample script, you can change the deploy parameters by changing the following file: 
C:\Users\KAI JIN NG\Documents\dll\Prototype_11\Prototype_11.SetParameters.xml

1 个答案:

答案 0 :(得分:0)

有一种方法可以使用JS隐藏html以重新填充html代码,但我找不到它,但是对于js部分,请尝试以下解决方案:

//------------------------------
function unloadJS(scriptName) {
  var head = document.getElementsByTagName('head').item(0);
  var js = document.getElementById(scriptName);
  js.parentNode.removeChild(js);
}


//----------------------
function unloadAllJS() {
  var jsArray = new Array();
  jsArray = document.getElementsByTagName('script');
  for (i = 0; i < jsArray.length; i++){
    if (jsArray[i].id){
      unloadJS(jsArray[i].id)
    }else{
      jsArray[i].parentNode.removeChild(jsArray[i]);
    }
  }      
}