Fixing some issues:
1.The AppPool identity was not granted with read/write permissions.