user145610
user145610

Reputation: 3025

The file provided is not a valid service package. Detailed error code: InvalidOperationException in azure

We have to update web.config entry of Azure package file which got deployed into production environment. We dowloaded cspkg file and unzipped the content and modified our web.config and did compressed back to zip and changed extension to cspkg . When we upload package , we r recieving error below "The file provided is not a valid service package. Detailed error code: InvalidOperationException in azure"

Any one is having idea on this matter?

Upvotes: 0

Views: 1560

Answers (3)

Amogh Natu
Amogh Natu

Reputation: 881

Use cspack.exe to regenerate the package. Use the below command.

cspack.exe "path_to_csdef_File\ServiceDefinition.csdef" /role:<RoleName>;<path_to_Binaries\approot> /out:D:\NewPackage.cspkg /rolePropertiesFile:<rolename>;<path_to_entry_point_file\entrypoint.txt> 

Detailed steps to regenerate package are mentioned in this post.

https://web.archive.org/web/20160910170824/https://amoghnatu.net/2016/09/08/recreate-azure-cloud-service-package/

Upvotes: 1

user145610
user145610

Reputation: 3025

I fixed my issue my self, followed the instruction in msdn. I unzipped it and did packaging using cspack tool

Upvotes: 1

Sandrino Di Mattia
Sandrino Di Mattia

Reputation: 24895

'Tampering' with the cspkg file is not supported . Try re-creating a new cspkg file using CSPack.

Upvotes: 1

Related Questions