ObjectDisposedException when using Navigate in v1.1

Jul 5, 2011 at 10:59 AM

I'm getting:

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

The thread '<No Name>' (0x9b00be) has exited with code 0 (0x0).

The thread '<No Name>' (0xf610076) has exited with code 0 (0x0).

The thread '<No Name>' (0xed40086) has exited with code 0 (0x0).

The thread '<No Name>'(0xfd10082) has exited with code 0 (0x0).

The thread '<No Name>' (0xff40076) has exited with code 0 (0x0).

The program '[268304502] UI Task: Managed' has exited with code 0 (0x0).

			
when using new style - this._navigationService.UriFor<TestViewModel>().Navigate();
			
but when using old style - this._navigationService.Navigatenew Uri"/Folder/TestView"UriKind.RelativeOrAbsolute ) );
it works fine.
Coordinator
Jul 5, 2011 at 11:31 AM

We had some bugs in the strongly-typed nav functionality which we have recently fixed. Are you using the latest source? If not, try that and see if your problem is fixed. Otherwise, please create a ticket and attach a simple solution that demonstrates the problem. Thanks.

Jul 5, 2011 at 12:48 PM

Thanks - I'll try that and let you know.

Jul 5, 2011 at 4:29 PM
Edited Jul 5, 2011 at 6:26 PM

That doesn't help but after enabled Common Runtime Language Runtime Exceptions i'm getting:

"No XAML was found at the location '/Views/Views/Folder/TestView.xaml.xaml'."

exception message - duplicated Views and .xaml.

 

EDIT

I don't know why but in UriBuilder / Navigate on line

    navigationService.Navigate(uri);

url contains "/Views/Folder/TestView.xaml" but somehow it tries to navigate to "/Views/Views/Folder/TestView.xaml.xaml" :O

I have to manually replace path elements to get it work:
    pageName = pageName.Replace"/Views""" );
    pageName = pageName.Replace".xaml""" );

Jul 5, 2011 at 6:33 PM

I've got it - it was my UriMapper :/

            <uriMapper:UriMapping Uri="/{subSystem}/{pageName}" MappedUri="/Views/{subSystem}/{pageName}.xaml"/>

Sorry for bother you.
Coordinator
Jul 5, 2011 at 7:36 PM

No problem..I'm always happy when I don't have to fix a bug.