'Sys' is undefined when using the csla navigation in Silverlight

'Sys' is undefined when using the csla navigation in Silverlight

Old forum URL: forums.lhotka.net/forums/t/7246.aspx


ChrisM posted on Wednesday, July 08, 2009

Anyone seen this before, and have any idea on how to fix it? Once I turned on the csla navigation in Silverlight it started throwing the Sys non defined on this line:

Sys.Application.add_navigate(__navigateHandler);

sergeyb replied on Wednesday, July 08, 2009

Make sure your startup project points to web project, not SL project.

Sergey Barskiy
Principal Consultant
office: 678.405.0687 | mobile: 404.388.1899

Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

-----Original Message-----
From: ChrisM [mailto:cslanet@lhotka.net]
Sent: Wednesday, July 08, 2009 5:30 PM
To: Sergey Barskiy
Subject: [CSLA .NET] 'Sys' is undefined when using the csla navigation in Silverlight

Anyone seen this before, and have any idea on how to fix it? Once I turned on the csla navigation in Silverlight it started throwing the Sys non defined on this line:

Sys.Application.add_navigate(__navigateHandler);


ChrisM replied on Wednesday, July 08, 2009

Done. My web apps are actually running in IIS on my windows 7 box, which I'm begining to think may be the issue...

ChrisM replied on Thursday, July 09, 2009

I just grabbed the Demo006 code from Rocky's vid series and it has the same issue. It seems like the silverlight.js I have is not loading the Sys namespace? That make any sense to anyone, and how do I fix it?

ChrisM replied on Thursday, July 09, 2009

Okay, finally figured it out. When the SL project is set up as the start up, then the Ajax js libs won't load. Once I switched to the web project, it worked. For my code, at some point the .html page had been set as start up, once I switched that back to the aspx, it started working fine.

JoeFallon1 replied on Thursday, July 09, 2009

And how is that different from what Sergey said? <g>

Sounds identical to me.

 

ChrisM replied on Thursday, July 09, 2009

Well, the error I was having in the demo code was exactly as Sergey said. The demo in my code was caused by having an IIS site server up a .html file instead of the ASPX. Evidently the .html file in my web site wasn't loading the Ajax Js libs. Once I changed it to use the .aspx file as the start up it fixed it.

Copyright (c) Marimer LLC