简体   繁体   English

你能编辑aspx html内容吗

[英]Can you edit aspx html content

Is is possible to edit the raw html content of a deployed .aspx page without recompiling or redeploying? 是否可以在不重新编译或重新部署的情况下编辑已部署.aspx页的原始html内容?

For example say I have a deployed .net 4.6 aspx website. 例如,说我有一个已部署的.net 4.6 aspx网站。 If i give someone FTP access to the .aspx files on the server can that person edit and update the layout of html elements without recompiling? 如果我允许某人通过FTP访问服务器上的.aspx文件,那么该人可以在不重新编译的情况下编辑和更新html元素的布局吗?

This might occur when a website is deployed onto a web host and a 3rd party contractor is requested to help improve the gui without being giving full access to the .sln file [eg c#\\wcf\\classes etc..]. 当将网站部署到Web主机上并且要求第三方承包商帮助改善gui而又没有完全访问.sln文件(例如c#\\ wcf \\ classes等)的情况时,可能会发生这种情况。

Yes, this is possible. 是的,这是可能的。

.aspx files are not precompiled (unless you specifically say so, in which case you won't see them on the server). .aspx文件未预编译(除非您特别声明,否则在服务器上将不会看到它们)。

One thing to keep in mind is that every time you change an .aspx-file, it will be recompiled the first time it's requested. 要记住的一件事是,每次更改.aspx文件时,它将在第一次请求时重新编译。 Also after a number of changes (I belive this to be 20), the application pool will restart. 同样,在进行了许多更改(我相信这是20个)之后,应用程序池将重新启动。

These page recompilations and apppool reboots could impact performance on your site. 这些页面重新编译和apppool重新启动可能会影响您网站的性能。

Apart from that the usual guidelines apply and I would advise not to do this: 除此之外,通常的准则也适用,我建议不要这样做:

  • the changes won't be synced back to your local repository 所做的更改不会同步回您的本地存储库
  • You have little control or testing over the changes 您几乎无法控制或测试更改
  • You have no backups of these changes 您没有这些更改的备份

似乎应该可以编辑已部署的aspx文件,只是要知道更改将不会显示在用于部署它们的解决方案文件中,而只会在进行编辑的设备上可见。

yes, according to my experience, we can change .aspx, .cshtml, .html, .css and any image file in the host server if we have access to that server. 是的,根据我的经验,如果可以访问主机服务器中的服务器,则可以更改.aspx,.cshtml,.html,.css和任何图像文件。 Solution do not need to be compiled to change all these files because we upload directly these files on the host server. 无需编译解决方案即可更改所有这些文件,因为我们直接将这些文件上传到主机服务器上。 So for any change on these file either on our local machine or on host server, we can just copy and paste file from either location using remote connection to synchronize manually. 因此,无论是在本地计算机还是在主机服务器上对这些文件进行的任何更改,我们都可以使用远程连接从任一位置复制和粘贴文件,以手动进行同步。

Only For all .cs file we only upload a dll file so solution need to be recompiled before uploading for any changes of class file. 仅对于所有.cs文件,我们仅上载dll文件,因此在上载类文件的任何更改之前,都需要重新编译解决方案。

So, if third party make any changes on host file like .apsx, .css. 因此,如果第三方对主机文件(如.apsx,.css)进行了任何更改。 image file then these can be copied to the local machine directly to override the old one and checkin to the repository. 映像文件,然后可以将它们直接复制到本地计算机以覆盖旧的文件并签入存储库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM