Hello,
How to read the state file blazor_server_side?
You can see my code here:
const string stateFile = "state.bin";
try
{
if (File.Exists(stateFile))
{
message = "Loading state from file";
using (var fs = File.OpenRead(stateFile))
{
//_instaApi.LoadStateDataFromStream(fs);
_instaApi.LoadStateDataFromString(new StreamReader(fs).ReadToEnd());
}
}
}
This code doesn’t work for me and a red line appears under it.
Should I change any part?
thanks,
Saeed