473,385 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to make the app run?????

Hello

I've taken a four days training in C#, very good training, experienced
teacher and all that, very positive.

Went home spent a week making my first application, slightly more than the
usual "Hello world".

Took it with me to my best customer, and beleive it or not....It will not
work !!!!

How can that happen!!!
It works fine on my XP-pro at home and not at all on my customers XP-pro
with all updates, with Domain User account, no matter how I try, it refuses
to execute certain sections of the code, everything trivial like showing a
form (empty of course) no problem, but everything interesting like open the
ADO connection to the databas, get the recordset filled and fill the List on
the empty form NOPE, can't do that due to some .Net Framework security issues.

So, How can I make 200 client machines accept my C# code without manually
configuring them one by one?

Kjell
Aug 7 '07 #1
12 1854
You need to provide more information on the "not working" thing. And it is
very common with a not thorough testing application does not work on the
client computer.

Is your app an Window Form application? (it seems yes)

How do you get in "installed" on client computer? Did you created an
installation package? Or did you simply XCopied whole folder to the client
computer? Dod you "install" it locally or on a network share?

Is proper version of .NET framework installed on the client computer?

With such very basic information, only thing that can be said is you did not
do things correctly and show your app to your client a bit too early.
"Kjell" <Kj***@discussions.microsoft.comwrote in message
news:CD**********************************@microsof t.com...
Hello

I've taken a four days training in C#, very good training, experienced
teacher and all that, very positive.

Went home spent a week making my first application, slightly more than the
usual "Hello world".

Took it with me to my best customer, and beleive it or not....It will not
work !!!!

How can that happen!!!
It works fine on my XP-pro at home and not at all on my customers XP-pro
with all updates, with Domain User account, no matter how I try, it
refuses
to execute certain sections of the code, everything trivial like showing a
form (empty of course) no problem, but everything interesting like open
the
ADO connection to the databas, get the recordset filled and fill the List
on
the empty form NOPE, can't do that due to some .Net Framework security
issues.

So, How can I make 200 client machines accept my C# code without manually
configuring them one by one?

Kjell

Aug 7 '07 #2
It can happen very easily if the only system you tested it on is your
development system. Get Visrtual PC 2007, make yourself a XP SP2 virtual
machine (with updates if you like) do whatever deployment you're using and
see if it works.
--
Phil Wilson
[MVP Windows Installer]
"Kjell" <Kj***@discussions.microsoft.comwrote in message
news:CD**********************************@microsof t.com...
Hello

I've taken a four days training in C#, very good training, experienced
teacher and all that, very positive.

Went home spent a week making my first application, slightly more than the
usual "Hello world".

Took it with me to my best customer, and beleive it or not....It will not
work !!!!

How can that happen!!!
It works fine on my XP-pro at home and not at all on my customers XP-pro
with all updates, with Domain User account, no matter how I try, it
refuses
to execute certain sections of the code, everything trivial like showing a
form (empty of course) no problem, but everything interesting like open
the
ADO connection to the databas, get the recordset filled and fill the List
on
the empty form NOPE, can't do that due to some .Net Framework security
issues.

So, How can I make 200 client machines accept my C# code without manually
configuring them one by one?

Kjell

Aug 7 '07 #3
ok.

First of all, it was not shown to my customer, I took it to a very nice
customer letting me use his network for testings.

It's a MDI app with three child forms and a couple of dialogs, It's not a
"ready" app. it's more of a cross section of a typical "My app" "lowest
level" just to confirm best practice. (I'm moving from VB6 towards C#)

so, I wanted to check that certain things is running as I was hoping.
and yes; I've made an Installation package.

so the execution looked first ok, the MDI form came up, what I did not see
is that the call to open the ADO connection to a locally stored Access DB was
kind of "skipped"

I don't know any other word for it, let me list which part I manage to
verify that never got executed.

I think this is equvilent to VB GetSettings
this.Left = (int)Application.UserAppDataRegistry.GetValue(this .Name +
"left", 50);
anyway, it was skipped.

''this is a nice function I found
User MyU = new User();
MyU.InitializeWithWindowsUser();

if (MyU.IsInRole("Domänadministratörer"))
mess = "You are a Domänadministratörer";
MessageBox.Show(mess);
it was skipped

and finally, open the database.
I don't know exactly what did not get executed, it could be open an external
file to get the Path for the database.
Or the ADO Open connection string, but I'm testing the result from the file
reading and if it fails I try to get input from user with OpenFileDialog.
this never show up so the whole function must have been skipped.

so with no ADO connection the child forms will not show anything.

End of program

I made the program very small by purpose, to get minimum chans for bugs and
maximum chans for a positive test run in customer environment.

Kjell

"Norman Yuan" wrote:
You need to provide more information on the "not working" thing. And it is
very common with a not thorough testing application does not work on the
client computer.

Is your app an Window Form application? (it seems yes)

How do you get in "installed" on client computer? Did you created an
installation package? Or did you simply XCopied whole folder to the client
computer? Dod you "install" it locally or on a network share?

Is proper version of .NET framework installed on the client computer?

With such very basic information, only thing that can be said is you did not
do things correctly and show your app to your client a bit too early.
"Kjell" <Kj***@discussions.microsoft.comwrote in message
news:CD**********************************@microsof t.com...
Hello

I've taken a four days training in C#, very good training, experienced
teacher and all that, very positive.

Went home spent a week making my first application, slightly more than the
usual "Hello world".

Took it with me to my best customer, and beleive it or not....It will not
work !!!!

How can that happen!!!
It works fine on my XP-pro at home and not at all on my customers XP-pro
with all updates, with Domain User account, no matter how I try, it
refuses
to execute certain sections of the code, everything trivial like showing a
form (empty of course) no problem, but everything interesting like open
the
ADO connection to the databas, get the recordset filled and fill the List
on
the empty form NOPE, can't do that due to some .Net Framework security
issues.

