MVC for root folder and WEB FORM in sub?

Discussion in 'ASP.NET / ASP.NET Core' started by MBRAY, May 30, 2010.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Need a little help here guys. And thanks.
    Long time VFP and SQL programmer but fairly new to this web thingy.

    I currently have a MVC application installed in the root and working correctly.

    I want to create a subfolder and run a different framework (a standard Web Form) application from it.

    I created the subfolder and set it to "application" using the web tools. I then copied the working Web Forms file(s), dlls, etc., from my VS2008 test folder.

    Error - When I try to run the sub-folder's (standard asp web forms) application, I get an error stating I'm missing some required MVC files. The root MVC application still runs correctly.

    I'm guessing here, but I believe the root's config is being passed down - which would make sense. So do I override?

    Question: Am I missing a primary concept here? I do understand that I can combine both MVC and Web Forms into a single application (site), but I'd like to be able to run totally separate applications, using different types of frameworks in different sub-folders. Is this possible?

    Or do I need to have distinct root folders for each of my "test" sites?

    Lots of questions and thanks again.
     
  2. Hi,
    You can indeed.
    Make sure you use the Application tool in your Control Panel.
    The root of your site is an Application already, make each of those project folders, the top node, an Application.
    The other thing is "web.config Inheritance" and it's a real *****
    (I don't curse but you get the idea.)

    Here's a great article I've bookmarked:
    http://blogs.iis.net/steveschofield...g-inheritance-with-iis-7-asp-net-options.aspx
    All the best,
    Mark
     
  3. Thanks Mark

    Thanks Mark.

    It's good to have code friends. I'm currently working through the links you provided me. I sure miss the good ole days of just autoexec.bat and config.sys though.

    Matt
     
  4. ... ;-)
    Many people don't even know what some of us went thru with those.
    Seems like a distant nightmare now getting CD drives right in the config.sys file.
    (Back in the 80's I ran 25 line multi-node WILDCAT! BBSes for Microsoft.)
    Thanks for the memories ;-)
    All the best,
    Mark
     
  5. mjp

    mjp

    Not to hijack the thread or anything, but...
    Then you must have seen this. If you haven't, you should.
     
  6. ...No problem hijacking this thread bro, if I had access to a time machine I'd go back. ;-)
    The BBSes we had running with Fidonet were nothing short of awesome.
    Salute,
    Mark
     
  7. The 'inheritInChildApplications' attribute is not declared.

    Hey guys (Mark), and any one anyone else. :)

    I still need some guidance here. I’ve spent the last 36 hours reading and pulling hair. Thanks to Mark who put me on the right track about searching for “inheritInChildApplications” attribute, I now know I’m on the right track, but I’m still having a heck of a time here.

    I believe that I now understand what needs to be done, (but not where). When I do manage to place it in the correct spot in my root’s config.web, I now get the "The 'inheritInChildApplications' attribute is not declared" error.

    The half dozen hits I get on the error message, just don't explain it correctly or they get off subject and refer to placing the <location inheritInChildApplications = false> in the config, but not how to address the missing attribute problem.

    I can’t seem to find that answer. Most of the answers that were half way informative also spoke of updating form VS2005 to VS2008. I’m running VS2008 on XP pro with IIS6 running on it. I don’t think this should be a problem, because I’m using DiscountAsp which should be running IIS7. But once again, I’m doing a lot of reaching. And if it makes a difference, I have my setup to use 3.5 net, so I should be good. Correct?

    Guys, I am really loss here. Maybe due to old age and senility! Help! And of course please.

    Thanks,
    Matt

    P.S. I also like the website about the BBS documentary. Ah memories.
     
  8. The inheritInChildApplications attribute on the location element was introduced in .NET 2.0. You see a little squiggly under the attribute in VS and it says something like 'inheritInChildApplications is not allowed' but that doesn't matter because the ASP.NET runtime (2.0+) knows how to handle this attribute when the web.config is parsed.

    If it is annoying (and I know it can be ;-)) just add this namespace to the configuration element at the top of the web.config:

    Code:
    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
     
  9. ...Joe to the rescue. ;-)
    Good stuff guys, and yeah, it can reduce the amount of hairs on your head.
     
  10. Thank you Mark and Joe

    It took a bit of time and a bunch of head scratching, but I did it! (With your help of course.)

    I still have a couple of solutions to figure out, but I want to thank both of you for your help.

    As you know, there is nothing better than the feeling you get from 3 days of heck, and then solving the problem. And that is why I love programming so much. The love / hate relationship.

    To repay my debt, I have a joke for your wife, girlfriend or mistress. (Maybe all three.)

    Ask your girl, "What kind of Bees gives milk?"

    She will look at you like your crazy and after stumbling a bit with no answer.

    Then with your best goofy face/voice - reply: "BooBees!"

    For some reason, most women find this hilarious.

    Thanks again guys!
    Matt
     
  11. A bunch of lovely nuts.

    Mark, I envy you. (And from the looks of the picture, what a greate place to grow up.) My 'nuts' are all darn trees now, getting ready to start their own nuts.

    Matt
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page