Global.asax in Silverlight?
-
Global.asax in Silverlight? I see there's a web.config (to my delight actually, just installed Silverlight it's my first try) but where would you put global init code in a silverlight app? Thanks!
dev
Silverlight runs client-side...initialization is the same as for any stand-alone application. The System.Windows.Application class is the entry point... Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Silverlight runs client-side...initialization is the same as for any stand-alone application. The System.Windows.Application class is the entry point... Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Wait a minute I just added Global.asax and Application_Start to my silverlight project My new silverlight project even came with good old web.config - I don't even need to rewrite code so it feeds on XAML as in case of WPF. thanks
dev
devvvy wrote:
I just added Global.asax
devvvy wrote:
My new silverlight project even came with good old web.config
Are you referring to the sample web project created to host your Silverlight app? If so, that is a web app, not the Silverlight app. Silverlight apps don't use a web.config - they run on the client.
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
devvvy wrote:
I just added Global.asax
devvvy wrote:
My new silverlight project even came with good old web.config
Are you referring to the sample web project created to host your Silverlight app? If so, that is a web app, not the Silverlight app. Silverlight apps don't use a web.config - they run on the client.
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
goodness... i looked closer. The web.config resides in ASP.NET project which is hosting the xap/Silverlight app. Also, I have a class library which I cannot reference from within the Silverlight project (not to mention log4net/nhibernate/spring.net)
dev
Jejejeje, it's normal to have that confusion when you start developing in Silverlight. The most similar thing that you can fin in SL is the app object, there you will have global events and method (when the app starts which page to show, when an unhandled exception is thrown...). If you want to add config data you can make your own XML and add it as a resource, another option is to read settings using a WCF services (in order to store them on the server side).
/// ------------------------- Braulio Díez DBSchemaEditor.com Free Silverlight based DB Schema Modeling Tool /// -------------------------
-
Jejejeje, it's normal to have that confusion when you start developing in Silverlight. The most similar thing that you can fin in SL is the app object, there you will have global events and method (when the app starts which page to show, when an unhandled exception is thrown...). If you want to add config data you can make your own XML and add it as a resource, another option is to read settings using a WCF services (in order to store them on the server side).
/// ------------------------- Braulio Díez DBSchemaEditor.com Free Silverlight based DB Schema Modeling Tool /// -------------------------