How to deploy VS2010. NET projects to iis7.5

Source: Internet
Author: User

a few days ago a virtual cloud host, installed Windows Server, intends to be a sophomore in C # when the small web site to deploy to IIS, before the VS inside directly debugging look at the site effect, did not expect to deploy to IIS is quite troublesome, a lot of errors, After querying the various materials have consulted the teacher, hereby tidy up the detailed process.
First, the VS project folder is the solution, with the. sln file, which needs to be published as a Web file (now think it's ridiculous that I didn't know that it was just a tool)


Install IIS7.5, programs, and features on Windows7-turn Windows features on or off.



Attention! In the application development function, be sure to select the ASP, the other default.



Add a Web site and select a good folder.


Stop the default website directly.


To edit the application pool, depending on the. NET version you used with VS, the vs2010 I used was. net4.0, select. Note that there is a managed pipeline pattern chosen to be classic, or one will go wrong (this is not understood here why??? )。


OK, start visiting the website!


HTTP error 500.19-internal Server error
The requested page cannot be accessed because the associated configuration data for the page is invalid.
Configuration error Unable to read configuration file due to insufficient permissions

This time found that the error, insufficient file permissions, indicating that our website folder can not be called by IIS do not have permissions, then you need to add permissions to the folder, if you do not know who to add this time the simplest way is to see the default Web site folder has what users permissions, then found to add Iis_ Iusrs this permission

Refresh!


HTTP Error 401.3-unauthorized
You do not have permission to view this directory or page because of the Access Control List (ACL) configuration or encryption settings for this resource on the WEB server.


Add permissions or this problem, ask the teacher know also need to add IUSR this permission


Refresh again!



HTTP Error 404.17-not Found
The requested content appears to be a script and therefore cannot be handled by a static file handler.

Find. NET unable to execute, when clicking on the server, open ISAPI and CGI restrictions.

if the. NET version you need is not allowed to be allowed, if the required version is not in it, then you need to register and enter it in the run c:\windows\microsoft.net\framework\v4.0.30319\aspnet_regiis.exe–i
Now see. NET 4.0 already, change to allow




Refresh again!


Success!

In addition, there are some situations that need to be noted:

HTTP Error 403.14-forbidden
The WEB server is configured to not list the contents of this directory.

This is caused by not adding a default document and directory browsing disabled, adding a default document or enabling directory browsing is OK




The "microsoft.jet.oledb.4.0" provider is not registered on the local computer
Exception Details: System.InvalidOperationException: The "microsoft.jet.oledb.4.0" provider is not registered on the local computer.

If you are a 64-bit system that has this error, you need to check the application pool settings, click on the application pool you choose, point Advanced Settings-enable 32-bit applications, change false to True, and try to resolve the issue.


How to deploy VS2010. NET projects to iis7.5

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.