Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download



Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

If you have any problems with the registration process or your account login, please contact us.

Driver Scanner

"select Name,Path from Win32_Share" permissions required by ASP.NET to return paths,

microsoft.public.windows.vista.security






Speedup My PC
Reply
  #1 (permalink)  
Old 09-02-2008
developers2008
 

Posts: n/a
"select Name,Path from Win32_Share" permissions required by ASP.NET to return paths,

I'm tripping over ASP.NET local machine permissions with the following
on an inside the firewall app:
List<SharePathEntry> allLocalShares = new List<SharePathEntry>(); // a
container for share=local path string pairs
WqlObjectQuery objectQuery = new WqlObjectQuery ("select Name,Path from
Win32_Share��) ;
ManagementScope scope = new ManagementScope(@\\.\root\cimv2); //[1]
scope.Options.Impersonation = ImpersonationLevel.Impersonate; //[1]
scope.Options.EnablePriveleges = true; //[1]
ManagementObjectServer searcher = new
ManagementObjectSearcher(scope,objectQuery);
foreach(ManagementObject share in searcher.Get())
{
object objName = share["Name"];
object objPath = share["Path"];
if(null!=objName)
{
if(null!=objPath)
{
AllLocalShares.Add(new SharePathEntry(objName.ToString(),
objPath.ToString());
}
else
{
// non-null Name returned, null Path retruned only when running totally
[ 3 ] under ASP.NET...[ 4 ]
}
}
}
[ 1 ] I've tried with and without these
[ 2 ] I'm running as admin when I hit webservice that uses this object
[ 3 ] If I run webservice in F5 debug mode, works normally and can
trace above.
[ 4 ] If I run as webservice, condition [4] occurs.
[ 5 ] If I run as webservice, then attach debug to asp.net process, I
can trace above and see [4] occur.
[ 6 ] Same code behind object running under NETWORK_SERVICE credentials
on same local machine works normally.
[ 7 ] I've randomly tried permissions as follows:
Local Security Policy
LocalPolicies:User Rights Assignment : Profile system performance
(Added ASP.NET) : does not fix the problem.
LocalPolicies:User Rights Assignment : Perform volume maintenance tasks
(Added ASP.NET) : does not fix the problem.
Full permissions granted to ASP.NET in security tab for:
Computer Management: Services and Applications: WMI Control :
Properties : Security : Root : CIMV2 and WMI : does not fix the problem

The only thing that has worked so far is to add asp.net account to
local administrators, run as admin. This is a dedicated/private inside
the firewall application, so OK-ish, but I'm hoping to just add the
required permission to asp.net account as is.


--
developers2008
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
"Add a network location" now generate "Select certificate" popup nauliv Windows Vista Business 0 02-21-2008 03:52
Article ID: 939609 Stoppfehlermeldung: wenn Sie auf einem full-speed USB-Gerät in Windows Vista einen Device Path Exerciser-Test ausführen: " BEENDEN Sie: 0x000000FE "oder BEENDEN Sie": 0x000000D1 " KBArticles German 0 10-22-2007 21:20
Article ID: 939609 Stop error message when you run a Device Path Exerciser test on a full-speed USB device in Windows Vista: "STOP: 0x000000FE" or "STOP: 0x000000D1" KBArticles English 0 10-22-2007 20:00
Enabled permissions for "Everyone" but denied "change permissions" ed microsoft.public.windows.vista.security 0 07-11-2007 20:42
"Open command prompt here" and "Copy as path" Moody Marco microsoft.public.windows.vista.performance maintenance 10 05-04-2007 17:41




All times are GMT +1. The time now is 19:45.




Driver Scanner - Free Scan Now

Vistaheads.com is part of the Heads Network. See also XPHeads.com , Win7Heads.com and Win8Heads.com.


Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.0 RC 2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120