So, How can I make 200 client machines accept my C# code without manually
configuring them one by one?

Kjell


Aug 7 '07 #4
fair enough.

I took my daughter's PC, also a WinXP sp2 pro, bla bla very much in same
condition as my pc (except for VS2005) and equal to the pc's my customer is
having.

and this is making me more confuse, it works on her machine.

What is most disturbing is that there are no error messages, it just skips
certain parts of the code.

It costing me a half day to make one test on customer's pc, and this is the
best part;
I've built all pc's for that customer, built the whole domain for him, and I
have built my own domain in very much the same way.

without error messages how am i suppose to know whats wrong?

Kjell

"Phil Wilson" wrote:
It can happen very easily if the only system you tested it on is your
development system. Get Visrtual PC 2007, make yourself a XP SP2 virtual
machine (with updates if you like) do whatever deployment you're using and
see if it works.
--
Phil Wilson
[MVP Windows Installer]
"Kjell" <Kj***@discussions.microsoft.comwrote in message
news:CD**********************************@microsof t.com...
Hello

I've taken a four days training in C#, very good training, experienced
teacher and all that, very positive.

Went home spent a week making my first application, slightly more than the
usual "Hello world".

Took it with me to my best customer, and beleive it or not....It will not
work !!!!

How can that happen!!!
It works fine on my XP-pro at home and not at all on my customers XP-pro
with all updates, with Domain User account, no matter how I try, it
refuses
to execute certain sections of the code, everything trivial like showing a
form (empty of course) no problem, but everything interesting like open
the
ADO connection to the databas, get the recordset filled and fill the List
on
the empty form NOPE, can't do that due to some .Net Framework security
issues.

So, How can I make 200 client machines accept my C# code without manually
configuring them one by one?

Kjell


Aug 8 '07 #5
Do you have any try{...}catch(...){...} block in your code? if yes, place
MessageBox.Show() in the catch... clause so any error caught would pops up a
message box.

You can also place some message boxes before and after problemetic code
(some that "skipped". BTW, no code would simply skip by its own). For
example, you could place code to open connection (I hope you use ADO.NET,
not ADO as in VB) under a button click event handler, you may place a few
message boxes in every few lines of code. So, the clicking on button would
either open the connecction successfully, or failed with runtime error
raised. By seeing the message boxes pop up one by one, you would have idea
if your code runs to its end.
"Kjell" <Kj***@discussions.microsoft.comwrote in message
news:10**********************************@microsof t.com...
ok.

First of all, it was not shown to my customer, I took it to a very nice
customer letting me use his network for testings.

It's a MDI app with three child forms and a couple of dialogs, It's not a
"ready" app. it's more of a cross section of a typical "My app" "lowest
level" just to confirm best practice. (I'm moving from VB6 towards C#)

so, I wanted to check that certain things is running as I was hoping.
and yes; I've made an Installation package.

so the execution looked first ok, the MDI form came up, what I did not see
is that the call to open the ADO connection to a locally stored Access DB
was
kind of "skipped"

I don't know any other word for it, let me list which part I manage to
verify that never got executed.

I think this is equvilent to VB GetSettings
this.Left = (int)Application.UserAppDataRegistry.GetValue(this .Name +
"left", 50);
anyway, it was skipped.

''this is a nice function I found
User MyU = new User();
MyU.InitializeWithWindowsUser();

if (MyU.IsInRole("Domänadministratörer"))
mess = "You are a Domänadministratörer";
MessageBox.Show(mess);
it was skipped

and finally, open the database.
I don't know exactly what did not get executed, it could be open an
external
file to get the Path for the database.
Or the ADO Open connection string, but I'm testing the result from the
file
reading and if it fails I try to get input from user with OpenFileDialog.
this never show up so the whole function must have been skipped.

so with no ADO connection the child forms will not show anything.

End of program

I made the program very small by purpose, to get minimum chans for bugs
and
maximum chans for a positive test run in customer environment.

Kjell

"Norman Yuan" wrote:
>You need to provide more information on the "not working" thing. And it
is
very common with a not thorough testing application does not work on the
client computer.

Is your app an Window Form application? (it seems yes)

How do you get in "installed" on client computer? Did you created an
installation package? Or did you simply XCopied whole folder to the
client
computer? Dod you "install" it locally or on a network share?

Is proper version of .NET framework installed on the client computer?

With such very basic information, only thing that can be said is you did
not
do things correctly and show your app to your client a bit too early.
"Kjell" <Kj***@discussions.microsoft.comwrote in message
news:CD**********************************@microso ft.com...
Hello

I've taken a four days training in C#, very good training, experienced
teacher and all that, very positive.

Went home spent a week making my first application, slightly more than
the
usual "Hello world".

Took it with me to my best customer, and beleive it or not....It will
not
work !!!!

How can that happen!!!
It works fine on my XP-pro at home and not at all on my customers
XP-pro
with all updates, with Domain User account, no matter how I try, it
refuses
to execute certain sections of the code, everything trivial like
showing a
form (empty of course) no problem, but everything interesting like open
the
ADO connection to the databas, get the recordset filled and fill the
List
on
the empty form NOPE, can't do that due to some .Net Framework security
issues.

So, How can I make 200 client machines accept my C# code without
manually
configuring them one by one?

Kjell



Aug 8 '07 #6
Hello Kjell,

You made the following statements:
<< the call to open the ADO connection to a locally stored Access DB was
kind of "skipped" >>
<< it just skips certain parts of the code >>
<< very much in same condition as my pc (except for VS2005) and equal to the
pc's my customer is having. >>

You would benefit from changing the way you think about computers and how
they work. Computers are dignital devices - not analog devices. So nothing
in a computer "kind of" happens. It either happens or it does not happen.
That is the truth or at least should be the underlying assumption about all
of your troubleshooting efforts - even if there is a *perception* that
something "kind of" happens.

Computers do not "just skips certain parts of the code": Your working
assumption should be that the only reason code would fail to execute is if
there is some specific and knowable reason.

