by this line crmService.UseDefaultCredentials = true; you are using default credentials, this mean that your current logged user information is passed to CRM, so when you develop with your machine and works means that your user (DOMAIN\USERNAME) is a valid CRM systemuser with a security role assigned. When you deploy to the remote server, you need to check that the user that runs the application you are developing is also a CRM systemuser. The alernative is to specify the username & password inside your code.
↧