Newbie question

  • Thread starter Bryan Dickerson
  • Start date
B

Bryan Dickerson

I would imagine that this question has been posted a million and 1 times,
but since I'm pretty new to this group, please suffer me thru one more time.
My first VB.Net program runs great on my machine, but ultimately, it needs
to run on one of my company's server boxes so that it can be run on a
schedule. It's a short email generator to confirm sales orders with our
company. I created an Install project, built it and installed it on the
server box and tried to test it, but it gets the very helpful error message,
"An exception has been generated that cannot be handled," right after it's
invoked. I tried putting some message boxes in it to tell me where it's
bombing, but I don't even see them, so I'm inclined to think it's an
installation issue. The server box is running Win2K and has the Framework
1.1 installed, even though according to Windows Update, it is quite far
behind in the "Critical Updates" section. Since it is a server, the network
admin is obviously reluctant to run updates and reboot it during the day.
Any suggestions? I need this to work soon, but I have no clues as to where
to start.

TIA!
 
G

Gerry O'Brien [MVP]

Is it perhaps a security issue where you are trying to run it on a server?

I don't know the particulars of your app obivously but it's a first step.
 
B

Bryan Dickerson

Interesting. The box runs Win2K Server and the id that the box uses is the
server/network admin id. There is no "Users" icon in the Control Panel. Not
ever having worked with Win2K server, what should I or my network admins
check for?
 
B

Bryan Dickerson

ROTFLOL! This is a soapbox that I WON'T go into, as I'm pretty much persona
non grata with her.
 
G

Gerry O'Brien [MVP]

You need to go into Computer Management by right clicking on My Computer on
the desktop and choosing Manage.

From the computer management screen, you will find an entry in the left pane
for Local Users and Groups under System Tools.

Expand that entry and choose the Users folder. Your user accounts will be
displayed on the right.

Right click the Users folder and choose New User to add a user to the
server.

This is all assuming of course that your server is a stand-alone server and
not a domain controller.

If it is a domain controller, you will have to go into Active Directory
Users and Computers on the Administrative Tools menu to add a new user.



--
Gerry O'Brien
Visual Developer .NET MVP
 
B

Bryan Dickerson

I tried to define the serveradmin as an Adminstrator on the server box and
it didn't like the password for the serveradmin id because of a policy
issue--which is outside the scope of this problem. I tried to run the
program with the "Run As..." option (run as Administrator on the box) and it
doesn't change the error. I also tried installing it on an XP box that I've
been using as a guinea pig for testing other things and got the same error
(the id on the XP box is also an Administrator on the box). Hmmm....
 
G

Gerry O'Brien [MVP]

Hmmm is right.

Do you have Try Catch Finally error handling in the code?

If so, import the System.IO namespace and create a text log file that will
record all errors generated and write them to the log file.

Include a default "catch all" handler and see if it returns anything at all.

Sorry, but this will require a rebuild of the app but you should be able to
just replace the .exe file I think.

--
Gerry O'Brien
Visual Developer .NET MVP
 
I

Itai Raz

No error description? Don't you have a "details" button in the error message
box that you can click and get a better error description? Nothing in the
event log either? How about when you compile it in debug mode (not release
mode, that is)? Still same "meaningful" error with no elaboration?

Try attaching a snapshot of the messagebox (an image if you will). Maybe it
will ring a bell.

--itai
 
D

dumboo

how abt creating a very simple "Hello World" application and trying every
thing all over again ??
 
B

Bryan Dickerson

I do have Try Catch Finally error handling, but if you'll forgive my
ignorance, how do you create a log file that will catch and log all errors?
And how would I do a "Catch All" handler? No worries about the
re-build--it's a very small program.

Thanx!
 
I

Itai Raz

Did you try the "cancel" button? What happens when you hit cancel? What is
the error message you're getting?
 
G

Gerry O'Brien [MVP]

In terms of creating a log file, you need to use the System.IO namespace and
use the textwriter object.

Simply output the contents of the err object or of the errors that get
generated in each catch block prior to handling the error.

A "Catch All" handler is one that surrounds all other procedures or errors
that will catch any unhandled exceptions, or an en error handling routine
that is located in your main procedure. In this way, if any errors are not
handled, they get sent up the call stack until they either find an error
handler, or crash your application if none exists.



--
Gerry O'Brien
Visual Developer .NET MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top