?
Solved

global.asax not picking up call to class??

Posted on 2006-07-19
9
Medium Priority
?
614 Views
Last Modified: 2008-01-16
I put in the following code in my global.asax and when I run it on my local PC using a local database, it doesn't seem to pick up my .cs code (for my Virtual Path Provider).
 
My Gridview serves some URL links.  I click on the link but it doesn't seem to be picking up the VPP class I created.  I get the following:
 
http://localhost/recipes/poultry/SearchResults.aspx 
 
after I click the above link for example, I then get:


The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /recipes/poultry/SearchResults.aspx
 
 
It may be going the VPP then back out to the
Previous.FileExists(virtualPath) but I can't tell because I don't see a way to step through my.cs when I do a debug on my website in VS 2005.  When I do a debug, it never steps through my .cs, only through my aspx and code-behind.
 
Any thoughts?

Here's my entire code, I don't see what the problem is:

http://www.webfound.net/allcode.zip

At least I think it's not picking it up, I have no idea but all I know is that it's not seeming to go through my class code on startup of my web application.
0
Comment
Question by:dba123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
9 Comments
 
LVL 1

Author Comment

by:dba123
ID: 17138940
Ok, I moved my global.asax out to the root of wwwroot.  Now it seems to be picking up at lease the code on application startup.  Now I get

Compiler Error Message: CS0246: The type or namespace name 'JDV_VPP_Provider' could not be found (are you missing a using directive or an assembly reference?)

why?
0
 
LVL 35

Accepted Solution

by:
mrichmon earned 2000 total points
ID: 17139000
As far as I know it should go in the root of your web site directory.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Author Comment

by:dba123
ID: 17139020
ok, then how come it can't find my class  in my .cs?
0
 
LVL 1

Author Comment

by:dba123
ID: 17139047
How can I put the .cs in the GAC?  the .cs has no dll associated with it, it's just a class
0
 
LVL 1

Author Comment

by:dba123
ID: 17139099
people keep saying I need a dll to register into the GAC but the only dll I have is for my web site project.  Would that be the dll?  I don't have a dll for the .cs in my App_Code
0
 
LVL 1

Author Comment

by:dba123
ID: 17139130
and in the articles above, they don't mention putting the global.asax at the root of wwwroot but if I don't then it doesn't even attempt to start the void Application_Start(object sender, EventArgs e)  method in global.asax.  I just do'nt get how .cs files work, if there are in another directory in the wwwroot other than the root, then I guess GAC is the way, but then if there's no dll for the specific .cs file, how would I even register it with the GAC?
0
 
LVL 1

Author Comment

by:dba123
ID: 17140798
there, you should be able to download my code with the initial link at the bottom of my initial post above.
0
 
LVL 1

Author Comment

by:dba123
ID: 17140803
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question