AI OnAI Off
If you are using 7.1 you need to use virtual path provider to programmatically work with files since contentrepository will only work with files from 7.5+. Try first to change the regex that validates files and see if that lets you delete it with file manager. Else do a scheduled job or similar that use virtual path provider and delete it programmatically.
Check out
For how to work with these. It should be something similar to
UnifiedFile file = System.Web.Hosting.HostingEnvironment.VirtualPathProvider.GetFile(path) as UnifiedFile; file.Delete();
...but I don't have a 7.1 environement up right now to check.
If you are using native provide type you can just delete the file.
Greetings!
My customer accidentally managed to upload a file with illegal characters using the FileManager in EPiserver 7.1
This results in an yellow screen of death stating " System.ArgumentException: Illegal characters in path".
The error message also seems to give the id of the file.
What is the best way to remove this file and fix the error, making sure there are no left out paths/pointers in the database etc?
Bare in mind, I'm not really familiar with this environment since I've mostly worked with 7.5.
Regards,
Christian