No longer possible to get a valid url to access site for a dotnet exercise on storage account using sas, due to a probable proxy change in Azure

David GORGETTE 61 Reputation points
2024-09-01T16:18:54.1666667+00:00

Hi,

I just wanted to signal that the result of the following exercise (Controll access to Storage account using SAS) can't be obtained, due to a probable change in Azure, as the command :

$ curl -X POST http://localhost:8888/openPort/8000;

returns the following in cloud shell :

{"message":"Port 8000 is open","url":"https://ux.console.azure.com//proxy/8000/"}

And not a url of a gateway to access the web app running in the cloud shell with the following format

{"message":"Port 8000 is open","url":"https://gateway11.northeurope.console.azure.com/n/cc-4016c848/cc-4016c848/proxy/8000/"}

Also notice, that in this exercise, dotnet 7.0.400 is required and needs to be installed or the version of the app in the code changed to a more recent one.

Here is the error it displayed.

dotnet run
The command could not be loaded, possibly because:
  * You intended to execute a .NET application:
      The application 'run' does not exist.
  * You intended to execute a .NET SDK command:
      A compatible .NET SDK was not found.
Requested SDK version: 7.0.400
global.json file: /home/USER/sas/global.json
Installed SDKs:
8.0.401 [/usr/share/dotnet/sdk]
Install the [7.0.400] .NET SDK or update [/home/USER/sas/global.json] to match an installed SDK.
Learn about SDK resolution:
https://aka.ms/dotnet/sdk-not-found

I was able to resolve that issue however with the following
user [~]$ is just a pseudo display I added.

user [ ~ ]$ wget https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh
user [ ~ ]$ chmod +x dotnet-install.sh
user [ ~ ]$ ./dotnet-install.sh --version 7.0.400

(I don't deserve credit for this solution, suggested via Copilot : source of solution )

This question is related to the following Learning Module

Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
1,503 questions
{count} votes

Accepted answer
  1. AmaranS 5,935 Reputation points Microsoft Vendor
    2024-09-02T10:25:58.6566667+00:00

    Hi David GORGETTE,

    Unfortunately Web Preview for Azure Cloud Shell (this is underlying feature for step #10) seems to be broken. I tested it using method in the exercise as well as using the GUI, using sandbox as well as paid subscription, and it doesn't work in any case. I've tested several times over multiple days since you asked your question.

    If you would like you could use ngrok (third party tool that does same thing) instead. To sign up for their free level account you only need to give name, email, and then confirm email account by clicking link. To use it instead of Web Preview it takes about 10-30 seconds to install in Cloud Shell and then you would be ready to use it for Step#10 of the exercise.

    I'm putting together steps/screenshots to use ngrok instead of Web Preview as a substitute for step#10 until Web Preview functionality is fixed.

    If you don't want to use third party tool, then I recommend reading over the exercise and making sure you understand what each step is supposed to do for learning purposes. If you have any questions in this regard add a comment below and I would be happy to explain what is going on.

    Please click Accept Answer and upvote if the above was helpful. Please add a comment if anything is unclear.

    Thanks.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.