How's it going.
I'm trying out Radzen w/ Blazor. I have the latest Win/VS2019 updates.
I am failing to return the data in my grid:
I've made a WASM app in Radzen. I have two data sources, one is an Oracle production DB. Another is a rest service I created yesterday.
Here's the working output from my REST api (which is internet facing/available today w/ no security)
{
"ShowName":"Adobe Max ",
"ShowBeginDate":"2019-11-01T00:00:00",
"ShowEndDate":"NOV 08, 2019",
"ShowBeginDay":"FRIDAY ",
"ShowBegTime":"700",
"ShowEndDay":"FRIDAY ",
"ShowEndTime":"1130",
"SUBEGDate":"DEC 31, 1899",
"SUENDDate":"DEC 31, 1899",
"SUBEG_Day":"SUNDAY ",
"SBEDT":"0",
"SBETT":"0",
"SUENDDay":"SUNDAY ",
"SENDT":"0",
"SENTT":"0",
"TDBEGDate":"DEC 31, 1899",
"TDENDDate":"DEC 31, 1899",
"TDBegDay":"SUNDAY ",
"TBEDT":"0",
"TBETT":"0",
"TDEND_Day":"SUNDAY ",
"TEDDT":"0",
"TENTT":"0",
"PVBEGDate":"DEC 31, 1899",
"PVENDate":"DEC 31, 1899",
"PVBEGDay":"SUNDAY ",
"VBEDT":"0",
"VBETT":"0",
"VENDDay":"SUNDAY ",
"VENDT":"0",
"VENTT":"0",
"PRBEGDate":"DEC 31, 1899",
"PRENDDate":"DEC 31, 1899",
"PRBEGDay":"SUNDAY ",
"PBEDT":"0",
"PBETT":"0",
"PRENDDay":"SUNDAY ",
"PENDT":"0",
"PENTT":"0"
}
OData/Oracle is working great! I need to use the above rest though.
I can return json if I go to website dot com /annotator2020rest/api/abstract/2019/228619
2019 is a show year to filter by, and 228619 is a unique identifier for a show that recurs once a year.
The API/rest does not live in the Blazor project. It's on an IIS 08 dedicated server.
Here is how my DataSource is set up:
https://imgur.com/a/e29u3Ln
No auth. for now.
My resource settings are in that imgur album link I posted above (it's at the bottom)
I have Abstracts.items as an array of Abstract. Great, isn't that all I need to pull the json into a datagrid?
Then it finishes with my errors, and I go to my grid to set it up in the design view in Radzen. On the imgur link, its the first/top image w/ the load events.
OK well the preview got me excited. I selected the only possible choice under the Data drop down, GetAbstractResult.
The preview grabbed my column names and looks awesome.
The app first fails because
the having two '//' in a row in a URI is invalid. OK, I'll edit the endpoint even tho the example had this in.
I had two // in the HTTPs:// part. .NET didn't like that. OK, I just removed the https:\ and it compiled/ran.
Hey it's running! Data isn't coming through, though.
So I start debugging the client.
After entering the GetAbstract method in my AbstractService.cs file, the uri in this photo is way wrong.
Why is there a local host prefixed to my webserver.com/annota... ?
The Rest API does not and will not live in this app. It's on my company's web server.
Any idea how to even begin looking for the fix?
www.radzen dot com /documentation/rest/
I followed this to a tee (which errors if I don't fix the broken example for me)
Edit: Here's the error message that is caught on the razor.designer.cs file of the erroring page
imgur dot com /a/x6ZbSJh
Error text:
''<' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.'
Notice the "<'? What in the ??? is going on here?
Edit 2:
OK the baseUri which is fed into the request below is seemingly appending the navigationManager.BaseUri with the rest of the value I added into Radzen as the endpoint. BUT its missing the first letter. What the hell? I had to go into the data source, and add a space first. It's presumably doing a SubString(1, str.Length) or something and skipping the first character (0)? Maybe I should submit a bug report?
So it's doing localhost+mydomain/rest/endpoint to create this mess? Why??? I don't see a > or " character though. If I manually change this/hard code it and run it in IIS/VS2019 the app still builds, but will not load. What the hell. Is Blazor/Radzen too young at the moment?
Shouldn't the base uri be the literal endpoint since it's a REST service?
Here's the screen/error I get when trying to hard code the uri to the end point.
i.imgur dot com /djEbhWs.png
Edit 3:
MS Documentation excerpt on NavigatingManager.BaseUri:
Gets or sets the current base URI. The BaseUri is always represented as an absolute URI in string form with trailing slash. Typically this corresponds to the 'href' attribute on the document's element.
I didn't see an href anywhere but the " and < issues MUST be related surely!!!! Where to look? Getting closer
Edit 4: Here is some more detail for my page's load event.
imgur dot com /a/2BuO1H4