473,585 Members | 2,513 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MyApplication has encountered a problem... when not Administrator!

Hi,

Something strange is happing with my Windowf Forms application (VB.NET
2005): The users had all local Administrator-rights on there pc. We changed
it to the 'normal' users, and now they can't run our V.NET application
anymore!

The application starts (you can see the screen and caption etc), and than
they get the well known error "MyApplicat ion has encountered a problem and
needs to close" with the "send error report"-button etc.

When we change their rights back to PowerUser ou Administrator, it works
again...

Does anybody get any idea why this happens? And how to find a solution? Do
they need some special rights on something?
They all have Office 2003, some of them are on W2K, others on XP (and they
all have the problem)...

Thanks a lot in advance,

Pieter
Feb 20 '06 #1
7 1631
Hi Pieter,

Some ideas:

- Do you have exception handlers to trap exceptions?

- Develop and debug as a non-admin. See these resources about developing as
non-admin :

http://www.mztools.com/resources_net...s.htm#NonAdmin

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com

"Pieter" <pi**********@h otmail.com> escribió en el mensaje
news:%2******** *******@TK2MSFT NGP11.phx.gbl.. .
Hi,

Something strange is happing with my Windowf Forms application (VB.NET
2005): The users had all local Administrator-rights on there pc. We
changed it to the 'normal' users, and now they can't run our V.NET
application anymore!

The application starts (you can see the screen and caption etc), and than
they get the well known error "MyApplicat ion has encountered a problem and
needs to close" with the "send error report"-button etc.

When we change their rights back to PowerUser ou Administrator, it works
again...

Does anybody get any idea why this happens? And how to find a solution? Do
they need some special rights on something?
They all have Office 2003, some of them are on W2K, others on XP (and they
all have the problem)...

Thanks a lot in advance,

Pieter

Feb 20 '06 #2
Hi,

I do have exception handlers, which write all the exception to a file, but
there isn't any exception written to the file...
Some strange thing also: I tried to see where the error happens, by writing
every other line a small message to a file. And it never wrote one...
like this:
Private Sub frmMain_Load(By Val sender As Object, ByVal e As
System.EventArg s) Handles Me.Load
MessageSilent(" GlobalErrorHand ler")
'error-handeler
AddHandler System.Windows. Forms.Applicati on.ThreadExcept ion,
AddressOf GlobalErrorHand ler

MessageSilent(" Info.ProductNam e")
Me.Text = My.Application. Info.ProductNam e & " - version " &
My.Application. Info.Version.To String

MessageSilent(" Test Connection")

When I don't put the MessageSilent-log-writers in it, the Me.Text = .. is
executed (because I can see it in the caption), but with the MessageSilent
it doesn't change the caption...

To be complete: this is the wholce MessageSilent-method:
Public Sub MessageSilent(B yVal strMessage As String, Optional ByVal
strCaption As String = "")
Dim swFile As StreamWriter
swFile = New StreamWriter(Ap plication.Start upPath & "\" &
strErrorFile, True, System.Text.Enc oding.GetEncodi ng(1252))
If strMessage.Leng th > 0 Then
swFile.WriteLin e(Format(Now, "dd/MM/yyyy HH:mm:ss fffffff ") &
"MessageSil ent: " & strCaption & " - " & strMessage)
Else
swFile.WriteLin e(Format(Now, "dd/MM/yyyy HH:mm:ss fffffff ") &
"MessageSil ent: ")
End If
swFile.Flush()
swFile.Close()
End Sub

"Carlos J. Quintero [VB MVP]" <ca*****@NOSPAM sogecable.com> wrote in message
news:O3******** ******@TK2MSFTN GP11.phx.gbl...
Hi Pieter,

Some ideas:

- Do you have exception handlers to trap exceptions?

- Develop and debug as a non-admin. See these resources about developing
as non-admin :

http://www.mztools.com/resources_net...s.htm#NonAdmin

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com

Feb 20 '06 #3
Users do not have permission to write in the "c:\program files"
directory. So if you have your application installed in the program
files directory it will fail when you use the MessageSilent method.

