السلام عليكم ورحمة الله وبركاته .
اما بعد :
asp.net using c sharp
يوجد لدي مشكلة في اظهار FileDialog (الذي يقوم من خلاله المستخدم بأستعراض الملفات) في وضع server(تطبيق ويب) مع العلم انه يشتغل اذا كان التطبيق ويندوز ولايوجد فيه اي اخطاء . ولقد بحثت في هذا المنتدى عن هذه المشكلة ولم اي موضوع يتعلق بها , وهذا هو الكود الذي كتبته .
System.Windows.Forms.OpenFileDialog file = new System.Windows.Forms.OpenFileDialog();
System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1= new System.Windows.Forms.FolderBrowserDialog();
file = new System.Windows.Forms.OpenFileDialog();
file.InitialDirectory = "c:\\" ;
file.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*" ;
file.ShowDialog();
[\code]
وهذا هو الخطاء الذي ظهر لي في server :
-
It is invalid to show a modal dialog or form when the application is not running in UserInteractive mode. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.