MicrosoftLearning / AZ-204-DevelopingSolutionsforMicrosoftAzure

AZ-204: Developing solutions for Microsoft Azure
https://microsoftlearning.github.io/AZ-204-DevelopingSolutionsforMicrosoftAzure/
MIT License
2.29k stars 1.85k forks source link

Lab 01 - Exercise 2: InvalidOperationException: Invalid Request URI in Contoso Photo Gallery Web App Deployment #818

Closed gisioraelvis closed 2 months ago

gisioraelvis commented 2 months ago

Module/Lab 01: Build a web application on Azure platform as a service offering

Exercise 2: Build a front-end web application by using Azure Web Apps

Task 3: Deploy an ASP.NET web application to Web Apps

Step 21: In the Contoso Photo Gallery webpage

Description of issue

Getting An unhandled exception occurred while processing the request when trying to access the front-end web app.

InvalidOperationException: An invalid request URI was provided. Either the request URI must be an absolute URI or BaseAddress must be set. System.Net.Http.HttpClient.PrepareRequestMessage(HttpRequestMessage request) System.Net.Http.HttpClient.CheckRequestBeforeSend(HttpRequestMessage request) System.Net.Http.HttpClient.GetStringAsync(string requestUri) Web.Pages.IndexModel.OnGetAsync() in Index.cshtml.cs Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory+NonGenericTaskHandlerMethod.Execute(object receiver, object[] arguments) Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync() Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync() Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Rethrow(PageHandlerExecutedContext context) Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeInnerFilterAsync() Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.gAwaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync() Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.gLogged|17_1(ResourceInvoker invoker) Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger) Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context) Repro steps: Click on the default domain to access the web the following error and stack trace is displayed on the page

Relevant screenshots

image

WigF1 commented 2 months ago

Your issue was the configuration didn't include the https:// per the instructions. Your MCT should have clarified this with you. It's not an issue with the labs.

Could you kindly close the issue?

msftnutta commented 2 months ago

close as it's working as designed.