StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Missing Global.asax?Expand / Collapse
Author
Message
Posted 05/09/2008 9:55:45 AM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: StrataFrame Users
Last Login: 10/28/2008 3:58:06 PM
Posts: 39, Visits: 437
I'm getting an error about the DataSourceKey is not defined...

I did some checking on here and in the sample app and found that there is a global.asax in the sample app that I don't have in my app.  Additionally, looks like that's where I am supposed to setup the data connection.

So, here are my questions...

Do I need a global.asax and what is it for? 

If it is necessary, should it have been added when I created the project? 

Lastly, if I add one, will that take care of my DataSourceKey error?

Thanks again for any help!

HB

Post #16294
Posted 05/09/2008 10:13:15 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 7:08:30 PM
Posts: 4,811, Visits: 4,781
Do I need a global.asax and what is it for? 

Unless you plan to have nothing but static pages, then yes.  You will need a global.asax.  This file is launched when the application starts up in IS as well as when a new session is started.  There are associated events that can be handled in this class as well.  So when you application starts, you will want to define your connection string information there..this way it is only created once versus for each session (each visitor) that gets started.

If it is necessary, should it have been added when I created the project? 

There was a bug in the template until 1.6.5 that did not include the global.asax file...this has been fixed.

Lastly, if I add one, will that take care of my DataSourceKey error?

Yes...you have to define your connection and this is the only place that you should really do this on a web application.

Post #16295
Posted 05/09/2008 10:41:02 AM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: StrataFrame Users
Last Login: 10/28/2008 3:58:06 PM
Posts: 39, Visits: 437
I was using 1.6.5 - but - downloaded it again (must have been an update I missed.)  Now, the global.asax is there.

Thanks - on to the next issue.

HB

Post #16296
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 1:58am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.094. 11 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.