No two computers are identical - period. You write that your daughters PC is
"in very much the same condition". Remember that means it is NOT in fact in
the *same* condition. Your customers PCs are NOT equal either - not to each
other, not to your daughters, and not to yours. The only time they would be
"practically identical" is immediately after reimaging from a standard
image.

So rather than becoming upset because your assumptions and expectations are
obviously invalid, you would benefit from changing your assumptions - rather
than blaming the computers, .NET, or inventing wild theories involving
possible analog aspects of these digital devices.
Fianlly, regarding
<< without error messages how am i suppose to know whats wrong? >>

Your question practically answers itself. You aren't supposed to know what's
wrong if no messages are appearing. So if you aren't getting error messages,
then stick in some messages of your own. There are many ways to do this:
Show a message box at critical points in the code- and have the message box
display the current value of important variables; write to a text file -
include line numbers, value of critical variables, sequence, return value of
called methods, implement some Trace listeners, etc.

But before you do that, check the obvious stuff. How does your application
connect to the database. Surely that is going to be an obvious difference
between your computer and those at the customer site. What does your
connection string look like - how is it set... hard-coded, or from .Settings
or App.config.

"change how you think - and change your [debugging] life"

-HTH

-"Smithers"

"Kjell" <Kj***@discussions.microsoft.comwrote in message
news:65**********************************@microsof t.com...
fair enough.

I took my daughter's PC, also a WinXP sp2 pro, bla bla very much in same
condition as my pc (except for VS2005) and equal to the pc's my customer
is
having.

and this is making me more confuse, it works on her machine.

What is most disturbing is that there are no error messages, it just skips
certain parts of the code.

It costing me a half day to make one test on customer's pc, and this is
the
best part;
I've built all pc's for that customer, built the whole domain for him, and
I
have built my own domain in very much the same way.

without error messages how am i suppose to know whats wrong?

Kjell

"Phil Wilson" wrote:
>It can happen very easily if the only system you tested it on is your
development system. Get Visrtual PC 2007, make yourself a XP SP2 virtual
machine (with updates if you like) do whatever deployment you're using
and
see if it works.
--
Phil Wilson
[MVP Windows Installer]
"Kjell" <Kj***@discussions.microsoft.comwrote in message
news:CD**********************************@microso ft.com...
Hello

I've taken a four days training in C#, very good training, experienced
teacher and all that, very positive.

Went home spent a week making my first application, slightly more than
the
usual "Hello world".

Took it with me to my best customer, and beleive it or not....It will
not
work !!!!

How can that happen!!!
It works fine on my XP-pro at home and not at all on my customers
XP-pro
with all updates, with Domain User account, no matter how I try, it
refuses
to execute certain sections of the code, everything trivial like
showing a
form (empty of course) no problem, but everything interesting like open
the
ADO connection to the databas, get the recordset filled and fill the
List
on
the empty form NOPE, can't do that due to some .Net Framework security
issues.

So, How can I make 200 client machines accept my C# code without
manually
configuring them one by one?

Kjell



Aug 8 '07 #7
ok, I'm slowely catching some of the pieces here.

There's no way I'm going to travel 60 km to test every step, some errors was
discovered on anoter machine of me, so I'll have to assume whats going wrong
when at customer.

There is a try..catch when opening the connection that can explain that
problem.
I'm still surprised that the attempt to retrieve info from the db is not
throwing an error if the connection never was opened, I've no try....catch
doing that.

btw, How can i tell if i'm using ADO as in VB or .Net ADO ??
Kjell
"Norman Yuan" wrote:
Do you have any try{...}catch(...){...} block in your code? if yes, place
MessageBox.Show() in the catch... clause so any error caught would pops up a
message box.

You can also place some message boxes before and after problemetic code
(some that "skipped". BTW, no code would simply skip by its own). For
example, you could place code to open connection (I hope you use ADO.NET,
not ADO as in VB) under a button click event handler, you may place a few
message boxes in every few lines of code. So, the clicking on button would
either open the connecction successfully, or failed with runtime error
raised. By seeing the message boxes pop up one by one, you would have idea
if your code runs to its end.
"Kjell" <Kj***@discussions.microsoft.comwrote in message
news:10**********************************@microsof t.com...
ok.

First of all, it was not shown to my customer, I took it to a very nice
customer letting me use his network for testings.

It's a MDI app with three child forms and a couple of dialogs, It's not a
"ready" app. it's more of a cross section of a typical "My app" "lowest
level" just to confirm best practice. (I'm moving from VB6 towards C#)

so, I wanted to check that certain things is running as I was hoping.
and yes; I've made an Installation package.

so the execution looked first ok, the MDI form came up, what I did not see
is that the call to open the ADO connection to a locally stored Access DB
was
kind of "skipped"

I don't know any other word for it, let me list which part I manage to
verify that never got executed.

I think this is equvilent to VB GetSettings
this.Left = (int)Application.UserAppDataRegistry.GetValue(this .Name +
"left", 50);
anyway, it was skipped.

''this is a nice function I found
User MyU = new User();
MyU.InitializeWithWindowsUser();

if (MyU.IsInRole("Domänadministratörer"))
mess = "You are a Domänadministratörer";
MessageBox.Show(mess);
it was skipped

and finally, open the database.
I don't know exactly what did not get executed, it could be open an
external
file to get the Path for the database.
Or the ADO Open connection string, but I'm testing the result from the
file
reading and if it fails I try to get input from user with OpenFileDialog.
this never show up so the whole function must have been skipped.

so with no ADO connection the child forms will not show anything.

End of program

I made the program very small by purpose, to get minimum chans for bugs
and
maximum chans for a positive test run in customer environment.

Kjell

"Norman Yuan" wrote:
You need to provide more information on the "not working" thing. And it
is
very common with a not thorough testing application does not work on the
client computer.

Is your app an Window Form application? (it seems yes)

