Click here to Skip to main content
15,928,281 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to make a window Flash Pin
The ANZAC14-Oct-07 15:03
The ANZAC14-Oct-07 15:03 
Questionprinting RTB contents Pin
BooleanTrue13-Oct-07 11:50
professionalBooleanTrue13-Oct-07 11:50 
AnswerRe: printing RTB contents Pin
Dave Kreskowiak13-Oct-07 15:23
mveDave Kreskowiak13-Oct-07 15:23 
AnswerRe: printing RTB contents Pin
Duncan Edwards Jones14-Oct-07 0:44
professionalDuncan Edwards Jones14-Oct-07 0:44 
QuestionEditing Text Files and Creating new one of them Pin
Kalpeshpatelbyk13-Oct-07 2:07
Kalpeshpatelbyk13-Oct-07 2:07 
AnswerRe: Editing Text Files and Creating new one of them Pin
pmarfleet13-Oct-07 4:40
pmarfleet13-Oct-07 4:40 
AnswerRe: Editing Text Files and Creating new one of them Pin
Christian Graus13-Oct-07 10:29
protectorChristian Graus13-Oct-07 10:29 
QuestionTargetInvocationException, FileNotFoundException, assemblys, remoting, services, depression. Pin
redjen13-Oct-07 2:02
redjen13-Oct-07 2:02 
Hi all

First off im a student, but this is Not an assignment, it's the end of degree project!.. so im kinda freakin out a bit. Smile | :)

i dont want a handout, just a point in the right direction.

Ive built this application, like a floorplan viewer that has network devices on the map, works great, but now my business client wants to make it distributed, and run it as a service.

i have used a previous chatroom that i built to use for a test case, to see if i could host a remoting server in a service. the chatroom works fine its very simple, which is why i thought it would be a good test for using remoting in a service. for the test case (and confidentialy) ive decided its better to post this chatroom that i converted to a service instead of the real app.

The problem is the same with both the chatroom and the floorplan app,

1. the service starts fine, creates proxy, a successful event log is written.

2. start the client, proxy created, then on the first proxy method call i get this error...


************** Exception Text **************
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'ClientGUI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'ClientGUI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at System.Reflection.MemberInfoSerializationHolder..ctor(SerializationInfo info, StreamingContext context)

=== Pre-bind state information ===
LOG: User = NT AUTHORITY\SYSTEM
LOG: DisplayName = ClientGUI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///C:/chat/MyService/bin/Release/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/chat/MyService/bin/Release/ClientGUI.DLL.
LOG: Attempting download of new URL file:///C:/chat/MyService/bin/Release/ClientGUI/ClientGUI.DLL.
LOG: Attempting download of new URL file:///C:/chat/MyService/bin/Release/ClientGUI.EXE.
LOG: Attempting download of new URL file:///C:/chat/MyService/bin/Release/ClientGUI/ClientGUI.EXE.

--- End of inner exception stack trace ---

Server stack trace:
at System.RuntimeMethodHandle._SerializationInvoke(Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
at System.RuntimeMethodHandle.SerializationInvoke(Object target, SignatureStruct declaringTypeSig, SerializationInfo info, StreamingContext context)
at System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object target, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
at System.Runtime.Serialization.ObjectManager.DoFixups()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryRequestMessage(String objectUri, Stream inputStream, Boolean bStrictBinding, TypeFilterLevel securityLevel)
at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at SharedClasses.IServer.Connect(Parcel msgDel, Parcel usrDel, String userName)
at ClientGUI.ClientForm.btnConnect_Click(Object sender, EventArgs e) in C:\chat\ClientGUI\ClientForm.vb:line 41
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ClientGUI
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/chat/ClientGUI/bin/Release/ClientGUI.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
SharedClasses
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/chat/ClientGUI/bin/Release/SharedClasses.DLL
----------------------------------------



the questions i guess i have are...

How do i tell it where to find the assembly?,

why does this not happen when it is not run as a service.. it works fine. i got good marks for it!

i really havent dealt with assemblys and namespaces (conciously) and this stuff, but keen as to figure this out.

Can anyone point me in the right direction?
Project code is below

Many thanks
red


AnswerRe: TargetInvocationException, FileNotFoundException, assemblys, remoting, services, depression. Pin
redjen13-Oct-07 2:03
redjen13-Oct-07 2:03 
GeneralRe: TargetInvocationException, FileNotFoundException, assemblys, remoting, services, depression. Pin
redjen13-Oct-07 14:29
redjen13-Oct-07 14:29 
QuestionHow to assign case to the event handler ? Pin
liv2luv13-Oct-07 1:59
liv2luv13-Oct-07 1:59 
AnswerRe: How to assign case to the event handler ? Pin
Luc Pattyn13-Oct-07 3:09
sitebuilderLuc Pattyn13-Oct-07 3:09 
QuestionFile splitting Logic Pin
DON34512-Oct-07 23:53
DON34512-Oct-07 23:53 
AnswerRe: File splitting Logic Pin
Guffa13-Oct-07 0:53
Guffa13-Oct-07 0:53 
AnswerRe: File splitting Logic Pin
Luc Pattyn13-Oct-07 3:11
sitebuilderLuc Pattyn13-Oct-07 3:11 
QuestionProblem in Running EXE on Network when using ODBCConnection Object Pin
kkb_200112-Oct-07 21:12
kkb_200112-Oct-07 21:12 
AnswerRe: Problem in Running EXE on Network when using ODBCConnection Object Pin
Dave Kreskowiak13-Oct-07 3:52
mveDave Kreskowiak13-Oct-07 3:52 
QuestionHelp needed to Manipulate CSV Cell data..... Pin
paulk1112-Oct-07 12:26
paulk1112-Oct-07 12:26 
AnswerRe: Help needed to Manipulate CSV Cell data..... Pin
Dave Kreskowiak13-Oct-07 3:48
mveDave Kreskowiak13-Oct-07 3:48 
GeneralRe: Help needed to Manipulate CSV Cell data..... Pin
paulk1113-Oct-07 4:39
paulk1113-Oct-07 4:39 
GeneralRe: Help needed to Manipulate CSV Cell data..... Pin
Dave Kreskowiak13-Oct-07 5:00
mveDave Kreskowiak13-Oct-07 5:00 
GeneralRe: Help needed to Manipulate CSV Cell data..... Pin
paulk1113-Oct-07 6:01
paulk1113-Oct-07 6:01 
GeneralRe: Help needed to Manipulate CSV Cell data..... Pin
paulk1113-Oct-07 6:09
paulk1113-Oct-07 6:09 
GeneralRe: Help needed to Manipulate CSV Cell data..... Pin
Dave Kreskowiak13-Oct-07 9:11
mveDave Kreskowiak13-Oct-07 9:11 
QuestionBindingSource Pin
sabr4912-Oct-07 9:04
sabr4912-Oct-07 9:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.