User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 361,920 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,556 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 944 | Replies: 5 | Solved
Reply
Join Date: Mar 2008
Location: Wales
Posts: 30
Reputation: BluePaper is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
BluePaper's Avatar
BluePaper BluePaper is offline Offline
Light Poster

Global.asax problem

  #1  
Mar 21st, 2008
I'm using Visual Studio and I'm learning ASP.net, to learn I'm following the VWD Videos available on the Microsoft website.

I watched one of the videos and the guy used a Global.asax file, I followed exactly as I did but at the top of the file where the <%@ Application Language="VB" %> is it's underlined yellow (possibly some other colour in different colour schemes) and it gives me the following error:

"C:\Documen....\Scripts\Global.asax: ASP.net runtime error: There is no build provider registered for the extension '.asax'. You can register one in the <compilation><buildProviders> section in machine.config or web.config. Make sure it has a BuildProviderAppliesToAttribute attribute which includes the value 'web' or 'All'"


I managed to fix the problem by moving the Global.asax file back to the main folder (root folder) but when I have it in the Scripts folder I've made it messes up. I like to organise everything that I can, all the vb files of pages in a separate folder (that's another thing, how can I get it so the pages automatically create the VB pages in a certain folder and connect to it?) and stylesheets in another etc. but it doesn't seem to want to work with the Global.asax file. Is there anyway to fix this?
Stone In Focus - Caffeine Group - CoffeePHP - Open Notes - Onyx - Redpoint Network - Espresso
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2008
Posts: 16
Reputation: razool is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 2
razool's Avatar
razool razool is offline Offline
Newbie Poster

Re: Global.asax problem

  #2  
Mar 22nd, 2008
Please Organize the web.config and global.asax in the same folder

Regards
razool




Originally Posted by BluePaper View Post
I'm using Visual Studio and I'm learning ASP.net, to learn I'm following the VWD Videos available on the Microsoft website.

I watched one of the videos and the guy used a Global.asax file, I followed exactly as I did but at the top of the file where the <%@ Application Language="VB" %> is it's underlined yellow (possibly some other colour in different colour schemes) and it gives me the following error:

"C:\Documen....\Scripts\Global.asax: ASP.net runtime error: There is no build provider registered for the extension '.asax'. You can register one in the <compilation><buildProviders> section in machine.config or web.config. Make sure it has a BuildProviderAppliesToAttribute attribute which includes the value 'web' or 'All'"


I managed to fix the problem by moving the Global.asax file back to the main folder (root folder) but when I have it in the Scripts folder I've made it messes up. I like to organise everything that I can, all the vb files of pages in a separate folder (that's another thing, how can I get it so the pages automatically create the VB pages in a certain folder and connect to it?) and stylesheets in another etc. but it doesn't seem to want to work with the Global.asax file. Is there anyway to fix this?
Reply With Quote  
Join Date: Mar 2008
Posts: 16
Reputation: razool is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 2
razool's Avatar
razool razool is offline Offline
Newbie Poster

Re: Global.asax problem

  #3  
Mar 22nd, 2008
can you please send the error snap?
Reply With Quote  
Join Date: Mar 2008
Location: Wales
Posts: 30
Reputation: BluePaper is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
BluePaper's Avatar
BluePaper BluePaper is offline Offline
Light Poster

Re: Global.asax problem

  #4  
Mar 22nd, 2008
Here's the screenshot, as you can see my Global.asax file and web.config file aren't in the same folder, and yes it does work if they're in the same folder but It would be nice to be able to organise it as I have done there as you may see on the right
Attached Images
File Type: png ASP_error.png (123.4 KB, 7 views)
Stone In Focus - Caffeine Group - CoffeePHP - Open Notes - Onyx - Redpoint Network - Espresso
Reply With Quote  
Join Date: Mar 2008
Posts: 16
Reputation: razool is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 2
razool's Avatar
razool razool is offline Offline
Newbie Poster

Re: Global.asax problem

  #5  
Mar 23rd, 2008
Hi

you shouldn't organized global.asax in script folder.

global.aspx should be resides in the root directory of you asp.net application. more over there should be only one global.asax in asp.net app.

please refer the following link
http://msdn2.microsoft.com/en-us/library/2027ewzw.aspx
http://aspalliance.com/1114_Understa...balasax_file.2

Regards
razool
Reply With Quote  
Join Date: Mar 2008
Location: Wales
Posts: 30
Reputation: BluePaper is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
BluePaper's Avatar
BluePaper BluePaper is offline Offline
Light Poster

Re: Global.asax problem

  #6  
Mar 23rd, 2008
Ah, thank you for clarifying that for me razool shame really, I like to keep everything neat and tidy heh.
Stone In Focus - Caffeine Group - CoffeePHP - Open Notes - Onyx - Redpoint Network - Espresso
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ASP.NET Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 10:16 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC