toanhoi bui

toanhoi bui

  • NA
  • 70
  • 207.1k

Error Upload file when this web was up host

Sep 13 2011 9:08 AM
I write a application to upload file and up to host :
http://www.buiductoan.somee.com/default.aspx
My code:
        if (FileUpload1.PostedFile != null)
        {
            String filename = FileUpload1.PostedFile.FileName;
            FileUpload1.PostedFile.SaveAs("C:\\"+filename);


        }
I run success in local host but I run on http://www.buiductoan.somee.com/default.aspx has error :


Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

And


Access to the path 'C:\Untitled.png' is denied.

Can you help me,please?



Answers (7)