This project is read-only.

PostAppStartupTask

Feb 13, 2010 at 3:02 PM

Could you please post an example of how to use a PostAppStartupTask task in Calcium applications? Thanks.

Coordinator
Feb 13, 2010 at 5:00 PM

Ron, the PostAppStartupTask is internal and not designed to be consumed directly. You got me thinking though. What we could have is a registered collection of ITasks in the IOC container (initialized in the Bootstrapper), and then user modules will be able to add tasks to that collection for execution after all modules have loaded etc. How does that sound?

Feb 13, 2010 at 6:33 PM

Sounds great, in fact this is what I was thinking it could be used for anyway. The other thing I was thinking was that it could be used to kick off a login dialog before modules are loaded. That way if I establish a Principal at login, the information concerning user and user roles would be available in the CanExecute methods of commands.

From: DanielVaughan [mailto:notifications@codeplex.com]
Sent: Saturday, February 13, 2010 12:01 PM
To: rclarke@ameritech.net
Subject: Re: PostAppStartupTask [Calcium:85262]

From: DanielVaughan

Ron, the PostAppStartupTask is internal and not designed to be consumed directly. You got me thinking though. What we could have is a registered collection of ITasks in the IOC container (initialized in the Bootstrapper), and then user modules will be able to add tasks to that collection for execution after all modules have loaded etc. How does that sound?

Read the full discussion online.

To add a post to this discussion, reply to this email (Calcium@discussions.codeplex.com)

To start a new discussion for this project, email Calcium@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com

Coordinator
Feb 13, 2010 at 7:14 PM

Trouble is, the IOC container is created by the Bootstrapper by default, and once the Bootstrapper runs, modules are loaded. I would suggest that the best place for that would be to show a dialog from your host launcher project before calling the AppStarter.

Coordinator
Feb 13, 2010 at 7:15 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Feb 13, 2010 at 8:12 PM
Thanks for the suggestion.

Sent from my BlackBerry device from Cincinnati Bell Wireless


From: "DanielVaughan" <notifications@codeplex.com>
Date: 13 Feb 2010 11:14:26 -0800
To: <rclarke@ameritech.net>
Subject: Re: PostAppStartupTask [Calcium:85262]

From: DanielVaughan

Trouble is, the IOC container is created by the Bootstrapper by default, and once the Bootstrapper runs, modules are loaded. I would suggest that the best place for that would be to show a dialog from your host launcher project before calling the AppStarter.

Feb 13, 2010 at 8:26 PM
On second thought, that would show the dialog before the splash screen. That's OK I guess but would be nicer after.

Sent from my BlackBerry device from Cincinnati Bell Wireless


From: rclarke@ameritech.net
Date: Sat, 13 Feb 2010 20:11:17 +0000
To: <Calcium@discussions.codeplex.com>
Subject: Re: PostAppStartupTask [Calcium:85262]

Thanks for the suggestion.

Sent from my BlackBerry device from Cincinnati Bell Wireless


From: "DanielVaughan" <notifications@codeplex.com>
Date: 13 Feb 2010 11:14:26 -0800
To: <rclarke@ameritech.net>
Subject: Re: PostAppStartupTask [Calcium:85262]

From: DanielVaughan

Trouble is, the IOC container is created by the Bootstrapper by default, and once the Bootstrapper runs, modules are loaded. I would suggest that the best place for that would be to show a dialog from your host launcher project before calling the AppStarter.

Feb 15, 2010 at 1:34 PM

Daniel,

I tried to open a dialog prior to calling app.start and ran into some problems. The dialog does nothing and has two buttons -- Ok ( set dialog.result to true) and Cancel (set dialog.result to false). The dialog open and I am able to click the buttons buttons. Upon return from the dialog I call app.start and things go south.  If I don't open my dialog first, all goes well and the app opens. The following is displayed in the output window of Visual Studio when things don't work:

 

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_64\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Development Projects - WPF - Prism\Calcium Projects\Huebner Trucking\HuebnerTrucking\HuebnerTrucking\bin\Debug\HuebnerTrucking.vshost.exe', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Xml.Linq\3.5.0.0__b77a5c561934e089\System.Xml.Linq.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Data.DataSetExtensions\3.5.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\UIAutomationProvider\3.0.0.0__31bf3856ad364e35\UIAutomationProvider.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\WindowsBase\3.0.0.0__31bf3856ad364e35\WindowsBase.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_64\PresentationCore\3.0.0.0__31bf3856ad364e35\PresentationCore.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\PresentationFramework\3.0.0.0__31bf3856ad364e35\PresentationFramework.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_64\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualBasic\8.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

The thread 0x18ec has exited with code 0 (0x0).

The thread 0x1cd4 has exited with code 0 (0x0).

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Development Projects - WPF - Prism\Calcium Projects\Huebner Trucking\HuebnerTrucking\HuebnerTrucking\bin\Debug\HuebnerTrucking.exe', Symbols loaded.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Development Projects - WPF - Prism\Calcium Projects\Huebner Trucking\HuebnerTrucking\HuebnerTrucking\bin\Debug\DanielVaughan.Calcium.Client.dll', Symbols loaded.

Clog Debug:Initializing from config.

Clog Info:Added log strategy to repository. Name: Console, Type: DanielVaughan.Logging.LogStrategies.ConsoleStrategy, DanielVaughan.Logging

Clog Info:Added log strategy to repository. Name: Client, Type: DanielVaughan.Logging.LogStrategies.ClientStrategy, DanielVaughan.Logging

Clog Info:Clog configuration loaded successfully.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Development Projects - WPF - Prism\Calcium Projects\Huebner Trucking\HuebnerTrucking\HuebnerTrucking\bin\Debug\log4net.dll'

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Development Projects - WPF - Prism\Calcium Projects\Huebner Trucking\HuebnerTrucking\HuebnerTrucking\bin\Debug\DanielVaughan.Calcium.dll', Symbols loaded.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Development Projects - WPF - Prism\Calcium Projects\Huebner Trucking\HuebnerTrucking\HuebnerTrucking\bin\Debug\DanielVaughan.Logging.dll', Symbols loaded.

Clog Debug:Initializing from config.

Clog Info:Added log strategy to repository. Name: Console, Type: DanielVaughan.Logging.LogStrategies.ConsoleStrategy, DanielVaughan.Logging

Clog Info:Added log strategy to repository. Name: Client, Type: DanielVaughan.Logging.LogStrategies.ClientStrategy, DanielVaughan.Logging

Clog Info:Clog configuration loaded successfully.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

Clog Debug:Writing log entry:C:\Development Projects - WPF - Prism\Calcium Projects\Huebner Trucking\HuebnerTrucking\HuebnerTrucking\Application.xaml.vb(14): HuebnerTrucking.Application..ctor , Message:Client starting., LogLevel: Info, ThreadName: , ManagedThreadId: 0, Properties: , Log Name: HuebnerTrucking.Application, Username: Ron, Machine Name: XPS-16, URL: , IP Address: , PrincipalIdentity: , AppDomain: , Identity:

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_64\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Deployment\2.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Development Projects - WPF - Prism\Calcium Projects\Huebner Trucking\HuebnerTrucking\HuebnerTrucking\bin\Debug\DanielVaughan.dll', Symbols loaded.

Clog Debug:Writing log entry:C:\Development Projects - WPF - Prism\Calcium Projects\Huebner Trucking\HuebnerTrucking\HuebnerTrucking\Application.xaml.vb(14): HuebnerTrucking.Application..ctor , Message:Client starting., LogLevel: Info, ThreadName: , ManagedThreadId: 0, Properties: , Log Name: HuebnerTrucking.Application, Username: Ron, Machine Name: XPS-16, URL: , IP Address: , PrincipalIdentity: , AppDomain: , Identity:

Log: Client starting.

C:\Development Projects - WPF - Prism\Calcium Projects\Huebner Trucking\HuebnerTrucking\HuebnerTrucking\Application.xaml.vb(14): HuebnerTrucking.Application..ctor 2/15/2010 8:28:15 AM, Thread:

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\SMDiagnostics\3.0.0.0__b77a5c561934e089\SMDiagnostics.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Diagnostics.ServiceModelSink\3.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Diagnostics.ServiceModelSink.dll'

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\PresentationFramework.Aero\3.0.0.0__31bf3856ad364e35\PresentationFramework.Aero.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.IdentityModel.Selectors\3.0.0.0__b77a5c561934e089\System.IdentityModel.Selectors.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Development Projects - WPF - Prism\Calcium Projects\Huebner Trucking\HuebnerTrucking\HuebnerTrucking\bin\Debug\Microsoft.Practices.Composite.UnityExtensions.dll'

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Development Projects - WPF - Prism\Calcium Projects\Huebner Trucking\HuebnerTrucking\HuebnerTrucking\bin\Debug\Microsoft.Practices.Composite.dll'

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Development Projects - WPF - Prism\Calcium Projects\Huebner Trucking\HuebnerTrucking\HuebnerTrucking\bin\Debug\Microsoft.Practices.Unity.dll'

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Development Projects - WPF - Prism\Calcium Projects\Huebner Trucking\HuebnerTrucking\HuebnerTrucking\bin\Debug\Microsoft.Practices.Composite.Presentation.dll'

'HuebnerTrucking.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_64\System.Transactions\2.0.0.0__b77a5c561934e089\System.Transactions.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

A first chance exception of type 'System.ServiceModel.EndpointNotFoundException' occurred in mscorlib.dll

Clog Error:Problem writing log to ILogStrategy DanielVaughan.Logging.LogStrategies.ClientStrategy

Clog Error: System.ServiceModel.EndpointNotFoundException: Could not connect to http://localhost:11965/ClogService.svc. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:11965. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:11965

at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)

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

at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)

at System.Net.HttpWebRequest.GetRequestStream()

at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()

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

Server stack trace:

at System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout)

at System.ServiceModel.Security.SspiNegotiationTokenProvider.OnOpen(TimeSpan timeout)

at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)

at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

