I have code that works fine when independent, just not when together. When a web page is accessed I write to a digital output setting it true for 500ms and then setting it back to false, using Thread.Sleep to get that 500ms pause. I get the error below when I try to execute. If I execute the code through some other trigger such as a digital input it works fine, or if I execute the web page with Thread.Sleep commented otu it works fine. Any good way around this incompatibility?
An unhandled exception of type ‘System.NullReferenceException’ occurred in GHIElectronics.NETMF.W5100.Http.dll