Still no dice. I've tried setting up as 2 separate projects in Visual
Studio, both within the same solution and running separately.

Maybe this will help. The file system layout is like so:

/Projects/website_name/ - this is the top level, and we have files
like default.aspx and web.config
/Projects/website_name/blog/ - a sub-folder, also has its own
default.aspx and web.config

I open "website_name" in Visual Studio, and hit Control-F5 to launch
in browser. The browser opens up to "http://localhost:7612/
Default.aspx", and it renders the default.aspx file in the
"website_name" folder.

If I browse to "http://localhost:7612/blog/Default.aspx"; - that is
when I get the error "It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level.  This
error can be caused by a virtual directory not being configured as an
application in IIS."

On the web server I can browse to the blog subfolder without issue,
because in IIS I can easily designate the blog subfolder as its own
application, even though it is a subfolder. In Visual Studio this is
not the case.

So how can I set this all up in Visual Studio so I don't get the
error, and I can still refer to "blog" as both an application AND a
subfolder?

On Sep 2, 10:36 am, Stephen Russell <[email protected]> wrote:
> On Thu, Sep 2, 2010 at 9:21 AM, Buddy Z <[email protected]> wrote:
> > *sigh*
>
> > Stephen ur just saying the same thing over and over, which doesn't
> > work for me. A Visual Studio project folder that has a subfolder with
> > a web.config that has conflicting settings will always yield the error
> > I mentioned. I'm looking for another way to organize my projects/
> > solutions so that it won't error.
>
> -------------------
> I am suggesting that the subfolder is itself it's own WEB.  To make
> this operate you have to have a solution or project at that position
> with a web.config and a bin folder.  Please run that web app.  Now go
> to your CALLING web app and run that as well.
>
> Have you co-mingled the projects into a single solution by chance?
> This will negate the "sub" web.config usage.
>
> I just did a test with two projects and two web.configs that point to
> different databases.
>
> Query was select  * from sys.Tables. I doesn't matter if the second
> app is run from ~/OtherFolder or not to work.  ASP.NET Development
> server will start wherever that project is.
>
>
>
> > Anyone else? Sammael?
>
> > On Sep 2, 9:26 am, Stephen Russell <[email protected]> wrote:
> >> On Wed, Sep 1, 2010 at 4:32 PM, Buddy Z <[email protected]> wrote:
> >> > Nope, debug mode doesn't make a difference Stephen. Still get "This
> >> > error can be caused by a virtual directory not being configured as an
> >> > application in IIS." for my local environment. Still works fine on the
> >> > server.
>
> >> > The answer probably has to do with best practices in Visual Studio,
> >> > when setting up a website where the root web.config and a subfolder's
> >> > web.config have conflicting settings. It's not an issue when you have
> >> > IIS, because you can designate both the root folder and subfolder as
> >> > applications. But what do I do on my local computer (non-IIS) in
> >> > Visual Studio to avoid the above error?
>
> >> > Still waiting for someone knowledgeable about Solution/Project setup
> >> > to chime in here...
>
> >> -----------------------------
>
> >> I do WCF programming all the time.  I then have to put a GUI up to
> >> interact with my service.  On my dev box I don't run the WCF in an IIS
> >> space just in ASP.Net Development Server space.  I think that you have
> >> to do the same thing to READ your web.config file in the SUB app and
> >> yet run the primary app as well.
>
> >> --
> >> Stephen Russell
>
> >> Sr. Production Systems Programmer
> >> CIMSgts
>
> >> 901.246-0159 cell
>
> --
> Stephen Russell
>
> Sr. Production Systems Programmer
> CIMSgts
>
> 901.246-0159 cell

Reply via email to