Here was my problem...

I can open web.config and .html file in visual studio but unable to get .cshtml or .aspx files from the web

an error pops up simply 'cannot get files from server'

I asked my ISP if there any settings, perhaps Plesk or IIS stopping me?

I've tried two versions of visual studio 2019 and 2022 (latest)

They shrugged and said...

'sorry, couldn't reproduce

solution

The common denominator was Visual studio and I remembered I had this problem before and I fixed it by deleting one of the VS project files it uses - it must have corrupted - not the .sln or .proj I'm a bit hazy. was it a .suo

Anyway, I couldn't remember so, to be on the safe side, I created a new project and that fixed it

I think it happens when you upgrade visual studio so if anyone else has the problem that's where to start!