Not getting a usable URL from curl -X POST cmdlet

Wesley Sherwood 45 Reputation points
2024-02-08T22:29:18.1933333+00:00

So I am working through "AZ-104: Implement and manage storage in Azure," and I am stuck on the exercise portion of the "Control access to Azure Storage with shared access signatures" module.

I've run all the commands and setup the JSON as directed, but when I run the "curl -X POST http://localhost:8888/openPort/8000;" cmdlet I only get cd sasopen","url":"https://ux.console.azure.com//proxy/8000/" as a result.

I am unable to progress through the next section after running the "cd sas dotnet run" cmdlet since I don't have a proper url.

I was getting a "there are no credentials provided in your command" when creating a storage container and blob. Would that be why I'm having this issue? How do I correct this issue to finish the section?

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.
939 questions
{count} votes

Accepted answer
  1. TP 76,681 Reputation points
    2024-02-14T02:16:17.5+00:00

    Hi Wesley,

    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.

    -TP

    3 people found this answer helpful.

3 additional answers

Sort by: Most helpful
  1. Reen Ahmed Aboelanain 5 Reputation points
    2024-03-26T11:30:01.2733333+00:00

    I can't choose the answer please help me

    1 person found this answer helpful.

  2. Rajesh Mulapulli 0 Reputation points
    2024-02-09T20:33:07.7166667+00:00

    I am working through the same in the az104 learning path - 'Exercise - Use shared access signatures to delegate access to Azure Storage'. I get the same error as mentioned by Wesley. Below are the details.
    When i issue the command 'curl -X POST http://localhost:8888/openPort/8000;', I get the below response. {"message":"Port 8000 is open","url":"https://ux.console.azure.com//proxy/8000/"} This url is not reachable (using browser) after starting the web application using the command dotnet run


  3. AmaranS 2,675 Reputation points Microsoft Vendor
    2024-02-12T07:57:34.9366667+00:00

    Hi Wesley Sherwood,

    Thank you for reaching out to Microsoft Q&A forum.

    It seems like you're trying to create a Shared Access Signature (SAS) for an Azure Storage resource and access it locally using a port forwarding mechanism.   

    Let's break down the steps and see if we can identify the issue:  

    1.Check your SAS token creation to ensure it's done correctly and has the necessary permissions.

    2.Confirm your port forwarding setup to make sure it's directing traffic to your Azure service, not a proxy.

    3.If you're getting a credential error, double-check that you're logged into Azure and have the right permissions.

    4.Retry your commands and pay attention to any error messages for clues.

    Please inform us if the problem persists, and we'll be happy to offer further assistance.

    If the provided solution has helped in resolving the issue, please consider accepting it by clicking on the "Accept answer" button to enhance visibility of this question for other members of the Microsoft Q&A community.

    Thank you.