SaveToFile Not successful

Hi :

I have a problem about Module savetofile .When I connected to the real IRC5 , I use the Module function of SaveToFile to upload The Module to PC .But The alarm happened, that is “General file handing error” , I test successful in the virtual IRC5 use RS,But not in the real IRC5
My program like this:
wModule = GudData.mTasks[wTaskDeep].GetModule(TvProgram.SelectedNode.Text);

if (wModule.IsSystem == false)
{
if (File.Exists(@“C:ABB” + wModule.Name + “.mod”))
File.Delete(@“C:ABB” + wModule.Name + “.mod”);

wModule.SaveToFile(wPath);
Stream s = new FileStream(@“C:ABB” + wModule.Name + “.mod”, FileMode.Open);
byte b = new byte[s.Length];
s.Read(b, 0, (int)s.Length);
s.Close();
string wPrograms = Encoding.Default.GetString(b);
RTProgram.Text = wPrograms;
}

Please help me or give me some sample code.

My E-mail is Martin-jie.zhang@cn.abb.com

Thanks sincerely

The generic error is due to the controller not being able to save outside of its file system, ie local disk.
the module.SaveToFile assumes a local disk, like (HOME)$, or similar.
link

It works the same way in the other direction using the GetFile method.

So if you are going to do it like that then you need to first save the module locally on the controller, and then use GetFile to get it over to the PC.
link

Here is a sample in VS2010 I created for you. It’s using 5.14.03 resources so you might want to reset the references and rebuild it using whatever you got in the controller.
webwiz/6/PCSDK_Csharp_BasicScanApp_514_-_File.zip

Thank you very much ,
i have finished ,
thanks sincerely