Asp.net -- the XML file rejects write operations after the website is published.

Source: Internet
Author: User

Struggling for this problem for a day ~ Finally solved... Record

 

After the release, try to modify an XML file. If an exception is caught, "the XML file is denied to be modified" is displayed. No permission is assigned ???

1. Check whether "write" is selected for the virtual directory attribute in IIS ".

2,ProgramIs running completely normally, and there is no problem with adding, deleting, modifying, and querying XML files.

3. After the release, the page is displayed normally, that is, the content in XML can be read.

 

For Internet searches, the "Security" attribute of the XML file should be set separately (right-click the XML file-> "security" tag ).

But the problem arises. Right-click the XML file and there is no "security" tab. What's going on ???

......

It turns out that simple file sharing is used by default.

"My Computer"-> "Folder Options ..." For example, remove the small check box before "use simple file sharing (recommended.

Find the XML file in the released folder and right-click it to view the "Security" tab ~ For example:

Add a user "Everyone (custom)", and select allow "write" for permissions below ".

Verify again, and the modification is successful ~~

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.