Blazor WASM TOML Error

Hi,

I am having a problem with a test Blazor WASM application that i have deployed.

Everything appears to be working with the exception of the SPA redirect

This is my netilfy.toml file

[[redirects]]
  from = '/*'
  to = '/index.html'
  status = 200

i have also tried

[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200

In the deploy post processing section the following is logged

11:23:17 AM: Incorrect TOML configuration format: parse error on value "" (error)
11:23:17 AM: Skipping form detection
11:23:17 AM: Incorrect TOML configuration format: parse error on value "" (error)
11:23:17 AM: Incorrect TOML configuration format: parse error on value "" (error)
11:23:17 AM: Incorrect TOML configuration format: parse error on value "" (error)
11:23:17 AM: Post processing - header rules
11:23:17 AM: Incorrect TOML configuration format: parse error on value "" (error)
11:23:18 AM: Site is live ✨
11:23:19 AM: Incorrect TOML configuration format: parse error on value "" (error)
11:23:17 AM: Starting post processing
11:23:17 AM: Post processing - redirect rules
11:23:17 AM: Incorrect TOML configuration format: parse error on value "" (error)
11:23:17 AM: Post processing done
11:23:17 AM: Section completed: postprocessing

I’m not sure what the problem is, does anyone have any ideas ?

Rather than use the toml file for the redirect i have added a _redirects file with the following (i have removed the toml file)

/* /index.html 200

The deploy is picking up the redirect rule as it states

1 redirect rule processed without errors

but when manually navigating to a page netlify’s 404 page appears.

This is the url of the app

https://aesthetic-bombolone-ed252e.netlify.app/

with works file, when you click the Sign In option you are taken to the login page

https://aesthetic-bombolone-ed252e.netlify.app/login

but if you navigate directly to the above page without going via the link you get the 404 ?

I know this has something to do with the redirect but i am not sure what i’m missing here.

The current deploy has the following redirect:

/* / 200

I’m not sure if that’s supposed to work, but if you have a deploy with your previous attempts, we’d be happy to check.

Hi hrishikesh,

thanks for the reply. added a _redirects file to the project rather than use the toml file to see if that would get the redirect working. It appears the redirect rule has been accepted but when you directly navigate to a page for example the login page i am presented with the netlify 404 error.

I have used the redirects file in the past for a react project and that works as expected, but in this case it does not appear to be carrying out the redirect

image

I’m still not seeing the correct redirect processed:

/* / 200

You’ll wanna update that redirect to:

/* /index.html 200

I will give that a try again, did that initially but it didn’t work either.

I modified the _redirects file an deployed the site but another issue has occurred that is causing the app to fail.

Whilst try to get this working with Netlify i also created a deploy on Azure, that appears to be working as expected without any additional files or configuration so for the time been i will continue going down that route.

Thank you to the people who have tried to help with this, but it is just far easier to use Azure for this project by the look of it.