How do you get in "installed" on client computer? Did you created an
installation package? Or did you simply XCopied whole folder to the
client
computer? Dod you "install" it locally or on a network share?

Is proper version of .NET framework installed on the client computer?

With such very basic information, only thing that can be said is you did
not
do things correctly and show your app to your client a bit too early.
"Kjell" <Kj***@discussions.microsoft.comwrote in message
news:CD**********************************@microsof t.com...
Hello

I've taken a four days training in C#, very good training, experienced
teacher and all that, very positive.

Went home spent a week making my first application, slightly more than
the
usual "Hello world".

Took it with me to my best customer, and beleive it or not....It will
not
work !!!!

How can that happen!!!
It works fine on my XP-pro at home and not at all on my customers
XP-pro
with all updates, with Domain User account, no matter how I try, it
refuses
to execute certain sections of the code, everything trivial like
showing a
form (empty of course) no problem, but everything interesting like open
the
ADO connection to the databas, get the recordset filled and fill the
List
on
the empty form NOPE, can't do that due to some .Net Framework security
issues.

So, How can I make 200 client machines accept my C# code without
manually
configuring them one by one?

Kjell


Aug 8 '07 #8
thanks for the lecture smithers :-)

Yes, I was a bit upset, maybe I should not have open the thread in the first
pace at all.

I'm not blaiming anyone of you guys doing your best to help us with various
..Net problems, you're all doing a great job.

and your're absolutely right, computer's are digital devices, always has
been always will be, and they can not by them self decide to skip anything
without the program author's will.

sorry for giving you that impression, English is not my native language.

I was very positive towards C# after finishing the training, and now with a
little distance to the result of the first attempt of coding I'm surprised
that so much error handling is part of the code without me having to code it.

That's how I should have expressed myself if I did my research correctly
before coming here. I'll do my homework better in the future.

Maybe there is one thing you could help me with.?

I'm mostly doing applications used by many over a local network, meaning
that the app.exe file is stored on a server share.

I tried to find the app.exe file after the application was installed using
the built-in application package, I could not find it, yet it's there !!!!!
I must have missed something from the training or they never told me the
secret here, can someone bring a light to this.

Can I make a setup program within the VS2005 not containing the app.exe file
but only the required resources to run the app.exe file and then place the
app.exe file on a server share and a shortcut on the desktop?

Or, am I totally derailed here.....?

Kjell

"Smithers" wrote:
Hello Kjell,

You made the following statements:
<< the call to open the ADO connection to a locally stored Access DB was
kind of "skipped" >>
<< it just skips certain parts of the code >>
<< very much in same condition as my pc (except for VS2005) and equal to the
pc's my customer is having. >>

You would benefit from changing the way you think about computers and how
they work. Computers are dignital devices - not analog devices. So nothing
in a computer "kind of" happens. It either happens or it does not happen.
That is the truth or at least should be the underlying assumption about all
of your troubleshooting efforts - even if there is a *perception* that
something "kind of" happens.

Computers do not "just skips certain parts of the code": Your working
assumption should be that the only reason code would fail to execute is if
there is some specific and knowable reason.

No two computers are identical - period. You write that your daughters PC is
"in very much the same condition". Remember that means it is NOT in fact in
the *same* condition. Your customers PCs are NOT equal either - not to each
other, not to your daughters, and not to yours. The only time they would be
"practically identical" is immediately after reimaging from a standard
image.

So rather than becoming upset because your assumptions and expectations are
obviously invalid, you would benefit from changing your assumptions - rather
than blaming the computers, .NET, or inventing wild theories involving
possible analog aspects of these digital devices.
Fianlly, regarding
<< without error messages how am i suppose to know whats wrong? >>

Your question practically answers itself. You aren't supposed to know what's
wrong if no messages are appearing. So if you aren't getting error messages,
then stick in some messages of your own. There are many ways to do this:
Show a message box at critical points in the code- and have the message box
display the current value of important variables; write to a text file -
include line numbers, value of critical variables, sequence, return value of
called methods, implement some Trace listeners, etc.

But before you do that, check the obvious stuff. How does your application
connect to the database. Surely that is going to be an obvious difference
between your computer and those at the customer site. What does your
connection string look like - how is it set... hard-coded, or from .Settings
or App.config.

"change how you think - and change your [debugging] life"

-HTH

-"Smithers"

"Kjell" <Kj***@discussions.microsoft.comwrote in message
news:65**********************************@microsof t.com...
fair enough.

I took my daughter's PC, also a WinXP sp2 pro, bla bla very much in same
condition as my pc (except for VS2005) and equal to the pc's my customer
is
having.

and this is making me more confuse, it works on her machine.

What is most disturbing is that there are no error messages, it just skips
certain parts of the code.

It costing me a half day to make one test on customer's pc, and this is
the
best part;
I've built all pc's for that customer, built the whole domain for him, and
I
have built my own domain in very much the same way.

without error messages how am i suppose to know whats wrong?

Kjell

"Phil Wilson" wrote:
It can happen very easily if the only system you tested it on is your
development system. Get Visrtual PC 2007, make yourself a XP SP2 virtual
machine (with updates if you like) do whatever deployment you're using
and
see if it works.
--
Phil Wilson
[MVP Windows Installer]
"Kjell" <Kj***@discussions.microsoft.comwrote in message
news:CD**********************************@microsof t.com...
Hello

I've taken a four days training in C#, very good training, experienced
teacher and all that, very positive.

Went home spent a week making my first application, slightly more than
the
usual "Hello world".

Took it with me to my best customer, and beleive it or not....It will
not
work !!!!

How can that happen!!!
It works fine on my XP-pro at home and not at all on my customers
XP-pro
with all updates, with Domain User account, no matter how I try, it
refuses
to execute certain sections of the code, everything trivial like
showing a
form (empty of course) no problem, but everything interesting like open
the
ADO connection to the databas, get the recordset filled and fill the
List
on
the empty form NOPE, can't do that due to some .Net Framework security
issues.

