This is a migrated thread and some comments may be shown as answers.

Gird.razor in client project in Visual studio 2019

1 Answer 44 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
hugues viens
Top achievements
Rank 1
hugues viens asked on 06 May 2020, 07:21 AM

Hi, 

I was testing the creation of a new project in visual Studio 2019, using the template : CRUD, form, chart - Client App. (Telerik UI for Blazor 2.12.0)

All the solution creation is ok. After, i define the Client project as Startup project, to test it but after F5, when i want to check the page GRID.RAZOR, the datas are not loaded. The call to the WeatherForecast service sent the reponse as text/html instead of Json. 

I didn't "touch" any code and in the service, Http.GetFromJsonAsync is used. 

Can anyone help me to understand why then content-type is not fine ?

Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 06 May 2020, 07:33 AM

Hi,

You must set the Server project as the startup project, not the Client project. That's how we generate the project by default and you do not need to alter anything in order to run it. WebAssembly apps that are hosted in an ASP.NET Core project must start the server project, the Client project boils down to a set of static files.

 

Regards,
Marin Bratanov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
General Discussions
Asked by
hugues viens
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or