473,769 Members | 5,601 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASPX : ACCESS denied when start/stop windows services

Hi All

i do need to control my windows services using aspx pages.

I used the System.ServiceP rocess.ServiceC ontroller namespace ....
this is working fine when i run my code in a windows application .

But when i use the code to start /Stop the service in a aspx page i get an
error like:

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Componen tModel.Win32Exc eption: Access is denied
so what must i do in settings or in permission levels so that i can run the
service start/stop code in ASPX pages??

can any one explain what to do in detail..

,,,,
Senthil
Nov 18 '05 #1
3 7035
You can use impersonation to run ASP.NET under an account that has
permission to interact with windows services.
Here's more info:
http://msdn.microsoft.com/library/de...ersonation.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"SenthilVel " <se************ ******@misyshea lthcare.com> wrote in message
news:uv******** ******@TK2MSFTN GP11.phx.gbl...
Hi All

i do need to control my windows services using aspx pages.

I used the System.ServiceP rocess.ServiceC ontroller namespace ....
this is working fine when i run my code in a windows application .

But when i use the code to start /Stop the service in a aspx page i get an
error like:

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Componen tModel.Win32Exc eption: Access is denied
so what must i do in settings or in permission levels so that i can run
the
service start/stop code in ASPX pages??

can any one explain what to do in detail..

,,,,
Senthil

Nov 18 '05 #2
Hi Steve
i added the impersonate="tr ue" in my config files.
but still i am not able to access the services from aspx pages.
it says " permission denied".
what to do ?

,,,,
Senthil

"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
news:Ob******** *****@TK2MSFTNG P11.phx.gbl...
You can use impersonation to run ASP.NET under an account that has
permission to interact with windows services.
Here's more info:
http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconaspnetimpe rsonation.asp
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"SenthilVel " <se************ ******@misyshea lthcare.com> wrote in message
news:uv******** ******@TK2MSFTN GP11.phx.gbl...
Hi All

i do need to control my windows services using aspx pages.

I used the System.ServiceP rocess.ServiceC ontroller namespace ....
this is working fine when i run my code in a windows application .

But when i use the code to start /Stop the service in a aspx page i get an error like:

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Componen tModel.Win32Exc eption: Access is denied

so what must i do in settings or in permission levels so that i can run
the
service start/stop code in ASPX pages??

can any one explain what to do in detail..

,,,,
Senthil


Nov 18 '05 #3
Give it a specific username and password to use.
For testing, give it your username and password so it will run with your
security privileges.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"SenthilVel " <se************ ******@misyshea lthcare.com> wrote in message
news:%2******** *******@TK2MSFT NGP09.phx.gbl.. .
Hi Steve
i added the impersonate="tr ue" in my config files.
but still i am not able to access the services from aspx pages.
it says " permission denied".
what to do ?

,,,,
Senthil

"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
news:Ob******** *****@TK2MSFTNG P11.phx.gbl...
You can use impersonation to run ASP.NET under an account that has
permission to interact with windows services.
Here's more info:

http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconaspnetimpe rsonation.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"SenthilVel " <se************ ******@misyshea lthcare.com> wrote in message
news:uv******** ******@TK2MSFTN GP11.phx.gbl...
> Hi All
>
> i do need to control my windows services using aspx pages.
>
> I used the System.ServiceP rocess.ServiceC ontroller namespace ....
> this is working fine when i run my code in a windows application .
>
> But when i use the code to start /Stop the service in a aspx page i get an > error like:
>
> Description: An unhandled exception occurred during the execution of
> the
> current web request. Please review the stack trace for more information
> about the error and where it originated in the code.
>
> Exception Details: System.Componen tModel.Win32Exc eption: Access is denied >
>
> so what must i do in settings or in permission levels so that i can run
> the
> service start/stop code in ASPX pages??
>
> can any one explain what to do in detail..
>
> ,,,,
> Senthil
>
>



Nov 18 '05 #4

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

Similar topics

4
3918
by: Fabian von Romberg | last post by:
Hi, I have installed Sql Reporting Services on 2 machines, one is WIN 2000 PRO and the other one is WIN 2000 ADV. SERVER. When I try to access a report using the webbrowser, I get the following error, this happens only if try access the report on the SERVER, it I try on my local machine, it works just fine. Any help will be much appreciated. Thanks in advance, Fabian von Romberg
9
6331
by: | last post by:
Hi All, I have allready tried to ask a similar question , but got no answer until now. In the meantime, I found, that I cannot understand some thread-settings for the Main() function . If I use the attribute for the Main() function, I get "access denied error", if I use a ManagementEventWatcher to connect to the local machine to receive events. Is there anybody out there, how possibly can explain why this happens?? If I remove this...
5
2951
by: Raterus | last post by:
I'm just throwing this error out for my sanity, I've seen posts about this, but never solutions. I'm using VS.NET 2003, Framework 1.1, and I'm getting a random error about every 1 out of 10 times I try to start to run/debug a project (through Visual Studio) Server Error in '/Intranet' Application. -------------------------------------------------------------------------------- Compilation Error Description: An error occurred during...
16
7389
by: Brad | last post by:
After compiling my asp.net project I'm receiving a "BC31011 - Access is denied" error when attempting to run or debug. The only thing that seems to resolve problem is IISReset. After a reset my project runs fine for several compiles then the error starts up again...and another iisreset. I seem to recall a similar issue a long time back which required turning off indexing, which I have had off since (I just re-checked to confirm it is...
1
2818
by: Microsoft News | last post by:
I have a web server sitting on computer 1, (QA1). Out on the network on my main server I have a folder with a zip file in it. All I want is for the web services that are on the web server to pick up the Zip file and send it when the web services are called. However I am getting the following error: -- Message: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.ApplicationException:...
3
3094
by: martin | last post by:
Hi, I have a website that runs under Annotmous access. I am trying to find out the account that the page is running under the line Response.Write("<hr>" & Page.User.Identity.Name & "<hr>") does not write out the name of the account that the website is running under when it is running under annoymous access, however when the same page is run
3
3690
by: Doug Bailey | last post by:
I am trying to control a Windows Service via a Web Service interface. (I am developing in .NET2003) I am using the ServiceController object which allows me to read the state of the services with no problems. However, I am not able to start or stop the service unless I go through the process of impersonating an administrative user. (See MSDN KB 306158) Since it appears to be a privilege issue, I set the folders in IIS holding the Web...
4
21749
by: carson | last post by:
I have written two windows services: - service A does some crunching of local data files and uploads them to a central processing computer via http. - service B monitors a manifest file on a webserver to see if service A needs to be updated. What service B does if it sees their is an update for service A is to download a new copy of the service A executable, stop service A, replace the executable with the new copy, and start service B...
8
28600
by: ajos | last post by:
hi frnds, im trying to convert my servlets database configuration from ms access to mysql database.however im getting some error like no driver found exception. to verify this error ive made a simple database in jsp(just to check if my mysql is working smoothly otherwise) which access' the username.....but in the process im getting a error--> java.sql.SQLException: Access denied for user ''@'localhost' (using password: NO) i have...
0
9587
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10045
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8870
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7406
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5298
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3958
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.