So, How can I make 200 client machines accept my C# code without
manually
configuring them one by one?

Kjell


Aug 8 '07 #9
<snip>
Maybe there is one thing you could help me with.?

I'm mostly doing applications used by many over a local network, meaning
that the app.exe file is stored on a server share.

I tried to find the app.exe file after the application was installed using
the built-in application package, I could not find it, yet it's there
!!!!!
I must have missed something from the training or they never told me the
secret here, can someone bring a light to this.

Can I make a setup program within the VS2005 not containing the app.exe
file
but only the required resources to run the app.exe file and then place the
app.exe file on a server share and a shortcut on the desktop?

What might be helpful for you is to *manually* install your application once
or twice. One beautiful feature of .NET is known as "XCopy deployment" -
which more-or-less means (1) create a folder on the target machine (2) copy
the .exe to the folder (3) copy any supporting .dll files to the same
folder; and (4) create a shortcut on the desktop to the .exe. Assuming that
all of the supporting .dll files are .NET assemblies, it should all work
just fine. That's the most basic way to install a simple .NET application.
Things can get a bit more complicated if your application relies on any
legacy .com .dlls, a database, etc.

The point is that you should not rely on the installation package until you
understand exactly what it *should* be doing. Given your situation, it is
clear that it is not doing what you expect. This means that you don't know
what it is *actually* doing compared to what it should be doing. So if you
were to manually install everything once or twice, you would gain more
knowledge about what is or should go where. Then when you create an
installation package, you can verify that it is doing exactly what it should
do - and if something goes wrong, you know exactly what to look for.

Separately, you need to verify that each computer has the proper minimal
components already installed, and any required connectivity established.
Have you verified .NET Framework versions? What about dependent assemblies?
And the database - how do the users connect? Is it SQL Server? Is it MS
Access? If MS Access, are required drive letter(s) mapped - if SQL Server,
are required ports opened on a firewall? Now we're grasping at straws....

We cannot possibly help you debug your specific your problem because you
give us so little to work with. So all we can do is give you general
guidelines for troubleshooting. These guidelines would be valid for *any*
developement effort or troubleshooting effort.

Don't be fooled by that class you took. Classes are designed to get you
through some very small and simple applications. Everything usually "just
works" in a class because the instructor made it that way. But when you are
on your own outside of the class, things can get complicated very quickly;
you have to have some good analytical skills to figure out what's going on.
The problem isn't with you (per se) or with .NET (certainly not there) - but
with the unrealistic expectations created during the course where the entire
subject matter was well-planned and sanitized long before you showed up.

Finally, ESL isn't a problem. Your written English is fine.

-HTH
Aug 8 '07 #10
Addition to Smithers had said.

First, try XCopy method to "install" your app on a computer. This is the
simplest way to "install" an .NET app (copying everything in you projects'
"bin\Release" folder to the targeting computer.

If this gets your app runs, then your installation package must not built
correctly. As Sithers said, you need to know what should be packaged
clearly.

You have mentioned that you want to place the app.exe on a network share
(drive). Is this what you actually did at your client site. If yes, then
that probably is where your problem comes: by default, .NET treat any code
loaded from outside running computer as unsafe. You need to use CASPOL.exe
tool to configure .NET code access security, i.e. give proper trust to
certain code group (it could be a network share, an Internet site, or entire
local intranet...).

I do not believe a short training course would go that far on this kind of
topic, but you do need to know that if you load app.exe from a location
other than the local computer.

If you do not have time yet to know this CAS (code access security) stuff,
then alway install the app.exe locally, and try to use XCopy might be a good
start point.
"Kjell" <Kj***@discussions.microsoft.comwrote in message
news:28**********************************@microsof t.com...
thanks for the lecture smithers :-)

Yes, I was a bit upset, maybe I should not have open the thread in the
first
pace at all.

I'm not blaiming anyone of you guys doing your best to help us with
various
.Net problems, you're all doing a great job.

and your're absolutely right, computer's are digital devices, always has
been always will be, and they can not by them self decide to skip anything
without the program author's will.

sorry for giving you that impression, English is not my native language.

I was very positive towards C# after finishing the training, and now with
a
little distance to the result of the first attempt of coding I'm surprised
that so much error handling is part of the code without me having to code
it.

That's how I should have expressed myself if I did my research correctly
before coming here. I'll do my homework better in the future.

Maybe there is one thing you could help me with.?

I'm mostly doing applications used by many over a local network, meaning
that the app.exe file is stored on a server share.

I tried to find the app.exe file after the application was installed using
the built-in application package, I could not find it, yet it's there
!!!!!
I must have missed something from the training or they never told me the
secret here, can someone bring a light to this.

Can I make a setup program within the VS2005 not containing the app.exe
file
but only the required resources to run the app.exe file and then place the
app.exe file on a server share and a shortcut on the desktop?

Or, am I totally derailed here.....?

Kjell

"Smithers" wrote:
>Hello Kjell,

You made the following statements:
<< the call to open the ADO connection to a locally stored Access DB was
kind of "skipped" >>
<< it just skips certain parts of the code >>
<< very much in same condition as my pc (except for VS2005) and equal to
the
pc's my customer is having. >>

You would benefit from changing the way you think about computers and how
they work. Computers are dignital devices - not analog devices. So
nothing
in a computer "kind of" happens. It either happens or it does not happen.
That is the truth or at least should be the underlying assumption about
all
of your troubleshooting efforts - even if there is a *perception* that
something "kind of" happens.

Computers do not "just skips certain parts of the code": Your working
assumption should be that the only reason code would fail to execute is
if
there is some specific and knowable reason.

No two computers are identical - period. You write that your daughters PC
is
"in very much the same condition". Remember that means it is NOT in fact
in
the *same* condition. Your customers PCs are NOT equal either - not to
each
other, not to your daughters, and not to yours. The only time they would
be
"practically identical" is immediately after reimaging from a standard
image.

