473,396 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

privilage in pgm help

Hi all,

I have recently written a code for Automatic update management
using the Apis in MSDN. I tested it using "ASP .NET Development
Server". It seems to work fine. As soon i launched it as a website and
tried to the same operation it popped up an authentication popup and if
i enter my password it shows exception saying that "Permission Denied".
So i understand that in order to solve the problem i need to escalate
my privilage to "admin" for that code execution. I dont know how to do
that. can some one tell me how. Any sample code will of great help.
This is the code that is giving the problem when run as server.
public AutoUpdateInfo GetAutomaticUpdateStatus()
{
string Time;
AutomaticUpdates oUp;
AutoUpdateInfo Val = new AutoUpdateInfo();
UpdateSearcher oUPSearcher;
AutomaticUpdatesNotificationLevel NotLevel = new
AutomaticUpdatesNotificationLevel();
AutomaticUpdatesScheduledInstallationDay DaySet = new
AutomaticUpdatesScheduledInstallationDay();
oUp = new AutomaticUpdates();
NotLevel = oUp.Settings.NotificationLevel; /*THIS IS WHERE
I GET EXCEPTION SAYING PERMISSION DENIED*/
Val.sLevel = NotLevel.ToString();
Val.sLevel = Val.sLevel.Remove(0, 4);
DaySet = oUp.Settings.ScheduledInstallationDay;
Val.sDay = DaySet.ToString();
Val.sDay = Val.sDay.Remove(0, 5);
Time = oUp.Settings.ScheduledInstallationTime.ToString();
//Time = Time + ":00";
Val.sTime = Time;
return Val;
}
Varun

Oct 13 '06 #1
0 1022

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help...
6
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
3
by: Colin J. Williams | last post by:
Python advertises some basic service: C:\Python24>python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) on win32 Type "help", "copyright", "credits" or "license" for more information. >>> With...
7
by: Corepaul | last post by:
Missing Help Files When I enter "recordset" as the keyword and search the Visual Basic Help index, I get many topics of interest in the resulting list. But there isn't any information available...
5
by: Steve | last post by:
I have written a help file (chm) for a DLL and referenced it using Help.ShowHelp My expectation is that a developer using my DLL would be able to access this help file during his development time...
8
by: Mark | last post by:
I have loaded Visual Studio .net on my home computer and my laptop, but my home computer has an abbreviated help screen not 2% of the help on my laptop. All the settings look the same on both...
0
by: remya1000 | last post by:
i'm using VB.NET. i wrote a Auto Reboot program. and here is the codes i tried... Code: Private Enum ShutDown1 LogOff = 0 Shutdown = 1 Reboot = 2 ...
3
by: Gladiator | last post by:
Hi , Can someone tell me how do i grant a Read privilage on all the tables in a schema X to a different user who is not the owner of the Schema . I dont want to grant him the Alterin privilage...
2
JustRun
by: JustRun | last post by:
Hi, I can create a new Role, its simple, But it will be no use if the user cant define privilage to this role, like allow access to some pages, and deny it to athe pages? I use the Web.Config...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.