Intermittent configuration error

G

Guest

We are intermittently getting the infamous Configuration 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." However, in our case the relevant
directory is definitely configured as an IIS Application. I've done a lot of
research online, and haven't found anyone else who gets this problem only
intermittently.

We have two sites running on the same server. They are accessed
independently from the Internet as www.appA.com and www.appB.com. Both share
some common code. The physical directory structure looks like this:
d:\appA
d:\appB
d:\Common

All three apps have pretty close to the default web.config files.

The virtual directories, all of which are applications, are setup like this:
appA --> d:\appA
Common --> d:\Common
appB --> d:\appB
Common --> d:\Common

The configuration error points to the Authentication section of the Common
directory's web.config. The weird thing is this works 99% of the time. Many
thousands of pages are served successfully in between each failure.
Immediately after a failure, you can go to the same server, same failing
page, and it works fine.

So does anybody know what else, besides a virtual directory/application
configuration issue, can cause this problem?
 
F

Frank Mamone

This also happens if you have a Web.Config in a subdirectory of your
application that includes the <authentication> tag. Although you can use
the <authorization> element in subdirectories, you cannot authenticate again
in it.

Hope this helps,

Frank Mamone
 
F

Frank Mamone

The only explanation is that it will work only when the app is not using the
pages inside that directory.

- Frank Mamone
 
G

Guest

No, it actually does work more than 99% of the time on pages in that
directory. If a user gets the error on
http://www.appA.com/Common/testpage.aspx, then I can open a browser on my
computer, connect to the same server, hit the same page and it will work
fine. These are very high traffic sites (millions of page hits per day) and
this error is only occurring about 20 times per day on average. I'm wondering
if it's somehow related to how this app is loaded and cached (I don't know
much about this at all, so it's wild speculation) -- maybe there's a
difference if it's been previously loaded through a page that has a using
directive in the code behind vs. one that does a response.redirect??

Anyway, the changed web.config is in QA now, where the error very rarely
happens for some reason. It'll go to production in a couple of weeks and
we'll see if there's any difference there.
 
F

Frank Mamone

Let us know how it goes.

-Frank

caa said:
No, it actually does work more than 99% of the time on pages in that
directory. If a user gets the error on
http://www.appA.com/Common/testpage.aspx, then I can open a browser on my
computer, connect to the same server, hit the same page and it will work
fine. These are very high traffic sites (millions of page hits per day) and
this error is only occurring about 20 times per day on average. I'm wondering
if it's somehow related to how this app is loaded and cached (I don't know
much about this at all, so it's wild speculation) -- maybe there's a
difference if it's been previously loaded through a page that has a using
directive in the code behind vs. one that does a response.redirect??

Anyway, the changed web.config is in QA now, where the error very rarely
happens for some reason. It'll go to production in a couple of weeks and
we'll see if there's any difference there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top