So rather than becoming upset because your assumptions and expectations
are
obviously invalid, you would benefit from changing your assumptions -
rather
than blaming the computers, .NET, or inventing wild theories involving
possible analog aspects of these digital devices.
Fianlly, regarding
<< without error messages how am i suppose to know whats wrong? >>

Your question practically answers itself. You aren't supposed to know
what's
wrong if no messages are appearing. So if you aren't getting error
messages,
then stick in some messages of your own. There are many ways to do this:
Show a message box at critical points in the code- and have the message
box
display the current value of important variables; write to a text file -
include line numbers, value of critical variables, sequence, return value
of
called methods, implement some Trace listeners, etc.

But before you do that, check the obvious stuff. How does your
application
connect to the database. Surely that is going to be an obvious difference
between your computer and those at the customer site. What does your
connection string look like - how is it set... hard-coded, or from
.Settings
or App.config.

"change how you think - and change your [debugging] life"

-HTH

-"Smithers"

"Kjell" <Kj***@discussions.microsoft.comwrote in message
news:65**********************************@microso ft.com...
fair enough.

I took my daughter's PC, also a WinXP sp2 pro, bla bla very much in
same
condition as my pc (except for VS2005) and equal to the pc's my
customer
is
having.

and this is making me more confuse, it works on her machine.

What is most disturbing is that there are no error messages, it just
skips
certain parts of the code.

It costing me a half day to make one test on customer's pc, and this is
the
best part;
I've built all pc's for that customer, built the whole domain for him,
and
I
have built my own domain in very much the same way.

without error messages how am i suppose to know whats wrong?

Kjell

"Phil Wilson" wrote:

It can happen very easily if the only system you tested it on is your
development system. Get Visrtual PC 2007, make yourself a XP SP2
virtual
machine (with updates if you like) do whatever deployment you're using
and
see if it works.
--
Phil Wilson
[MVP Windows Installer]
"Kjell" <Kj***@discussions.microsoft.comwrote in message
news:CD**********************************@microso ft.com...
Hello

I've taken a four days training in C#, very good training,
experienced
teacher and all that, very positive.

Went home spent a week making my first application, slightly more
than
the
usual "Hello world".

Took it with me to my best customer, and beleive it or not....It
will
not
work !!!!

How can that happen!!!
It works fine on my XP-pro at home and not at all on my customers
XP-pro
with all updates, with Domain User account, no matter how I try, it
refuses
to execute certain sections of the code, everything trivial like
showing a
form (empty of course) no problem, but everything interesting like
open
the
ADO connection to the databas, get the recordset filled and fill the
List
on
the empty form NOPE, can't do that due to some .Net Framework
security
issues.

So, How can I make 200 client machines accept my C# code without
manually
configuring them one by one?

Kjell


Aug 9 '07 #11
Yes, thanks Norman

This is what i've been waiting for, I had no knowledge about CASPOL.exe
No wonder it never worked as planned.

Reading the articles about CASPOL really removes alot of question marks for
me.

It's not easy till you know what to ask for, right! :-)

Thanks Norman for revealing this valuable information for me.
PS, I've already read through several of the articles found via google, but
I'm not sure how to get my hands on that tool, One site having a spanish
version actually asked for $9.95 ?!?!?!
Do I have to buy that tool seperately?, I've already spent thousands of
dollars on my MSDN-Pro subscription, doesn't that include such a vital tool???

Kjell

"Norman Yuan" wrote:
Addition to Smithers had said.

First, try XCopy method to "install" your app on a computer. This is the
simplest way to "install" an .NET app (copying everything in you projects'
"bin\Release" folder to the targeting computer.

If this gets your app runs, then your installation package must not built
correctly. As Sithers said, you need to know what should be packaged
clearly.

You have mentioned that you want to place the app.exe on a network share
(drive). Is this what you actually did at your client site. If yes, then
that probably is where your problem comes: by default, .NET treat any code
loaded from outside running computer as unsafe. You need to use CASPOL.exe
tool to configure .NET code access security, i.e. give proper trust to
certain code group (it could be a network share, an Internet site, or entire
local intranet...).

I do not believe a short training course would go that far on this kind of
topic, but you do need to know that if you load app.exe from a location
other than the local computer.

If you do not have time yet to know this CAS (code access security) stuff,
then alway install the app.exe locally, and try to use XCopy might be a good
start point.
"Kjell" <Kj***@discussions.microsoft.comwrote in message
news:28**********************************@microsof t.com...
thanks for the lecture smithers :-)

Yes, I was a bit upset, maybe I should not have open the thread in the
first
pace at all.

I'm not blaiming anyone of you guys doing your best to help us with
various
.Net problems, you're all doing a great job.

and your're absolutely right, computer's are digital devices, always has
been always will be, and they can not by them self decide to skip anything
without the program author's will.

sorry for giving you that impression, English is not my native language.

I was very positive towards C# after finishing the training, and now with
a
little distance to the result of the first attempt of coding I'm surprised
that so much error handling is part of the code without me having to code
it.

That's how I should have expressed myself if I did my research correctly
before coming here. I'll do my homework better in the future.

Maybe there is one thing you could help me with.?

I'm mostly doing applications used by many over a local network, meaning
that the app.exe file is stored on a server share.

I tried to find the app.exe file after the application was installed using
the built-in application package, I could not find it, yet it's there
!!!!!
I must have missed something from the training or they never told me the
secret here, can someone bring a light to this.

Can I make a setup program within the VS2005 not containing the app.exe
file
but only the required resources to run the app.exe file and then place the
app.exe file on a server share and a shortcut on the desktop?

Or, am I totally derailed here.....?

Kjell

"Smithers" wrote:
Hello Kjell,

You made the following statements:
<< the call to open the ADO connection to a locally stored Access DB was
kind of "skipped" >>
<< it just skips certain parts of the code >>
<< very much in same condition as my pc (except for VS2005) and equal to
the
pc's my customer is having. >>

