Last post Mar 08, 2021 03:20 AM by Saeed57
Member
2 Points
28 Posts
Mar 08, 2021 03:20 AM|Saeed57|LINK
Hello,
How to read 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
Member
2 Points
28 Posts
How to read state file blazor_server_side?
Mar 08, 2021 03:20 AM|Saeed57|LINK
Hello,
How to read 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