Where does your exception logger write its log file? Does your user
have write permissions there?

Feb 20 '06 #4
It is indeed in the C:\Program Files\MyApplica tion\-directory...

Where should I put such a log-file normally? are there other 'system'
directory's in which they can't write neither? Documents and Settings?

<jo************ *@gmail.com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
Users do not have permission to write in the "c:\program files"
directory. So if you have your application installed in the program
files directory it will fail when you use the MessageSilent method.

Where does your exception logger write its log file? Does your user
have write permissions there?

Feb 20 '06 #5
This is the exception that is written in the eventlog (using DameWare):

EventID: 5000
Source: .NET Runtime 2.0 Error
Description: EventType clr20r3, P1 ghost.exe, P2 0.0.3.8, P3 43eb40d3, P4
mscorlib, P5 2.0.0.0, P6 4333ab80, P7 32f8, P8 15a, P9
system.unauthor izedaccess, P10 NIL.
Feb 20 '06 #6
You can write application data in folders inside C:\Document and
settings\<user> .

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com
"Pieter" <pi**********@h otmail.com> escribió en el mensaje
news:e3******** ******@TK2MSFTN GP09.phx.gbl...
It is indeed in the C:\Program Files\MyApplica tion\-directory...

Where should I put such a log-file normally? are there other 'system'
directory's in which they can't write neither? Documents and Settings?

Feb 20 '06 #7
I've tested it, and that's indeed the problem....
Really a pitty that Microsoft doesn't throw a normal exception in such a
case :-( It would have saved me some hours of searching.

Thanks a lot Carlos and Johan for the help!!!

Pieter
Feb 20 '06 #8

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

Similar topics

1
8748
by: Pratik kapadia | last post by:
when i try to load my asp pages i always have to face error .like " The server has encountered an error while loading an application during the processing of your request. Please refer to the event log for more detail information. Please contact the server administrator for assistance." if any one knows the solution please reply me on...
3
2342
by: Steven Fox | last post by:
============================================================ About DB2 Administration Tools Environment ============================================================ DB2 administration tools level: Product identifier SQL08015 Level identifier 02060106 Level DB2 v8.1.5.449 Build level ...
1
1078
by: Shalini | last post by:
Hi I just have a third party dll which does some custom functionality. The Dll have some apis which run only when the user is an administrator. I made a simple windows GUI application which makes use of the dll. Good it works fine when i am logged in as the Administrator. I made a Webservice which uses PInvoke thereby making use of the DLL....
1
1791
by: Shalini | last post by:
Hi I am posting this again.Sorry for the trouble. I just have a third party dll which does some custom functionality. The Dll have some apis which run only when the user is an administrator. I made a simple windows GUI application which makes use of the dll. Good it works fine when i am logged in as the Administrator. I made a Webservice...
3
1953
by: fong01 | last post by:
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it Server stack trace: at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)...
2
9383
by: Terry Olsen | last post by:
While running my application, either in or out of the debugger, after a while the message box pops up that says "MyApp.vshost.exe has encountered a problem and needs to close." What does the vshost.exe do? I don't get any other errors in my app and VB doesn't show any error. My application becomes unresponsive and closes when I click out of...
7
9023
by: Pieter | last post by:
Hi, Something strange is happing with my Windowf Forms application (VB.NET 2005): The users had all local Administrator-rights on there pc. We changed it to the 'normal' users, and now they can't run our V.NET application anymore! The application starts (you can see the screen and caption etc), and than they get the well known error...
1
2554
by: evoloyeu | last post by:
hi buddy,the error is: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: java.lang.NullPointerException
4
1766
by: Author | last post by:
This is regarding VS2005-generated files. I've searched a little and found out that *.vshost.* files are VS2005 generated for debugging purpose and should not be published to the end user. However, it's sorta hard to dig out any article about the MyApplication.application file. (Think about what you'll get if you search for "visual...
0
7836
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8336
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...
1
7950
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8212
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...
0
6606
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3835
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...
0
3863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2343
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1447
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.