Rob Lyndon
Rob Lyndon

Reputation: 12691

invalid service definition or service configuration

I have a standard Azure build -- one web role, one worker role. After the latest merge, it has decided that the roles are invalid. When I double click on the web role or worker role, or when I right click and choose "Properties", I get a grey screen saying "Invalid service definition or service configuration. Please see the Error List for more details". However, there is nothing at all in the Error List.

I have cross-compared the Settings elements and tried commenting out sections of the csdef and cscfg files, but nothing seems to bring the roles back to life. I have wasted half a day on this already. My question is not so much "What is wrong" -- more like, how on Earth are you supposed to find out what the error is when no information is given and successive blanking out of code draws a comprehensive blank?

Upvotes: 5

Views: 4241

Answers (4)

Sunny Sharma
Sunny Sharma

Reputation: 4954

Check if the VM Size specified in the configuration is Small or Extra Small as it doesn't support more than that on local emulator. In my case it was defaulted to Standard Size VM. I changed the size to Extra Small and it started working fine!

Upvotes: 2

MattM
MattM

Reputation: 1289

I just ran into this after adding a new Worker Role project to an existing cloud service with a few existing Worker Roles.

In my ServiceConfiguration.Cloud.cscfg, I had a <NetworkConfiguration> tag in between the old roles and the new role. This was the problem. I simply moved the <NetworkConfiguration> tag to the bottom as it was before (this tag is not in my ServiceConfiguration.Local.cscfg file, which might've been the problem).

Probably not the most common cause of this problem, but figured I'd post on the off chance someone has similar settings.

Upvotes: 1

Lars
Lars

Reputation: 10092

I've run across this a couple of times (VS 2015 Enterprise). Simply closing and re-opening the solution resolved the issue.

Upvotes: 11

Rob Lyndon
Rob Lyndon

Reputation: 12691

In this case, nothing was wrong with the csdef and cscfg files. It was the way the wadcfgx files were linked to the roles.

I'm on a branch that is using Azure 2.5; the other branch is on a previous version of Azure, that uses the older version of diagnostics. By deleting the existing wadcfgx files and re-generating them, I was able to make the roles visible and editable again. Having different versions on different branches does, of course, open a very large can of worms, but we're stuck with that difficult situation for the time being.

Upvotes: 7

Related Questions