Application Error:
“ASP.NET v4.0” does not have the authority to perform the requested command or operation.”
Problem:
ASP.NET v4.0 application has no right to access DB2 database with default application user.
Solution:
- Login on to server where your application is hosted
- Create new local user account (myuser, myusrpwd)
- Add myuser account to DB2ADMNS, DB2USERS and IIS_IUSRS groups
- Open IIS Manager (Start – inetmgr – Enter)
- Select Default Web Site
- In Default Web Site Home screen, double click Authentication
- Right-click ASP.NET Impersonation and Enable it. Right-click it again and Edit it. Check Specific User: and click Set… button. Enter username and password for the specific user (myuser). Click OK.
<identity impersonate="true" password="myurspwd" userName="myuser" />
- Save and x-out Web.config file.
- Build and Publish your application.