Blazor Webassembly project calling REST API - rest

I created a Blazor WebAssembly application and tried calling an external weather API for testing purposes. I put an XUnit test project in front of the WeatherService class that I created and the test execute successfully giving me the data.
When I run it from a Blazor component I see in the F12 developer tools console that the REST call executed.
But I see a bunch of errors in the Console.
It does not load the data on the page as expected. Has anyone faced this situation. I am running the latest template of the Blazor App built using VS 2019.
Also my Blazor Web Assembly app is not hitting any breakpoints, so I dont really know at what stage it is breaking.

Related

VSCode - Shows Deploy to Function App, instead of Deploy to Web App for blazor (ASP.Net) webapp

VSCode sees my Blazor server app as an Azure Function. Right-clicking on my publish folder I only have the option to Deploy to Function App, instead of Deploy to Web App which logically shows me only my function apps from azure. How is this determined by VSCode? I have checked the project file, but I do not see anything obvious wrong.
I tried Googling this, but the search terms only brings me to tutorials where this problem does not exist.
I was missing the Azure Web App extension. Once that was installed, the option appeared

Azure App service gives default page after re-running ARM template

I am new to Azure Cloud and started working on App services. I created an app service through ARM templates from Azure Devops. Once done, I get the default page which is expected
Now, I deploy a sample react application to the App service and I see the application. However, when I re-run the ARM template, it takes me back to the default page. I am unable to understand why a re-run of ARM takes me back to the default page instead of my react app.
What can I do to have my react app up even after ARM template re-run? Is there any point I am missing?
I deleted my previous app service and re-did everything. Now, my application stays as is even after re-deploying the ARM template. Not sure what went wrong, the first time

Best way to invoke a console application and keep it running using VSTS vNext release

I'm trying to deploy a visual studio solution which has a WebApi ,Several dependent application and a console application, there are no issues in deploying of WebApi , issue is with Console Application.
I'm using deployment agent group template which does IIS web app deployment for WebAPI project and using copy files task to copy paste to copy console application to target server. For both WebApi and Console Application target server is same.
Soon after copy I've task to invoke Console Application, problem here is Application opens and close immediately . I've tried with cmd line task, batch script and powershell script in all the ways output is Same.
But I expect the console app to keep running , so kindly throw some light on this.

Making a GWT app work on my mobile using phoneGap

When you create a GWT app you can run it as a web application and point your browser to the home page and it works. Now, in this case your browser is being served the Javascript from the server and thus all calls to the server from your Javascript work fine.
But, if you then take the generated Java script and rather than have it server from the server just have it saved locally how would you go about getting your server calls to work. Say your server is running on localhost how do you get this to work. What I am trying to do is take a working GWT app and extract the generated Java script and wrap this in a phoneGap enabled app but I can't get my server calls to work.
Instead of trying adhoc approach. You should be looking at options provided by MGWT and PhoneGap - Reference http://www.m-gwt.com/.

Deploying Hybrid ASP.NET webform and MVC project on iis7 - MVC Routing does not work

Hi Stackoverflow,
Im trying to deploy a hybrid ASP.Net Webform/mvc-project onto iis7 but the mvc routing does not work.
This is what i have done so far:
Added all required mvc-related dlls.(i have double checked bin-catalog to make sure that everythings there on the deployed installation)
Added MVC wildcard by adding the IsapiModule handler to iis handler mappings.
The Server has .Net-Framework 3.5 SP1 installed.
The web site Managed pipeline mode set to classic
Our project requires the app pool to be running in none-integrated pipeline, but im not sure what MVC requires of the app pool, may i run ASP.NET MVC(2) in a none-integrated managed pipeline?
The web application loads and i want to use the MVC-routing to load javascript but the mvc routing does not responde to the request and instead Webforms gives us a 404-response,
this only happens when the project has been deployed onto the server.
Does anyone has a idea of why the ASP.Net MVC routing does not fire?
Thanks and Best regards,
Mikael
I found the error, the installer did not update production web.config,
so there was some missing mvc-required references,
i used this article to find out what was missing, it describes how to setup a hybrid WebForm/Mvc project in a simple way.
And now im able to run a hybrid webform/mvc-project on iis7 classic without any problem.