Apologies if you feel this is the wrong forum, but as it has an open ended feel about it, rather than a definitive answer, I suspect this is a better fit than Stack Overflow.
I have an odd, intermittent bug that is happening on a web server.
One of the methods triggers the creation of a small file (3kb), in a folder. The folder is based on the current year, month and location id.
The file is created by a 3rd party component that I have no control over, other than by calling its
The developers of this component have confirmed that they hand the creation of the file over to the OS and then return without checking if the creation happened. (Nice).
What we then try to do is to open this file, and write a specific authorisation code on it. However, occasionally the log files are catching a
System.ArgumentException: Parameter is not valid when I call
Bitmap bmpImage = new Bitmap(filename); According to MSDN this exception means that the file is not an image file, or is not actually there.
I can’t affect the 3rd party component, But I am pretty sure that Running a
FileSystemWatcher on a website process is not going to cut it either, nor is any kind of blocking call where I wait for an unknown amount of time for the file to be created. The only other solution I can think of off the top of my head is to check if the file is there, if not, check after a second, and then a third time. If after all that it is not present, to throw an exception. But that just feels more like a ‘bodge’ than a fix.
I can’t put these image creations and alterations into some kind of queue or other process, as the updated image is displayed back to the user on the next page.
Have I missed any obvious solutions to my problem here, before I need to go back and try to re-invent the whole process (Which seems overkill for maybe 1 in 500) images causing a problem?
✓ Extra quality
ExtraProxies brings the best proxy quality for you with our private and reliable proxies
✓ Extra anonymity
Top level of anonymity and 100% safe proxies – this is what you get with every proxy package
✓ Extra speed
1,ooo mb/s proxy servers speed – we are way better than others – just enjoy our proxies!
USA proxy location
We offer premium quality USA private proxies – the most essential proxies you can ever want from USA
Our proxies have TOP level of anonymity + Elite quality, so you are always safe and secure with your proxies
Use your proxies as much as you want – we have no limits for data transfer and bandwidth, unlimited usage!
Superb fast proxy servers with 1,000 mb/s speed – sit back and enjoy your lightning fast private proxies!
99,9% servers uptime
Alive and working proxies all the time – we are taking care of our servers so you can use them without any problems
No usage restrictions
You have freedom to use your proxies with every software, browser or website you want without restrictions
Perfect for SEO
We are 100% friendly with all SEO tasks as well as internet marketing – feel the power with our proxies
Buy more proxies and get better price – we offer various proxy packages with great deals and discounts
We are working 24/7 to bring the best proxy experience for you – we are glad to help and assist you!