Click here to Skip to main content
11,718,289 members (86,294 online)
   

ASP.NET

 
Questionusing managementobject Pin
akshayswaroop4-Oct-05 19:33
memberakshayswaroop4-Oct-05 19:33 
Hi!
I am having a typical problem ,I am using management classes to get the path for shared folders and files of the system.The code is working fine for console and winforms,but it is not working for web applications.I have tried giving admin rights to aspnet account,but the problem remains there.Please help

ManagementObjectSearcher searcher1=null;
searcher1=new ManagementObjectSearcher("SELECT * FROM Win32_Share");
try
{
foreach(ManagementObject share in searcher1.Get())
{
s=share["Path"].ToString();//for asp.net pages giving null obj ref exception

}
AnswerRe: using managementobject Pin
minhpc_bk4-Oct-05 22:35
memberminhpc_bk4-Oct-05 22:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.150901.1 | Last Updated 3 Sep 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid