 |
| ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 3.5 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

August 23rd, 2010, 10:38 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
|
|
App throws error when run from network?
A compiled Windows program I wrote in VB.NET will run for me from a network drive when I have copied all the contents from my bin/release folder. When another user tries to run it from the same location though, they get this error message:
"Program" has encountered a problem and needs to close. We are sorry for the inconvenience.
There is no explanation of the nature of the problem, where it was in code when it happened, or even what it was trying to do. Msgboxes inserted in the load method are never displayed, so it appears to be happening before any of my code is even executed.
Does anybody have anything to suggest trying to track this down?
Here's a dump of the exception if that's of any help:
" at ISBA_PSI.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190\r\n at ISBA_PSI.My.MyProject.MyForms.get_frmISBA()\r\n at
ISBA_PSI.My.MyApplication.OnCreateMainForm() in D:\\Projects\\2008\\PSIWin\\ISBA-PSI\\My Project\\Application.Designer.vb:line 35\r\n at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.OnRun()\r\n at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.DoApplicationModel()\r\n at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.Run(String[] commandLine)\r\n at ISBA_PSI.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 78"
System.InvalidOperationException was unhandled
Message="An error occurred creating the form. See Exception.InnerException for details. The error is: Exception has been thrown by the target of an invocation."
Source="ISBA-PSI"
StackTrace:
at ISBA_PSI.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190
at ISBA_PSI.My.MyProject.MyForms.get_frmISBA()
at ISBA_PSI.My.MyApplication.OnCreateMainForm() in D:\Projects\2008\PSIWin\ISBA-PSI\My Project\Application.Designer.vb:line 35
at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.Run(String[] commandLine)
at ISBA_PSI.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
InnerException: System.Reflection.TargetInvocationException
Message="Exception has been thrown by the target of an invocation."
Source="mscorlib"
StackTrace:
at System.RuntimeMethodHandle._SerializationInvoke(Ob ject target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
at System.Reflection.RuntimeConstructorInfo.Serializa tionInvoke(Object target, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.Complet eISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.FixupSp ecialObject(ObjectHolder holder)
at System.Runtime.Serialization.ObjectManager.DoFixup s()
at System.Runtime.Serialization.Formatters.Binary.Obj ectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.Bin aryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Resources.ResourceReader.DeserializeObject( Int32 typeIndex)
at System.Resources.ResourceReader.LoadObjectV2(Int32 pos, ResourceTypeCode& typeCode)
at System.Resources.ResourceReader.LoadObject(Int32 pos, ResourceTypeCode& typeCode)
at System.Resources.RuntimeResourceSet.GetObject(Stri ng key, Boolean ignoreCase, Boolean isString)
at System.Resources.RuntimeResourceSet.GetObject(Stri ng key, Boolean ignoreCase)
at System.Resources.ResourceManager.GetObject(String name, CultureInfo culture, Boolean wrapUnmanagedMemStream)
at System.Resources.ResourceManager.GetObject(String name)
at ISBA_PSI.frmISBA.InitializeComponent() in D:\Projects\2008\PSIWin\ISBA-PSI\frmISBA.Designer.vb:line 184
at ISBA_PSI.frmISBA..ctor() in D:\Projects\2008\PSIWin\ISBA-PSI\frmISBA.vb:line 440
InnerException: System.ComponentModel.Win32Exception
Message="The parameter is incorrect"
Source="System.Drawing"
ErrorCode=-2147467259
NativeErrorCode=87
StackTrace:
at System.Drawing.Icon.Initialize(Int32 width, Int32 height)
at System.Drawing.Icon..ctor(SerializationInfo info, StreamingContext context)
InnerException:
Last edited by Ron Howerton; August 23rd, 2010 at 10:59 AM..
|
|

August 23rd, 2010, 11:35 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
|
|
This is clearly a problem with a dll that your program is using. In your target pc is not installed or the version present is not the one that is used by the exe.
I solved the same problem yesterday on a friend program :)
__________________
HTH
Gonzalo
================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the proof.
================================================== =========
|
|

August 23rd, 2010, 11:54 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
|
|
I've long suspected the DLL was the problem. I copied the DLL from the Release folder of the main project (which resides in the same Solution as the DLL project), assuming that the DLL file was being updated there with each rebuild, but I now note the file dates do not match. However, moving the latest compiled version of the DLL from the Release folder of that project has not resolved the problem.
Am I correct in my understanding that the DLL need not be "installed" on the local machine assuming it exists in the folder with the EXE that references it? Or MUST the DLL be registered on the machine running the EXE?
|
|

August 23rd, 2010, 04:15 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
|
|
I'm not so sure the problem is related to DLLs after all. It runs OK on any VISTA machine, but dies in XP.
|
|

August 24th, 2010, 08:38 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
|
|
First of all, did you realize that this is a ASP forum?? this Q would better fit on any vb.net or c# forum.
Anyway, you are running this from a network, so the exe is only being copied to the PC executing it (not any DLL), so probably the vista has "better" DLL that XP.
This is a dll problem. Try to copy the complete folder to the target machine and do a try.
__________________
HTH
Gonzalo
================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the proof.
================================================== =========
|
|

August 26th, 2010, 10:13 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
|
|
gbianchi - Sorry I was unable to determine the appropriate forum based on the original error message. Perhaps you could explain to all of us clueless lusers how I might have known the proper forum, when the most information I had when I originally asked my question was:
"Program" has encountered a problem and needs to close. We are sorry for the inconvenience.
Secondly, it is doubtful that VISTA has a newer DLL than XP. *I* created the DLL.
Third, we already tried copying the entire folder contents to the local machine with no apparent difference.
All snarky-less replies welcome!
|
|

August 26th, 2010, 10:41 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
You can find the complete list of forums on the main page: http://p2p.wrox.com/
Granted, because of the long list, it's not always easy to pick the right one. Using search in the page you can try to find the right one. Based on the phrase "A compiled Windows program I wrote in VB.NET", I think the best forum would have been one from the VB categories, such as http://p2p.wrox.com/visual-basic-13/ or a more generic .NET forum: http://p2p.wrox.com/net-15/ (as the fact you're using VB is probably not relevant to the problem.
I don't think gbianchi is trying to be difficult; I believe he's trying to help you. By picking the right forum, you increase your own chances of drawing attention from those people who understand what your problem is about. It's clearly not about ASP.NET, so you're likely to find the wrong people in an ASP.NET forum.
Anyway, could this be a permissions issue? .NET has a concept of trusted zones, so maybe the zone is trusted for you and not for the other user? To see if that's the case, copy the files to the local hard drive of the target machine and run the app from there. You may need to unblock the files by opening the Properties dialog for each file in Windows Explorer. If you see an Unblock button, click it to unblock.
Also, what DLL are you using? Is it 100% .NET, or is it a wrapper around a COM dll? In the latter case, you need to register the COM DLL on the target machine as well.
Cheers,
Imar
|
|

August 26th, 2010, 10:48 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
|
|
Again, I was unsure of what the cause was when I originally posted. I am still not convinced it has anything to do with VB.
To return to the actual problem: we have tried copying the files to the local HD,. It still doesn't work. There actually appears to be a compatability issue between programs compiled under VISSA but run on XP, and therefore appears to have nothing to do with the language used.
This will not be an issue in a few more weeks as the remaining XP machines convert to VISTA. So, AFIAC...dead thread.
|
|
 |