windows service failed to start : System.UnauthorizedAccess

Posted on 2012-08-30
Last Modified: 2012-09-04
HI Experts,

I have created a windows service in C# to monitor disk space and send mail an email once reaching a certain threshold.

When i try to start it , it fails with below error.

Windows could not start the Diskinfoservice service on Local Computer.

Error 1053: The service did not respond to the start or control request in a timely fashion.

In event logs, i see app crash events :

Fault bucket -1068053370, type 5
Event Name: CLR20r3
Response: Not available
Cab Id: 0

Problem signature:
P1: diskmonitoringservice.exe
P3: 503f43e5
P4: mscorlib
P6: 4f8cfd42
P7: 3454
P8: 15a
P9: System.UnauthorizedAccess

Attached files:

These files may be available here:

Analysis symbol:
Rechecking for solution: 0
Report Id: 0d16b348-f292-11e1-a5e4-00259c788e43
Report Status: 0
Hashed bucket: dfd02f95729e5da5fdc26799f470d734

Any help would be appreciated.
Thank you.
Question by:subhashchy
    LVL 8

    Accepted Solution

    nevermind, I was trying to write to a file which does not exist.

    LVL 23

    Expert Comment

    by:Rajkumar Gs
    So you mean you have fixed this issue. Then please accept your comment and solution and close this question. This may help someothers

    LVL 8

    Author Closing Comment

    fixed it

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
    Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now