PUZZLED FUSTRATED and DESPERATE :{

H

Herb

I am new to vb.net coming from vb6

I built and published an app that work fine on the production machine.
I try installing it on a clean machine and I installed
NETFramework2.0.50727 ( i am using Vb.net 2005 no sp1 and these are
the references of the compiled program). I check that these
references are identical on both machines and in the proper location
and they were

The installed went fine but when I run the program I see it loading in
the task manager but nothing happens....no forms show, no error
messages no nothing. Then it disappears from the task manager.

I am able to run the compiled exe on the production machine without
any problems. Any ideas would be appreciated because right now I feel
I wasted a two months of programming ;{ ;{ ;{ ;{ ;{ ;{ ;{ ;{
 
P

Phil Wilson

What's your program called? This is the kind of weird behavior you can get
if there is a program of the same name in
HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths, because the
program in there will run, not yours.

If it's not that, a missing dependency or a program fault typically causes a
crash in VB, so as long as you're not catching errors and disregarding them
(and exiting) you should see something. What happens if the 1st line of
code in your program is MessageBox.Show?
 
H

Herb

The program is called called Dentiage so I doubt it shares a common
name. I got so fustrated i left work but will check your other
suggestions tommorrow. I do apprecioate your help
 
S

Scott M.

Sounds like a permissions/security issue. Have you run the .NET Application
Wizards in Control Panel...Administrative Tools?
 
S

Scott M.

In Control Panel, select Administration Tools. Then the .NET Configuration
Wizards. There are several to choose from and each is Wizard based. All of
them allow you to configure your .NET assembly for use on the current
system.
 
C

Chris Dunaway

In Control Panel, select Administration Tools. Then the .NET Configuration
Wizards. There are several to choose from and each is Wizard based. All of
them allow you to configure your .NET assembly for use on the current
system.

I don't think the configuration wizards is present for .Net 2.0 on a
system that just has the framework installed.

To the OP: Check the Event logs to see if there are any messages
logged there. If not, you'll have to do as the other poster suggested
and start debugging.

Using VS, you can debug from your development machine to the machine
in question over the network, assuming you have the required
permissions.

Good luck

Chris
 
H

Herb

This is something knew to me

"Using VS, you can debug from your development machine to the machine
in question over the network, assuming you have the required
permissions."

How would you do this



On 9 Apr 2007 10:40:49 -0700, "Chris Dunaway" <[email protected]>
wrote:
 
C

Chris Dunaway

This is something knew to me

"Using VS, you can debug from your development machine to the machine
in question over the network, assuming you have the required
permissions."

How would you do this

On 9 Apr 2007 10:40:49 -0700, "Chris Dunaway" <[email protected]>
wrote:

In VS, you would click Tools > Attach to Process and on that screen
you can change the Qualifier field to the server you want to connect
to. When you connect, you should see a list of processes to which you
can attach the debugger.

Chris
 
S

Scott M.

Sorry, didn't know they are not available in 2.0. None-the-less, there must
be some kind of application config file where you can set permissions. No?
 
C

Chris Dunaway

Sorry, didn't know they are not available in 2.0. None-the-less, there must
be some kind of application config file where you can set permissions. No?

You have to use the caspol.exe to grant trust to the application.
 
P

Paul Hadfield

Have you implemented Exception Handling in your VB.Net application, if so
could that be hiding the error from you (i.e. catching the error but still
terminating the program)
 
H

Herb

How do you shut it off?

Have you implemented Exception Handling in your VB.Net application, if so
could that be hiding the error from you (i.e. catching the error but still
terminating the program)
 
P

Paul Hadfield

It sounds like you may be trying to run before you can walk, in that you're
talking about publishing an application before it would appeart that you've
got a grasp on the differences between DotNet and VB6 (I'm basing that on
your response to mine and several other postings. You certainly haven't
wasted any development time in switching, you may just be trying to do it
too quickly.

To start at the beginning, exception handling is implemented
Try/Catch/Finally keywords - if you've not used any of those in your code
then you're not using exception handling and an exception is happening you
should see an untrapped error dialog before your program crashes. If you're
not using Try/Catch/Finally anywhere in your code and the program still
terminates without an error message it "could" (and that is a possible
"could") imply a crash in an unmanaged call which terminates your
application (DotNet, whilst managed, is built on calls to unmanaged code).

If you are using exception handling, look out for code like the very basic
example below. If any exceptions occur in your application , the empty
"Catch" block in this code will trap any untrapped errors, but the program
will terminate without letting you know what happened.

Sub Main()
Try
Application.Run()
Catch
' Do Nothing
End Try
End Sub


The following, whilst not much better - at least lets you know what the
error was.

Sub Main()
Try
Application.Run()
Catch e As Exception
MessageBox.Show(E.Message)
End Try
End Sub

I'd recommend googling / reading up on exception handling to get a full
understanding on that.
P.S Excuse any bad syntax in code above, I normally use C# so wanted to put
; at the end of each line!

- Paul.
 
H

Herb

Thank you for some very sound advise. (I have been out of town and
though I would give my program a rest) You are correct, I am a VB6
programmer and this program was "ported over " (not by conversion but
by rewriting). As I stated it runs find on the production machine
(which has .Net installed) It is only when I try installing it on
other machines which require the installatio on .net Framework 2 on
them that it fails to run or should I say "quietly loads and unloads)
I will take your advise because it is sound programming advise but
again wouldn't the error cause some type of hiccup on the prodiction
machine?
 
P

Paul Hadfield

The problem is, you're trying to track down the worst kind of problem, only
occurs on one machine and not another (which helpfully is never the one you
could debug easily on) and you get no usable error message - complete
nightmare. One of the best things you can do is to revisit your program and
add defensive programming to try and protect against the error or at least
give you a better understanding where it is happening.

Slightly lower level, but you may also be able to use winDbg (downloadable
from MS), which would allow you to see the exception, managed or unmanaged,
that was causing you the problem. Plenty of articles on the net if you
search on it's usage, such as:

http://www.codeproject.com/debug/windbg_part1.asp
 

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

Top