docs icon indicating copy to clipboard operation
docs copied to clipboard

Source code?

Open mrochon opened this issue 3 years ago • 3 comments

Where can I find the source code for the webapp/api?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

mrochon avatar Sep 13 '22 22:09 mrochon

Hi @mrochon, thanks for posting your query here. when you add the new project from Visual Studio 2022, there will be a default template with a minimum baseline source code. For e.g. To create the sample project in Visual Studio, select File > New > Project, select the Web project type, and then the ASP.NET Core Web Application template. You can also search for the template if you need it. this will be your webapp project. Hope it helps.

erjain avatar Sep 14 '22 08:09 erjain

We can close this issue now.

erjain avatar Sep 14 '22 13:09 erjain

The webapp project will not have the api call, in particular how the url is resolved. Perhaps you can at least provide that one line:

        ViewBag.weather = await http.GetStringAsync($"{Environment.GetEnvironmentVariable(\"WebApiBaseAddress\")}/weatherforecast");

Sent from my T-Mobile 5G Device Get Outlook for Androidhttps://aka.ms/AAb9ysg

From: Tarun Jain @.> Sent: Wednesday, September 14, 2022 6:12:45 AM To: dotnet/docs @.> Cc: MariusR @.>; Mention @.> Subject: Re: [dotnet/docs] Source code? (Issue #31143)

We can close this issue now.

— Reply to this email directly, view it on GitHubhttps://github.com/dotnet/docs/issues/31143#issuecomment-1246745793, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAMKCKGAFL7RQHD5FVFJYHLV6HFM3ANCNFSM6AAAAAAQL365KA. You are receiving this because you were mentioned.Message ID: @.***>

mrochon avatar Sep 14 '22 15:09 mrochon

Hi @mrochon, You can refer to the repo https://github.com/dotnet-architecture/explore-docker, which contains the sample project for webapp/api. Let me know if you need more help.

erjain avatar Oct 17 '22 11:10 erjain

Fixed by #30858

IEvangelist avatar Oct 27 '22 12:10 IEvangelist