Access to the path 'C:\Windows\System32\ is denied

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


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.

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....

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.

Need Your Help

how to Expire Java Application After 1 year?


How to expire Java Application after one year though client have source code with them ?

Check if device is connected to i-net

iphone objective-c xcode nsurlconnection 3g

In need to check if the phone is connected to the internet.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.