You would benefit from changing the way you think about computers and how
they work. Computers are dignital devices - not analog devices. So
nothing
in a computer "kind of" happens. It either happens or it does not happen.
That is the truth or at least should be the underlying assumption about
all
of your troubleshooting efforts - even if there is a *perception* that
something "kind of" happens.

Computers do not "just skips certain parts of the code": Your working
assumption should be that the only reason code would fail to execute is
if
there is some specific and knowable reason.

No two computers are identical - period. You write that your daughters PC
is
"in very much the same condition". Remember that means it is NOT in fact
in
the *same* condition. Your customers PCs are NOT equal either - not to
each
other, not to your daughters, and not to yours. The only time they would
be
"practically identical" is immediately after reimaging from a standard
image.

So rather than becoming upset because your assumptions and expectations
are
obviously invalid, you would benefit from changing your assumptions -
rather
than blaming the computers, .NET, or inventing wild theories involving
possible analog aspects of these digital devices.
Fianlly, regarding
<< without error messages how am i suppose to know whats wrong? >>

Your question practically answers itself. You aren't supposed to know
what's
wrong if no messages are appearing. So if you aren't getting error
messages,
then stick in some messages of your own. There are many ways to do this:
Show a message box at critical points in the code- and have the message
box
display the current value of important variables; write to a text file -
include line numbers, value of critical variables, sequence, return value
of
called methods, implement some Trace listeners, etc.

But before you do that, check the obvious stuff. How does your
application
connect to the database. Surely that is going to be an obvious difference
between your computer and those at the customer site. What does your
connection string look like - how is it set... hard-coded, or from
.Settings
or App.config.

"change how you think - and change your [debugging] life"

-HTH

-"Smithers"

"Kjell" <Kj***@discussions.microsoft.comwrote in message
news:65**********************************@microsof t.com...
fair enough.

I took my daughter's PC, also a WinXP sp2 pro, bla bla very much in
same
condition as my pc (except for VS2005) and equal to the pc's my
customer
is
having.

and this is making me more confuse, it works on her machine.

What is most disturbing is that there are no error messages, it just
skips
certain parts of the code.

It costing me a half day to make one test on customer's pc, and this is
the
best part;
I've built all pc's for that customer, built the whole domain for him,
and
I
have built my own domain in very much the same way.

without error messages how am i suppose to know whats wrong?

Kjell

"Phil Wilson" wrote:

It can happen very easily if the only system you tested it on is your
development system. Get Visrtual PC 2007, make yourself a XP SP2
virtual
machine (with updates if you like) do whatever deployment you're using
and
see if it works.
--
Phil Wilson
[MVP Windows Installer]
"Kjell" <Kj***@discussions.microsoft.comwrote in message
news:CD**********************************@microsof t.com...
Hello

I've taken a four days training in C#, very good training,
experienced
teacher and all that, very positive.

Went home spent a week making my first application, slightly more
than
the
usual "Hello world".

Took it with me to my best customer, and beleive it or not....It
will
not
work !!!!

How can that happen!!!
It works fine on my XP-pro at home and not at all on my customers
XP-pro
with all updates, with Domain User account, no matter how I try, it
refuses
to execute certain sections of the code, everything trivial like
showing a
form (empty of course) no problem, but everything interesting like
open
the
ADO connection to the databas, get the recordset filled and fill the
List
on
the empty form NOPE, can't do that due to some .Net Framework
security
issues.

So, How can I make 200 client machines accept my C# code without
manually
configuring them one by one?

Kjell


Aug 9 '07 #12
oooops, reg Caspol.... I wasen't looking hard enough....

It's on my disk, has probably been there since long.

Not sure if it's part of the Framwork pieces or VS2005 but it doesn't matter
right now, this is good news... :-)

Kjell

"Norman Yuan" wrote:
Addition to Smithers had said.

First, try XCopy method to "install" your app on a computer. This is the
simplest way to "install" an .NET app (copying everything in you projects'
"bin\Release" folder to the targeting computer.

If this gets your app runs, then your installation package must not built
correctly. As Sithers said, you need to know what should be packaged
clearly.

You have mentioned that you want to place the app.exe on a network share
(drive). Is this what you actually did at your client site. If yes, then
that probably is where your problem comes: by default, .NET treat any code
loaded from outside running computer as unsafe. You need to use CASPOL.exe
tool to configure .NET code access security, i.e. give proper trust to
certain code group (it could be a network share, an Internet site, or entire
local intranet...).

I do not believe a short training course would go that far on this kind of
topic, but you do need to know that if you load app.exe from a location
other than the local computer.

If you do not have time yet to know this CAS (code access security) stuff,
then alway install the app.exe locally, and try to use XCopy might be a good
start point.
"Kjell" <Kj***@discussions.microsoft.comwrote in message
news:28**********************************@microsof t.com...
thanks for the lecture smithers :-)

Yes, I was a bit upset, maybe I should not have open the thread in the
first
pace at all.

I'm not blaiming anyone of you guys doing your best to help us with
various
.Net problems, you're all doing a great job.

and your're absolutely right, computer's are digital devices, always has
been always will be, and they can not by them self decide to skip anything
without the program author's will.

sorry for giving you that impression, English is not my native language.

I was very positive towards C# after finishing the training, and now with
a
little distance to the result of the first attempt of coding I'm surprised
that so much error handling is part of the code without me having to code
it.

That's how I should have expressed myself if I did my research correctly
before coming here. I'll do my homework better in the future.

Maybe there is one thing you could help me with.?

I'm mostly doing applications used by many over a local network, meaning
that the app.exe file is stored on a server share.

I tried to find the app.exe file after the application was installed using
the built-in application package, I could not find it, yet it's there
!!!!!
I must have missed something from the training or they never told me the
secret here, can someone bring a light to this.

