[Silverlight 3] SaveFileDialog and the exception IOException: “The directory name is invalid”

I encountered a bug when I tried to use the control SaveFileDialog, available in Silverlight 3. Indeed, every time I used the method OpenFile, I received the following exception:

IOException: The directory name is invalid

At first, I tought it was an issue with the permissions on the location where I tried to save the file but, after posting a message on the Silverlight’s forums, it’s appears the issue come from the Protected Mode that was activated, in Internet Explorer, for the Local Intranet Zone:

"IE -> Tools -> Internet Options -> Security –> Enable/Disable Protected Mode"

As soon as I deactivate the protected mode, the call to the method OpenFile worked fine ! Of course, it’s a temporary fix because it’s not recommanded to keep the protected mode deactivated.

Happy coding !

 

Bye

72 Comments

Comments have been disabled for this content.