While attempting to publish a cloud service, I get: "Error: A security token validation error occured for the received JWT token..."
Asked Answered
B

4

15

I am attempting to publish an Azure cloud service. Approximately 1 hour after beginning publishing, it returns this error. I am publishing through Visual Studio 2013 ultimate.

I am attempting to create a test Orleans-based service (not one of the samples). I have gone through the step-by-step cloud deployment tutorial and can't find anything that I might have missed. I would bet there is something in here though, like setting some connection strings wrong somewhere. I will be going through it again to make sure everything is as it is in the tutorial (unless there is an error there).

Also, I am using a mobile service as the API front end. There could be something in setting this up that's causing issue as well, as it differs from the samples I've looked at.

Beneath answered 20/4, 2014 at 18:12 Comment(11)
I'm struggling with this right now. Did you figure this out?Mack
Apparently it doesn't work with Azure SDK 2.3. If you have 2.3 installed/enabled, you're going to have to change all references in it in your project to 2.2. That includes searching the solution for 2.3.0.0 and replacing it with 2.2.0.0 in the web.config and your actual project files (to fix the references). That's what did it for me.Beneath
Thank you a lot! I'm gonna try this tomorrow because the deployment lasts forever. So, just so I'm clear, I don't have to change my tooling right? Just downgrade all references to 2.2..Mack
I believe that's the case. At least that's what worked for me (and on to other issues, naturally).Beneath
I also double checked and made sure that I had all of the references right and the same (all of the sdk references, etc) in all of the different projects. I think I might have missed one, but Sergey told me directly (through the codeplex Discussions) that 2.3 was an issue.Beneath
What do you mean by 'mobile service API' as the front end? If you're attempting to run the Orlenas client code in mobile service I think you'll run in to some problems.Interlay
Instead of using an ASP.NET Web Role as a ReSTful api for the front end, I have a Mobile Service acting as a ReSTful api. Both of them just convert HTTP methods and Uris to C# calls to Orleans and return JSON responses.Beneath
I don't think the mobile service will have visibility of the internal endpoints you will have configured to talk to the Orleans silos. The front end code needs to live in the same cloud deployment, therefore on a web role. You can actually co-host an Orleans silo on a Web Role, so you can keep your deployment simple and small.Interlay
You can add the Mobile Service as a Web Role in Visual Studio 2013 Update 2 RC. That's an interesting point though, just starting the silo up in the web role as well, instead of having its own worker role. I think that may not be what we go with just because of security reasons though.Beneath
@NateDiamond You might want to post your solution as an answer.Markup
Unfortunately, there isn't really a solution except "Don't use mobile services for now."Beneath
B
4

I think this usually happens when you create a new publish profile or in a slow internet. Things you can try.

  1. Restart Visual Studio
  2. Sign Out and Sign in Again for your Azure Subscription.
  3. Minimize your deployment Package Size

Disclaimer : I have not tried the 3rd point myself yet. Test in staging environment or UAT environment before trying this on production to avoid trouble.

Bagley answered 26/8, 2015 at 12:30 Comment(1)
I also experienced this when publishing my websites over a slow internet connection.Capua
T
2

Here's few things you can try:

  1. Make sure the time stamp match on client and server.
  2. Republish using publish setting you download from Microsoft Azure portal site.
  3. When using Mobile Service, make sure you have 'X-ZUMO-APPLICATION: ' in your HTTP header.
Thorner answered 20/11, 2014 at 16:32 Comment(0)
C
2

Something you can try also is to check the size of all files uploaded and compare them with a "local" deploy. Maybe one or more files could be truncated.

Conundrum answered 29/5, 2015 at 1:53 Comment(0)
G
0

In my case I think it was a slow upload speed that was causing that error when trying to publish directly from VS. I had then to do a Package and upload via the Azure portal and it worked fine.

Greenland answered 2/9, 2022 at 14:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.