Board index » Web Programming » Framework conflict??

Framework conflict??

Web Programming11
Hello.

I'm having a big problem with asp .net. Initially, when I create a new web

applicaction and I try to open an aspx page, I get an error message:



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.



Source Error:





Line 44: por Microsoft que ofrece un inicio de sesión único y

servicios de perfil principal para sitios miembro.

Line 45: -->

Line 46: <authentication mode="Windows" />

Line 47:

Line 48: <!-- AUTORIZACIÃ?N





I've seen somebody else in this forum had had this problem, but mine is

worse, because my computer completely stops responding if I change the

application directory property in site properties, which is the way another

users have solved the problem.

I've checked this problem dissapear if I uninstall .net framework, so I

think there must be a conflict with this.

Does anybody have any idea?

Thanks


-
 

Re:Framework conflict??

This error is almost invariably caused by the directory that your trying to

access not being defined as an virtual directory to IIS. What the message is

really saying is that you're accessing a directory (through a browser) that

contains a web.config file. While this is quite acceptable, when ASP.NET is

processing the config file, it finds a setting that cannot be defined in the

subdirectory of an existing virtual directory.



The solution (at least in my experience) has been to go to IIS manager and

right-click on the Default Web Site. Then select New | Virtual Directory.

Give the virtual directory a name and provide a path that points to exactly

where this project is living. After you've finished the wizard, you should

be able to browser to the page successfully.



Hope that helps.



Bruce Johnson [.NET MVP]

www.objectsharp.com/blogs/bruce">www.objectsharp.com/blogs/bruce



"Problem doesn't solve" wrote:



Quote
Hello.

I'm having a big problem with asp .net. Initially, when I create a new web

applicaction and I try to open an aspx page, I get an error message:



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.



Source Error:





Line 44: por Microsoft que ofrece un inicio de sesión único y

servicios de perfil principal para sitios miembro.

Line 45: -->

Line 46: <authentication mode="Windows" />

Line 47:

Line 48: <!-- AUTORIZACIÃ?N





I've seen somebody else in this forum had had this problem, but mine is

worse, because my computer completely stops responding if I change the

application directory property in site properties, which is the way another

users have solved the problem.

I've checked this problem dissapear if I uninstall .net framework, so I

think there must be a conflict with this.

Does anybody have any idea?

Thanks

-

Re:Framework conflict??

Hello.

Thanks for your response. I think I've tried every possible combination with

virtual directories as you said, and when I try to access my aspx page, my

system stops responding (as what it happened before).

Problem is the same when I introduce the virtual directory address and my

habitual address (normal project address).

I don't know if is it possible to use a virtual address as an habitual

address way.

I explain you steps I've followed:

- My project is in directory wwwroot/prueba1

- I've created a virtual directory called "virtual", which points to this

directory.

- I've tried in my browser with addresses: localhost/prueba1/p.aspx and

localhost/virtual/p.aspx , and problem keeps being the same (system blocked

and rebooting needed).

The truth is that I'm quite desperate.

Do you find any other solution?

Thank you





"Bruce Johnson [.NET MVP]" wrote:



Quote
This error is almost invariably caused by the directory that your trying to

access not being defined as an virtual directory to IIS. What the message is

really saying is that you're accessing a directory (through a browser) that

contains a web.config file. While this is quite acceptable, when ASP.NET is

processing the config file, it finds a setting that cannot be defined in the

subdirectory of an existing virtual directory.



The solution (at least in my experience) has been to go to IIS manager and

right-click on the Default Web Site. Then select New | Virtual Directory.

Give the virtual directory a name and provide a path that points to exactly

where this project is living. After you've finished the wizard, you should

be able to browser to the page successfully.



Hope that helps.



Bruce Johnson [.NET MVP]

www.objectsharp.com/blogs/bruce">www.objectsharp.com/blogs/bruce



"Problem doesn't solve" wrote:



>Hello.

>I'm having a big problem with asp .net. Initially, when I create a new web

>applicaction and I try to open an aspx page, I get an error message:

>

>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.

>

>Source Error:

>

>

>Line 44: por Microsoft que ofrece un inicio de sesión único y

>servicios de perfil principal para sitios miembro.

>Line 45: -->

>Line 46: <authentication mode="Windows" />

>Line 47:

>Line 48: <!-- AUTORIZACIÃ?N

>

>

>I've seen somebody else in this forum had had this problem, but mine is

>worse, because my computer completely stops responding if I change the

>application directory property in site properties, which is the way another

>users have solved the problem.

>I've checked this problem dissapear if I uninstall .net framework, so I

>think there must be a conflict with this.

>Does anybody have any idea?

>Thanks

-

Re:Framework conflict??

The question is: Why would you set up a virtual directory to point to

another directory already in IIS.



I develop with my project in a regular directory outside of the wwwroot and

then create a virtual directory that points to that real directory

structure. IT looks like you are taking a pre-existing web app created

within an actual directory under wwwroot (ie Non-virtual). You can verify

this is the case by using file explorer and see if that directory actually

exists under the inetpub\wwwroot directory.



Next go into IIS and make sure the directory is checked as an application.

"virtual" just may not be set to being an application. If all pruebal is is

a directory to hold files, I suggest you move those files out of wwwroot for

security purposes.



hth

Harry Simpson





"Problem doesn't solve" <Problemdoesntsolve@discussions.microsoft.com>wrote

in message news:51275F5B-9F81-4F67-A111-1C0BEE2422E1@microsoft.com...

Quote
Hello.

Thanks for your response. I think I've tried every possible combination

with

virtual directories as you said, and when I try to access my aspx page, my

system stops responding (as what it happened before).

Problem is the same when I introduce the virtual directory address and my

habitual address (normal project address).

I don't know if is it possible to use a virtual address as an habitual

address way.

I explain you steps I've followed:

- My project is in directory wwwroot/prueba1

- I've created a virtual directory called "virtual", which points to this

directory.

- I've tried in my browser with addresses: localhost/prueba1/p.aspx and

localhost/virtual/p.aspx , and problem keeps being the same (system

blocked

and rebooting needed).

The truth is that I'm quite desperate.

Do you find any other solution?

Thank you





"Bruce Johnson [.NET MVP]" wrote:



>This error is almost invariably caused by the directory that your trying

>to

>access not being defined as an virtual directory to IIS. What the

>message is

>really saying is that you're accessing a directory (through a browser)

>that

>contains a web.config file. While this is quite acceptable, when ASP.NET

>is

>processing the config file, it finds a setting that cannot be defined in

>the

>subdirectory of an existing virtual directory.

>

>The solution (at least in my experience) has been to go to IIS manager

>and

>right-click on the Default Web Site. Then select New | Virtual

>Directory.

>Give the virtual directory a name and provide a path that points to

>exactly

>where this project is living. After you've finished the wizard, you

>should

>be able to browser to the page successfully.

>

>Hope that helps.

>

>Bruce Johnson [.NET MVP]

>www.objectsharp.com/blogs/bruce">www.objectsharp.com/blogs/bruce

>

>"Problem doesn't solve" wrote:

>

>>Hello.

>>I'm having a big problem with asp .net. Initially, when I create a new

>>web

>>applicaction and I try to open an aspx page, I get an error message:

>>

>>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.

>>

>>Source Error:

>>

>>

>>Line 44: por Microsoft que ofrece un inicio de sesión único y

>>servicios de perfil principal para sitios miembro.

>>Line 45: -->

>>Line 46: <authentication mode="Windows" />

>>Line 47:

>>Line 48: <!-- AUTORIZACIÓN

>>

>>

>>I've seen somebody else in this forum had had this problem, but mine is

>>worse, because my computer completely stops responding if I change the

>>application directory property in site properties, which is the way

>>another

>>users have solved the problem.

>>I've checked this problem dissapear if I uninstall .net framework, so I

>>think there must be a conflict with this.

>>Does anybody have any idea?

>>Thanks





-

Re:Framework conflict??

The response is very simple: I tried the simplest way and it didn't work. I'm

