I am experiencing strange problem. I can create, delete files on SD. After using HttpWebRequest every attempt to create or delete files is failing.
void wifi_WirelessConnectivityChanged(object sender, GHINET.WiFiRS9110.WirelessConnectivityEventArgs e)
{
if (e.IsConnected)
{
File.Delete(@ "\SD\password"); //OK
FileStream file = new FileStream(@ "\SD\password", FileMode.Create); //OK
file.Close();
file.Dispose();
File.Delete(@ "\SD\password"); //OK
HttpWebRequest _request = (HttpWebRequest)HttpWebRequest.Create(ShareConst.HttpMicrocontrolerUrl + "GetDateTime.php");
_request.Method = "GET";
var response = _request.GetResponse();
file = new FileStream(@ "\SD\password", FileMode.Create); //FAILED
File.Delete(@ "\SD\password"); //FAILED
}
}
Maybe it has something to do with the latest (NETMF and Gadgeteer Package 2013 R2) release.
[quote]The thread ‘’ (0x2) has exited with code 0 (0x0).
Using mainboard GHI Electronics FEZCobra II version 1.0
Program Started
RS9110 firmware version Number is 4.4.5
RS9110 driver version Number is 4.4.5
The thread ‘’ (0x4) has exited with code 0 (0x0).
The thread ‘’ (0x3) has exited with code 0 (0x0).
#### Exception System.IO.IOException - CLR_E_INVALID_DRIVER (5) ####
#### Message:
#### Microsoft.SPOT.IO.NativeIO::GetAttributes [IP: 0000] ####
#### System.IO.FileStream::.ctor [IP: 005c] ####
#### System.IO.FileStream::.ctor [IP: 0010] ####
#### LivingRoom.Program::wifi_WirelessConnectivityChanged [IP: 0094] ####
#### GHI.Premium.Net.WiFiRS9110::NetworkChangeExtension_NetworkAvailabilityChanged [IP: 0025] ####
#### GHI.Premium.Net.NetworkChangeExtension::OnNetworkChangeCallback [IP: 0099] ####
#### GHI.Premium.Net.NetworkChangeExtension+NetworkChangeExtensionListener::OnEvent [IP: 000d] ####
#### Microsoft.SPOT.EventSink::EventDispatchCallback [IP: 0014] ####
A first chance exception of type ‘System.IO.IOException’ occurred in Microsoft.SPOT.IO.dll
A first chance exception of type ‘System.IO.IOException’ occurred in System.IO.dll
An unhandled exception of type ‘System.IO.IOException’ occurred in System.IO.dll[/quote]