Can I make a setup program within the VS2005 not containing the app.exe
file
but only the required resources to run the app.exe file and then place the
app.exe file on a server share and a shortcut on the desktop?

Or, am I totally derailed here.....?

Kjell

"Smithers" wrote:
Hello Kjell,

You made the following statements:
<< the call to open the ADO connection to a locally stored Access DB was
kind of "skipped" >>
<< it just skips certain parts of the code >>
<< very much in same condition as my pc (except for VS2005) and equal to
the
pc's my customer is having. >>

You would benefit from changing the way you think about computers and how
they work. Computers are dignital devices - not analog devices. So
nothing
in a computer "kind of" happens. It either happens or it does not happen.
That is the truth or at least should be the underlying assumption about
all
of your troubleshooting efforts - even if there is a *perception* that
something "kind of" happens.

Computers do not "just skips certain parts of the code": Your working
assumption should be that the only reason code would fail to execute is
if
there is some specific and knowable reason.

No two computers are identical - period. You write that your daughters PC
is
"in very much the same condition". Remember that means it is NOT in fact
in
the *same* condition. Your customers PCs are NOT equal either - not to
each
other, not to your daughters, and not to yours. The only time they would
be
"practically identical" is immediately after reimaging from a standard
image.

So rather than becoming upset because your assumptions and expectations
are
obviously invalid, you would benefit from changing your assumptions -
rather
than blaming the computers, .NET, or inventing wild theories involving
possible analog aspects of these digital devices.
Fianlly, regarding
<< without error messages how am i suppose to know whats wrong? >>

Your question practically answers itself. You aren't supposed to know
what's
wrong if no messages are appearing. So if you aren't getting error
messages,
then stick in some messages of your own. There are many ways to do this:
Show a message box at critical points in the code- and have the message
box
display the current value of important variables; write to a text file -
include line numbers, value of critical variables, sequence, return value
of
called methods, implement some Trace listeners, etc.

But before you do that, check the obvious stuff. How does your
application
connect to the database. Surely that is going to be an obvious difference
between your computer and those at the customer site. What does your
connection string look like - how is it set... hard-coded, or from
.Settings
or App.config.

"change how you think - and change your [debugging] life"

-HTH

-"Smithers"

"Kjell" <Kj***@discussions.microsoft.comwrote in message
news:65**********************************@microsof t.com...
fair enough.

I took my daughter's PC, also a WinXP sp2 pro, bla bla very much in
same
condition as my pc (except for VS2005) and equal to the pc's my
customer
is
having.

and this is making me more confuse, it works on her machine.

What is most disturbing is that there are no error messages, it just
skips
certain parts of the code.

It costing me a half day to make one test on customer's pc, and this is
the
best part;
I've built all pc's for that customer, built the whole domain for him,
and
I
have built my own domain in very much the same way.

without error messages how am i suppose to know whats wrong?

Kjell

"Phil Wilson" wrote:

It can happen very easily if the only system you tested it on is your
development system. Get Visrtual PC 2007, make yourself a XP SP2
virtual
machine (with updates if you like) do whatever deployment you're using
and
see if it works.
--
Phil Wilson
[MVP Windows Installer]
"Kjell" <Kj***@discussions.microsoft.comwrote in message
news:CD**********************************@microsof t.com...
Hello

I've taken a four days training in C#, very good training,
experienced
teacher and all that, very positive.

Went home spent a week making my first application, slightly more
than
the
usual "Hello world".

Took it with me to my best customer, and beleive it or not....It
will
not
work !!!!

How can that happen!!!
It works fine on my XP-pro at home and not at all on my customers
XP-pro
with all updates, with Domain User account, no matter how I try, it
refuses
to execute certain sections of the code, everything trivial like
showing a
form (empty of course) no problem, but everything interesting like
open
the
ADO connection to the databas, get the recordset filled and fill the
List
on
the empty form NOPE, can't do that due to some .Net Framework
security
issues.

So, How can I make 200 client machines accept my C# code without
manually
configuring them one by one?

Kjell


Aug 9 '07 #13

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

Similar topics

3
by: Robert Blaha | last post by:
Hi, I'm runnig Linux/Mandrake9.0-Dolphin and try to update Apache 2.0.46 and PHP 4.3.2. Apache is OK bu with PHP I've problem. I unpacked distribution, run ../configure > configure.vysl, make...
0
by: pptran | last post by:
Hi, I am pretty new to building and installing Perl. Can someone help explain the severity of the following Perl 5.8.4 build error message? ==================================================...
2
by: Glenn | last post by:
Hi, I'm using cygwin and am trying to install DBI-mSQL and am getting errors on make .. any idea how to fix this (TIA): cpan> install DBD::mSQL Running install for module DBD::mSQL Running...
9
by: Joel Rodrigues | last post by:
Hi, I get the following error when I run make on Mac OS X v 10.1.5 Any ideas ? ---------------------------------------------------------- ar: illegal option -- s usage: ar -d archive file ......
8
by: Seeker | last post by:
Hello, In using Solaris Pro Compiler to compile Pro*C code. I am getting this error: make: Fatal error in reader: parser_proc_online.mk, line 26: Badly formed macro assignment Based on other...
28
by: Steven Bethard | last post by:
Ok, I finally have a PEP number. Here's the most updated version of the "make" statement PEP. I'll be posting it shortly to python-dev. Thanks again for the previous discussion and suggestions!...
7
by: Steven Bethard | last post by:
I've updated PEP 359 with a bunch of the recent suggestions. The patch is available at: http://bugs.python.org/1472459 and I've pasted the full text below. I've tried to be more explicit about...
10
by: Johs | last post by:
I have a source file called project.c. In the same folder I have a Makefile containing: CC=gcc CFLAGS=-g project: project.c $(CC) $(CFLAGS) project.c -o project
4
by: jalqadir | last post by:
Now that I am trying to install Debian from a CD, I found that the network card was not supported, I read that some dude had found a driver for the NIC in a MSI-M662 laptot, I myself don't know...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.