a novice in web development, but I've been in it some months and I never had

to change this configuration because I was making a simple application, so it

was hosted in wwwroot directory.

Now, I think that at least I know where the problem is, although I don't

know why it's produced. I've checked sometimes project properties in IIS are

changed automatically, specifically the "application configuration" ones, (in

Directrory tab). I suppose this is the problem source.

Do you know if I've to write anything in application name?

The most extrange thing is that I've managed to build a new project that

works, and its properties are exactly the same that non-working projects.

Any idea?

Thanks.



"Harry Simpson" wrote:



Quote
The question is: Why would you set up a virtual directory to point to

another directory already in IIS.



I develop with my project in a regular directory outside of the wwwroot and

then create a virtual directory that points to that real directory

structure. IT looks like you are taking a pre-existing web app created

within an actual directory under wwwroot (ie Non-virtual). You can verify

this is the case by using file explorer and see if that directory actually

exists under the inetpub\wwwroot directory.



Next go into IIS and make sure the directory is checked as an application.

"virtual" just may not be set to being an application. If all pruebal is is

a directory to hold files, I suggest you move those files out of wwwroot for

security purposes.



hth

Harry Simpson





"Problem doesn't solve" <Problemdoesntsolve@discussions.microsoft.com>wrote

in message news:51275F5B-9F81-4F67-A111-1C0BEE2422E1@microsoft.com...

>Hello.

>Thanks for your response. I think I've tried every possible combination

>with

>virtual directories as you said, and when I try to access my aspx page, my

>system stops responding (as what it happened before).

>Problem is the same when I introduce the virtual directory address and my

>habitual address (normal project address).

>I don't know if is it possible to use a virtual address as an habitual

>address way.

>I explain you steps I've followed:

>- My project is in directory wwwroot/prueba1

>- I've created a virtual directory called "virtual", which points to this

>directory.

>- I've tried in my browser with addresses: localhost/prueba1/p.aspx and

>localhost/virtual/p.aspx , and problem keeps being the same (system

>blocked

>and rebooting needed).

>The truth is that I'm quite desperate.

>Do you find any other solution?

>Thank you

>

>

>"Bruce Johnson [.NET MVP]" wrote:

>

>>This error is almost invariably caused by the directory that your trying

>>to

>>access not being defined as an virtual directory to IIS. What the

>>message is

>>really saying is that you're accessing a directory (through a browser)

>>that

>>contains a web.config file. While this is quite acceptable, when ASP.NET

>>is

>>processing the config file, it finds a setting that cannot be defined in

>>the

>>subdirectory of an existing virtual directory.

>>

>>The solution (at least in my experience) has been to go to IIS manager

>>and

>>right-click on the Default Web Site. Then select New | Virtual

>>Directory.

>>Give the virtual directory a name and provide a path that points to

>>exactly

>>where this project is living. After you've finished the wizard, you

>>should

>>be able to browser to the page successfully.

>>

>>Hope that helps.

>>

>>Bruce Johnson [.NET MVP]

>>www.objectsharp.com/blogs/bruce">www.objectsharp.com/blogs/bruce

>>

>>"Problem doesn't solve" wrote:

>>

>>>Hello.

>>>I'm having a big problem with asp .net. Initially, when I create a new

>>>web

>>>applicaction and I try to open an aspx page, I get an error message:

>>>

>>>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.

>>>

>>>Source Error:

>>>

>>>

>>>Line 44: por Microsoft que ofrece un inicio de sesión único y

>>>servicios de perfil principal para sitios miembro.

>>>Line 45: -->

>>>Line 46: <authentication mode="Windows" />

>>>Line 47:

>>>Line 48: <!-- AUTORIZACIÃ?N

>>>

>>>

>>>I've seen somebody else in this forum had had this problem, but mine is

>>>worse, because my computer completely stops responding if I change the

>>>application directory property in site properties, which is the way

>>>another

>>>users have solved the problem.

>>>I've checked this problem dissapear if I uninstall .net framework, so I

>>>think there must be a conflict with this.

>>>Does anybody have any idea?

>>>Thanks







-