From a working app to a non working service and app, what should I do?

From a working app to a non working service and app, what should I do?

Post by ThunderMus » Fri, 13 May 2005 12:50:59


Hello everyone,
Everything is .NET in my application... so, this application uses a DLL
that controls every actions taken in the main processing of the app. This
module also loads (late binding) many modules that contains 3 classes : 1
for processing, 1 is a control for displaying the up to date results of the
processing and 1 is another control to configure what the processing does.

In the stand alone application, everything is working fine. But now I have
to make a service and an application out of that... so the service can
handle all the processing thing (I don't have trouble with that) and the app
handles the displaying of the results and the configuration... my problem
comes to when I pass the controls... In the standalone app, everything is
perfect, but when it comes to passing it from the service to the app,
there's no way it will work... I just can't add the control to the form.
Here's what I do

In the app, when I must display one of the controls I get the controller
object and then call a method of the controller to get the appropriate
control (according to the module that must be displayed). In fact, all the
references seem to be right when debugging... the watches I placed are
having existing references. But when I want to add the control to the form,
it does not work... here's what the stack trace gives me :

StackTrace "
Server stack trace:
at
System.Runtime.Remoting.Channels.ChannelServices.DispatchMessage(IServerChan
nelSinkStack sinkStack, IMessage msg, IMessage& replyMsg)

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 System.Windows.Forms.Control.GetTopLevel()
at System.Windows.Forms.ControlCollection.Add(Control value)
at System.Windows.Forms.TabPageControlCollection.Add(Control value)
at JMSFE.FRMMain.DisplayMonitorPanels() in D:\Dany\Jupiter
Softwares\Projects\Monitoring System\EXE Front End
Server\Code\Forms\FRMMain.vb:line 351" String

And here's the exception I get :

(in french) "Autorisation refus. Impossible d'appeler des methodes non
public ou static a distance."

(In english, but I translated myself so it could be something else)
"Autorisation denied. Impossible to call non public or static methods
remotely"

Whould somebody know a solution or something I'm doing wrong? The controls
MUST stay in the modules... it has been designed this way for a good
reason... Must I use RemotingServices.Marshal() for every object (or
control) I pass by reference?

Thanks
 
 
 

1. Capture image of App#A's window from App#B

2. New instance button doesn't work, no apps listed, but apps work

In my admin panel if I click on the New Instance button it doesn't do anything.
I've seen other posts about this and they all end up being caused by people
having no applications to load, but that's not the case here. My apps are
installed and they work fine, but the new instance button doesn't list them and
they don't show up in the applications list of the admin panel, even when
they're running.

This has to be something pretty simple, but I'm not having any luck figuring
it out. Any ideas?

3. Service App, Form App, or Console App?

4. Some old non-working Model I's and a Hard Disk III

5. The Laws of work ( piping output from vio app to GUI app in realtime.)

6. Problem with termination of a console app within an MFC app while console is working

7. DLL work for console app, but not for MFC app

8. Dreamweaver (and other Studio apps) no longer working - apps not responding - OS X 10.3.6

9. Help - Alt-E hotkey does not work in MSOffice apps, no prob in other apps

10. Help - Alt-E hotkey does not work in MSOffice apps, no prob in other apps

11. ODBC works fine when app on desktop but hangs when app run from scheduler?

12. DLL works for console app but fails with window app

13. DOS app not working windowed

14. Can VB 2005 app work on a non-.NET2.0 machine?