at System.ServiceModel.Security.SecurityUtils.OpenCommunicationObject(ICommunicationObject obj, TimeSpan timeout)

at System.ServiceModel.Security.SymmetricSecurityProtocol.OnOpen(TimeSpan timeout)

at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)

at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

at System.ServiceModel.Channels.SecurityChannelFactory`1.ClientSecurityChannel`1.OnOpen(TimeSpan timeout)

at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.DoOperation(SecuritySessionOperation operation, EndpointAddress target, Uri via, SecurityToken currentToken, TimeSpan timeout)

at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.GetTokenCore(TimeSpan timeout)

at System.IdentityModel.Selectors.SecurityTokenProvider.GetToken(TimeSpan timeout)

at System.ServiceModel.Security.SecuritySessionClientSettings`1.ClientSecuritySessionChannel.OnOpen(TimeSpan timeout)

at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)

at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

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.ServiceModel.ICommunicationObject.Open()

at DanielVaughan.ServiceModel.ChannelManagerSingleton.GetChannel[TChannel]() in C:\Calcium Source\Source\Core\Core\ServiceModel\ChannelManagerSingleton.cs:line 137

at DanielVaughan.Logging.LogStrategies.ClientStrategy.GetConfigurationData(IClientInfo clientInfo) in C:\Calcium Source\Source\Clog\Clog\Logging\LogStrategies\ClientStrategy.cs:line 35

at DanielVaughan.Logging.LogStrategies.ClientStrategy.Write(IServerLogEntry logEntry) in C:\Calcium Source\Source\Clog\Clog\Logging\LogStrategies\ClientStrategy.cs:line 69

at DanielVaughan.Logging.Log.<>c__DisplayClass5.<WriteLogEntryAux>b__1(Object ) in C:\Calcium Source\Source\Clog\Clog\Logging\Log.cs:line 344 Could not connect to http://localhost:11965/ClogService.svc. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:11965.

Server stack trace:

at System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout)

at System.ServiceModel.Security.SspiNegotiationTokenProvider.OnOpen(TimeSpan timeout)

at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)

at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

at System.ServiceModel.Security.SecurityUtils.OpenCommunicationObject(ICommunicationObject obj, TimeSpan timeout)

at System.ServiceModel.Security.SymmetricSecurityProtocol.OnOpen(TimeSpan timeout)

at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)

at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

at System.ServiceModel.Channels.SecurityChannelFactory`1.ClientSecurityChannel`1.OnOpen(TimeSpan timeout)

at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.DoOperation(SecuritySessionOperation operation, EndpointAddress target, Uri via, SecurityToken currentToken, TimeSpan timeout)

at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.GetTokenCore(TimeSpan timeout)

at System.IdentityModel.Selectors.SecurityTokenProvider.GetToken(TimeSpan timeout)

at System.ServiceModel.Security.SecuritySessionClientSettings`1.ClientSecuritySessionChannel.OnOpen(TimeSpan timeout)

at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)

at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

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.ServiceModel.ICommunicationObject.Open()

at DanielVaughan.ServiceModel.ChannelManagerSingleton.GetChannel[TChannel]() in C:\Calcium Source\Source\Core\Core\ServiceModel\ChannelManagerSingleton.cs:line 137

at DanielVaughan.Logging.LogStrategies.ClientStrategy.GetConfigurationData(IClientInfo clientInfo) in C:\Calcium Source\Source\Clog\Clog\Logging\LogStrategies\ClientStrategy.cs:line 35

at DanielVaughan.Logging.LogStrategies.ClientStrategy.Write(IServerLogEntry logEntry) in C:\Calcium Source\Source\Clog\Clog\Logging\LogStrategies\ClientStrategy.cs:line 69

at DanielVaughan.Logging.Log.<>c__DisplayClass5.<WriteLogEntryAux>b__1(Object ) in C:\Calcium Source\Source\Clog\Clog\Logging\Log.cs:line 344

The program '[8172] HuebnerTrucking.vshost.exe: Managed' has exited with code -1073740940 (0xc0000374).

Feb 16, 2010 at 4:32 PM

Got the following from a kind sole on the P&P site. Note the calls to ShutdownMode. I have not tried it with Calcium yet but I will soon.

protected override void OnStartup(StartupEventArgs e)
        {
            Application.Current.ShutdownMode = ShutdownMode.OnExplicitShutdown;

            // Authenticate the current user and set the default principal
            AuthenticationSplashScreen auth = new AuthenticationSplashScreen();
            auth.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bool? dialogResult = auth.ShowDialog();

            // deal with the results
            if (dialogResult.HasValue && dialogResult.Value)
            {
                AppDomain.CurrentDomain.SetThreadPrincipal(auth.NewPrincipal);
                base.OnStartup(e);
            }
            else
            {
                this.Shutdown(-1);
            }

            this.ShutdownMode = ShutdownMode.OnMainWindowClose;

#if (DEBUG)
            RunInDebugMode();
#else
            RunInReleaseMode();
#endif

Coordinator
Feb 16, 2010 at 8:15 PM

Nice tip! I'm glad you sorted it out.

 

Cheers,

Daniel