Click here to Skip to main content
15,914,111 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
Hi,

I created one service using C#.net. In my .net service I poped up a dialog from service in that dialog I used openfiledialog to open a file from hard disk.

Its working fine on my windows xp system but when I run this on my Windows 7 OS its showing one message below.


When I call openfiledialogs showdialog() method, its shown message like below


[Window Title]
Location is not available

[Content]
C:\Windows\system32\config\systemprofile\Desktop refers to a location that is unavailable. It could be on a hard drive on this computer, or on a network. Check to make sure that the disk is properly inserted, or that you are connected to the Internet or your network, and then try again. If it still cannot be located, the information might have been moved to a different location.

[OK]
Posted
Comments
Kiran Susarla 12-Dec-12 2:26am    
Are you saying that your windows service is displaying some UI to the user and that user should be able to select files and continue with further processing?
Arun Kumar K S 12-Dec-12 3:23am    
yes
Arun Kumar K S 12-Dec-12 3:25am    
I can able to run a windows application from service and able to browse it using folder browser dialog
amitnaik 12-Dec-12 8:35am    
my vote is 4. because some don't understand question and file structure of OS and gives vote as 1.
Arun i got our problem, because already came across similar problem but solved that thing. but need more information about your code.specially opening file dialog and please check assembly/exe path.
Arun Kumar K S 12-Dec-12 23:25pm    
Thanks amith...,
I solved it by creating Desktop folder in location C:\Windows\system32\config\systemprofile\Desktop using the code.

I am not sure its a perfect method or not but its worked to me....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900