Problem description:
At work, there will always be some such situations from time to time. The program running on development or QA is always good, but the program cannot run in the production environment. I was impressed by the two web projects that used SQL server as the database. One was a webpage access error, and the other was that the drop-down list on the webpage had no results.
Environment: SQL SERVER 2008, IIS, SSRS 2008, Visual Studio 2008, ASP. NET
Solution:
First case:
After publishing a webpage to the production environment, the system will check whether your personal system Logon account has the permission to access the webpage. This permission control is configured in several tables in the database. After configuring permissions for myself and my friends, I found that errors still occurred when logging on to the production environment. In fact, this student ignores the application pool identity account in IIS. In asp.net debug mode, the built-in web server uses its own system account to access the database. After a webpage is published to an IIS server, you must grant the database access permission to the application pool identity account configured in IIS. (Of course, you must grant the access permission of the IIS Web Site to your system Logon account)
Case 2:
The procedure execute permission used in the drop-down list is not granted to the access group. Syntax: grant execute on procedure_nm TO PUBLIC