जब मैं एक WP7 के अनुप्रयोग में एक फ़ाइल को खोलने का प्रयास:फ़ाइल खोले जाने पर पृथक स्टोरेजफाइलस्ट्रीम अपवाद फेंक दिया जाता है?
IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication();
IsolatedStorageFileStream nameXmlFile = new IsolatedStorageFileStream("Names.xml", System.IO.FileMode.Open, isf);
मैं निम्न त्रुटि प्राप्त:
Operation not permitted on IsolatedStorageFileStream.
मुझे यकीन है कि क्यों इसे खोलने नहीं है, क्योंकि मैं सही इस्तेमाल किया नहीं कर रहा हूँ मेरे ऐप में कहीं और कोड और यह ठीक काम करता है। यह क्यों होता है कि यह क्यों हो रहा है?
संपादित
मैं App.xaml.cs Application_Launching घटना में पृथक भंडारण के लिए फ़ाइल जोड़ने के लिए निम्न कोड का प्रयोग किया:
IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication();
IsolatedStorageFileStream feedXmlFile = new IsolatedStorageFileStream("Names.xml",System.IO.FileMode.Create, isf);
आप इस नाम.एक्सएमएल को कैसे स्टोर करते हैं? –
मैंने ऊपर इस्तेमाल किया कोड जोड़ा। – loyalpenguin