Write your own C # framework (25) from scratch-website deployment,

Source: Internet
Author: User

Write your own C # framework (25) from scratch-website deployment,
Navigation

1. Disable access protection 2. Publish a website 3. Copy a website to a server 4. Add a new website 5. Set Website access permissions 6. Set folder access permissions 7. Control updatable folder execution Permissions 8. Set "application pool ". net version and mode 9, attach Database 10, add Database Access Users 11, set database links

 

 

For the secure deployment of websites, please refer to the server security deployment document I wrote earlier, which has basically mentioned server-related security settings, as shown in the preceding figure, hackers generally initiate slow attacks (except for code vulnerabilities). The deployment in this chapter is based on the settings in this article.

 

1. Disable access protection

  Open the security protection software and disable access protection (because of the policy, the dll and exe files cannot be created on the server without authorization. If the dll files of the website cannot be copied to the server without being switched off)

  

 

2. Publish a website

Open solution, right-click the Web Project, and click "publish" in the pop-up menu"

  

Select the file system as the release method and click the release button to release the website.

  

Copy the folder content in the red box to the successfully published folder (because these folders are not included in the project, they are not released together at the time of release-this is done to open the solution, without loading too much content, the solution is too slow to open, affecting VS performance)

  

This is the post-release folder, and the red box is the copied folder.

  

  

 

3. Copy the website to the server

Copy the successfully published folder to the server, enter the bin folder, and delete the pdb file.

  

 

4. Add a new website

  

If the operation is performed locally and the host is not modified, do not enter the host name. If the operation is performed on the server and you have your own domain name, enter your own domain name in the host name.

  

 

5. Set website Access Permissions

Double-click "authentication"

  

In the displayed window, select "Anonymous Authentication" and click "edit"

  

Select "application pool ID"

  

 

6. Set folder Access Permissions

Right-click the newly created website and click "Edit permission"

  

Select the "Security" tab and click "edit"

  

Then click Add

  

Enter the application pool name "IIS AppPool \ www.test.com" in the blank space and click "OK". (For some sites, you may need to add Authenticated Users for normal access)

  

The application pool access permission is added. The permission cannot be granted with the modification permission.

  

 

7. Control the executable permissions of updatable folders

When configuring the website folder, we must ensure that "the executable folder has no execution permission, but the executable folder has no write permission" to make the website more secure.

Although not all folders in the red box can be written, they are all set to no execution permission because they are all files that do not need to be executed.

Select a folder, and double-click "handler ing" on the right"

  

Click "Edit function permission" on the right"

  

Remove the check box before the script

  

Then, grant the write permission to the two folders Data and UploadFile that require write permission in our framework.

Right-click the folder and click "Edit permission".

  

Click "edit" in the "Security" tab.

  

Grant the "modify" permission to the application pool name www.test.com you just added.

  

 

8. Set "application pool". net version and Mode

  

Set it to. net4.0 + Classic Mode

  

 

9. Additional database

Add database to server

  

Open the Database Manager, right-click "Database", and click "add"

  

Then attach the database

  

 

10. Add a database access user

Open Security = Login Name

Right-click the menu and click Create Login Name

  

Enter the login name, password, and select the default database

  

Select "User ing", check the "SolutionDataBase" database, and set the database role member identity (this feature is often automatically checked when you create a database. In fact, this feature is not selected, you need to click "OK" and then re-open it. This should be a Bug in MsSql)

  

 

11. Set database links

Then you can open the Web. config file on the server to create a website, set the database connection username and password to the database access username and password you just created, and then open the browser to access the website normally.

 

 

Release the final update solution:

Updated "directory and file description" in Data Dictionary"

Fixed the following Bug: The information list cannot be queried by adding conditions; fixed the problem that true strings could not be identified when the ConfigHelper class (configured to read) obtained the boolean type; fixed the problem where new employees are identified as resigned.

Starting from scratch, I wrote a complete csharpframework solution: 20140718.rar

 

 

Copyright:

This article was originally published by AllEmpty and published in the blog Park. You are welcome to repost it. You must keep this statement without your consent and provide the original article link clearly on the article page,Otherwise, the right to pursue legal liability is reserved.. If you have any questions, you can use1654937@qq.comThank you very much for contacting me.

 

As long as you are interested in learning and making progress together, you can add Q group: 327360708 to this topic.

 

For more information, please refer to blog: http://www.cnblogs.com/EmptyFS/


How to Learn programming from scratch

Buy an assembly language in the bookstore to learn it. There is no problem with the basics. I learned assembly language in my freshman year, which is similar to your situation. So I may not necessarily learn any advanced mathematics. Assembly mainly started here, mainly to achieve conversions between the hexadecimal, memory structure, DEBUG, addressing mode, and command system. It will be much easier to learn later. Assembly languages are harder to learn than other languages, but assembly languages are more powerful than other languages, such as viruses. Many of them are compiled in assembly. Recommended Assembly Language
 
How to Learn C language from scratch

Don't be fooled by the training center. When I was a freshman, I was fooled by three hundred. However, when I finally passed the course, I learned how to buy a book and set up a computer, VC ++ 6.0 1 download 1 installation, video, PPT, WORD and other tutorials 1 download a little bit every day, and then do the examination online and offline questions. If you do not understand the Internet, please give answers to the experts!

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.