7
Answers

Error Upload file when this web was up host

toanhoi bui

toanhoi bui

13y
3.2k
1
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)