473,609 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Related Problem [though with my debugging]: Walthrough tutorial generates exception

Hello,
I've been following the previous thread "Windows Service Starts and
Immediately Stops" and I have a similar problem.
I've been trying to get started on a windows service and have followed the
following rather well known tutorial [1] (I also make some references to it
in this writeup):

Walkthrough: Creating a Windows Service Application in the Component
Designer
http://msdn2.microsoft.com/en-us/lib...8a(VS.80).aspx

Anyways, I've gone through all the steps to create the service and then run
it via the "Manage" services console. I then get this error when clicking
"start" on the service [this error and some ways to debug it is reported on
many search results of web search engines I have used to debug this, however
the results to me have not yet been helpful]:
"An unhandled exception ('System.Securi ty.Exception') occurred in"
[myprogramname]

I have done the following steps:
1. Tried setting "Runtime Security Policy" to "Full Trust" on the Local
Intranet on both .NET framework 1.1 and 2.0 in "Administra tive
Tools->Microsoft .NET framework 1.1 configuration" and "...2.0
configuration". [didn't work]
2. Tried surrounding the "MyNewServi ce" constructor block in "service1.c s"
with try , catches to echo out some debugging output to the
console.writeli ne. Unfortunately, when I do so the service runs but reports
no output was generated by the service. [I can provide exact code if you'd
like]
3. Tried making the service "serviceProcess Installer1" have the account
property be set to LocalSystem not LocalService... didn't work.
4. As #3, tried doing "user" but couldn't authenticate with just my username
and password [weird. I'm doing the development as the computer administrator
too... ?]
5. Tried setting permissions within the program level via:
"[System.Security .Permissions.Pe rmissionSet(Sys tem.Security.Pe rmissions.Secur ityAction.Deman d,
Name = "FullTrust" )] "
And still, no cigar. Also: I recently reformatted my computer and have
installed all security updates and visual studio updates that I could find.

I really want to thank who reads this, as this has been greatly frustrating
me.
[1] Though there is a newer version of the article which is for .NET 3.5,
viewing the about box in Visual Studio I find the program reports I am using
visual studio 2005 [v.8.0.507...] and .NET framework v. 2.0.507... SP1
(should anyone be interested).
Jan 9 '08 #1
0 1139

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

Similar topics

1
6233
by: Sathiamoorthy | last post by:
I received a runtime error when I was working in MyApp.exe MyApp.exe Common Language Runtime Debugging Services Application has generated an exception that could not be handled. Process ID=0x14 (1300), Thread Id=0xe8(232) Any one help me
5
3233
by: Nathan Wiegman | last post by:
Using the XmlSerializer to deserialize a double.NaN value generates an exception in the framework which the framework then catches. This is super undesirable in our application, because our developers have the IDE set to break into the debugger on ALL Common Language Runtime Exceptions. Can there be a change made to the framework source so that it does not throw such routine exceptions? (Why does it throw such a routine exception?) ...
0
1226
by: cronman | last post by:
I am creating a small Windows application using Visual C# 2005 Express Edition (August CTP) for a small non-profit agency. My current issue is with updating related information in an Access database. The individual records are being saved to the database with a few issues... Notes: 1) I was going to post the source code from a test program I developed for testing these issues, but it made for a messy post. Here is a link to a zip...
5
6560
by: Bruce Schechter | last post by:
I just started to develop an ASP.NET application in vs.net 2003 . But each time I try to execute the application (which is basically empty so far), I get a dialog box titled "Microsoft Development Environment" with this message: "Error while trying to run project: Unable to start debugging on the web server. Server-side error occurred on sending debug HTTP request. Make sure the server is operating correctly. Verify there are no...
1
1400
by: moondaddy | last post by:
I tried to add the exception management block to my asp.net 1.1 application today and was getting some errors with it the application, so I removed it. When I re-loaded the app I got an error about the JIT and not having the right permissions. I looked up the error and saw that I needed to have the ASP.NET user added to the project folder. Well its been there for over a year, but all of a sudden it was missing. So I added it back in. ...
10
8696
by: Shawn | last post by:
JIT Debugging failed with the following error: Access is denied. JIT Debugging was initiated by the following account 'PLISKEN\ASPNET' I get this messag in a dialog window when I try to open an asp.net page. If I press OK then I get a page with this message: Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser...
4
1519
by: Jason Hunt | last post by:
I'm hoping someone can help me out with using the Visual Studio IDE for debugging. I'm working on a Windows Forms application (it's an MDI if it matters), and I'm trying to fix a bug in my program. What's happening is when the program is running, it runs into an exception error and switches back to the Visio Studio screen. The problem is that it's not showing me the line of code which actually caused the exception. Instead it is...
41
3323
by: jacob navia | last post by:
In the C tutorial for lcc-win32, I have a small chapter about a debugging implementation of malloc. Here is the code, and the explanations that go with it. I would appreciate your feedback both about the code and the associated explanations. ---------------------------------------------------------------------
1
3610
by: toton | last post by:
Hi, Is there any tool for template debugging, during compilation process ? Just like gdb or visual studio debugger do it during program execution, a step by step debug for the program, I am looking for something which will do the process during compilation and show what is getting substituted for which call. Otherwise sometimes, compilation fails saying some value_type can't be substituted by value_type& and etc inside a template call,...
0
8130
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
8573
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8541
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
8406
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6057
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
5510
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
4021
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...
1
1672
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1389
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.