DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   ASP.NET (http://www.daniweb.com/forums/forum18.html)
-   -   Global.asax problem (http://www.daniweb.com/forums/thread115106.html)

BluePaper Mar 21st, 2008 4:57 pm
Global.asax problem
 
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?

razool Mar 22nd, 2008 2:41 am
Re: Global.asax problem
 
Please Organize the web.config and global.asax in the same folder

Regards
razool




Quote:

Originally Posted by BluePaper (Post 566384)
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?


razool Mar 22nd, 2008 2:43 am
Re: Global.asax problem
 
can you please send the error snap?

BluePaper Mar 22nd, 2008 7:41 am
Re: Global.asax problem
 
1 Attachment(s)
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 :(

razool Mar 23rd, 2008 3:47 am
Re: Global.asax problem
 
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

BluePaper Mar 23rd, 2008 8:49 am
Re: Global.asax problem
 
Ah, thank you for clarifying that for me razool :) shame really, I like to keep everything neat and tidy heh.


All times are GMT -4. The time now is 3:35 pm.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC