dotnet Programs Access COM components in Windows 2003 Server

Source: Internet
Author: User
Tags dotnet iis interface ntfs permissions
server|window| Program | access

Today is very happy, the project finally on-line use. Just the problems before the line tortured people exhausted ... But finally solved. In this problem to speak out, I hope to have the need to provide some help to friends ~ ~

Project: Dotnet project, C # Development, the main function is to access the remote interface through COM components.

Operating environment: Windows 2003 Server + IIS6.0 +. Net 1.1

Problem: COM components and systems can be used normally under the WINDOWS2000 operating system, but migrated to WIN2003, the process is jammed when the program calls the component, and sometimes it returns the server unexpected error ~

Cause analysis: First, the component is passed under other operating systems, stating that the component should be fine; registering COM components and Dotnet Project reference methods are correct, and errors are now the step of calling components, and COM components are accessing remote interfaces through IP addresses and ports. Note that there is a remote network connection work, the Internet search for similar problems, most of the articles are the permissions of the component, I also set the article according to the components, IIS access to users and other permissions, have given the maximum permissions, the result is still not the case. It's going to crumble.

Workaround: After a few days of being tortured by this problem, the company contacted Microsoft Customer Support and micro a way to view the security permissions for the application pool in the next IIS6.0. Viewed, in the application pool properties in IIS, there is a default security account "Network Service", or network service, under the Identity tab. The network service is a built-in account in Windows Server 2003 that belongs to the IIS_WPG group and IIS_WPG members have the appropriate NTFS permissions and the necessary user rights, as described in the article on the Microsoft Web site, network Service account with There is sufficient permissions to the process identity that acts as the IIS 6 worker process, as well as access to the network. But do not know why, here the network service has insufficient permissions, resulting in the inability to invoke components to access the remote interface. The solution is to set the IIS_WPG account to read and execute, List folder directories, read, and the Network service requires full control.  Based on the above method, I assign the network service to the group of administrators ^_| | , restart IIS, and then run the program, OK, normal call component ~ ~

So if a friend ever encounters a call to a COM component, consider the permissions of the application pool ~ ~

Refer to the following article: http://www.microsoft.com/china/technet/community/columns/insider/iisi1203.mspx



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.