访问路径“C:\Windows\System32\”被拒绝
我为某人写了一个网站,并想在两个月后禁用它。
(因为他应该在两个月后付款,否则我应该把它炸掉)
因此,我从我的网站调用了 DateTime WebService 来获取 DateTime.Now!
我应该将网站启动时间保留在他的服务器中的某个位置,并且我想在 C:\Windows\System32 中写入一个文本文件。
但是当我尝试在此路径中写入文本文件时,出现以下错误:
Access to the path 'C:\Windows\System32\ is denied.
此时我可以远程访问他的服务器并且可以更改权限。
但如果他更改服务器,他会看到该错误并可以找到该文件并轻松编辑它。
您能告诉我一种修复该错误的方法或另一种节省网站启动时间的方法吗?(是指在哪里?)
数据库不是一个好主意,因为他可以访问他的数据库。
我可以将该文件写入C盘并更改其属性(隐藏和系统),但他可以轻松找到该文件。
如果您能提供一些帮助,我们将不胜感激
i wrote a website for someone and want to disable it after two mothns.
(because he should pay for it after two months, if not i should blow it up)
so, i called a DateTime WebService from my web site for getting DateTime.Now!
i should keep web site start time some where in his server and i want to write a text file in C:\Windows\System32.
but when i tried to write a text file in this path, i got the error below :
Access to the path 'C:\Windows\System32\ is denied.
at this time i have remote access to his server and can change permissions.
but if he change his server, he will see that error and can find that file and edit it easily.
would you please learn me a way for fix that error or another way for saving web site start time!(mean where?)
database is not a good idea, because he has access to his database.
i can write that file on c drive and change it's attributes (hidden and system), but he can find this file easily.
would be appreciate for some help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你想开始一场“猫捉老鼠”的游戏,无论你尝试什么,总会有人找到解决方法。此外,您限制网站可用性的任何尝试都可能会导致许可代码等方面的错误。
我强烈建议您考虑采用替代方法。不要试图通过技术手段进行任何限制。网站需要支持。提供持续的支持合同。如果您的客户停止付款,他可能仍然拥有该网站,但没有人支持它。
否则,要考虑的另一个选择是您的托管模型是错误的。为您的客户托管网站,然后托管费用就包含在内。它还可以消除您的客户试图规避您添加的任何许可控制的任何技术问题 - 假设您的客户无权访问您的网络主机。
You're looking to start a "cat and mouse" game, and whatever you attempt, someone will find a way around it. Additionally, any attempts you make to limit the availability of the website will likely result in bugs around the licensing code, etc.
I strongly encourage you to consider an alternate approach. Don't attempt to make any limitations through technical means. Web sites require support. Provide a ongoing support contract. If your client stops paying, he may still have the website, but no one to support it.
Otherwise, another option to consider is that your hosting model is wrong. Host the website for your client, and then the hosting contains the expense. It would also eliminate any technical issues with your client trying to circumvent any licensing controls you add - assuming that your client doesn't have access to your web host.
假设您的客户无法访问源,为什么不简单地添加 Google Analytics,您将看到它的使用方式/时间......
Assuming your client does not have access to the sources, why not simply add Google Analytics and you will see how/when it is being used....
我的想法是,您可以创建一个 Web 服务,从您的代码隐藏中调用该 Web 服务,并且该 Web 服务由您在任何其他在线服务器上运行。
此 Web 服务的目的是检查客户/客户的名称,然后可以有一个定制的 XML 文件或文本文件,该文件将搜索该特定客户是否有权继续使用该应用程序或不。
如果您想要一些身份验证等,您也可以在该 Web 服务中使用身份验证。
出于这个原因,我认为您也可以使用 Microsoft WCF 服务。
该 Web 服务也将可供其他客户端和其他项目重复使用。
I have an idea that you may create a Web Service, call that Web Service from your code behind and that Web Service is being run by you on any other online server.
The purpose of this Web Service will be that it will check the Name of the Customer/Client and after that there can be a custom-made XML File or Text file which will search that this specific client is given the access to continue using the Application or not.
And if you want some authentication etc. you may use authentication too in that Web Service.
I think you may use Microsoft WCF Services too for that reason.
This Web Service will be re-usable to other clients and other projects too.