Framework conflict??

G

Guest

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
 
G

Guest

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]
http://www.objectsharp.com/blogs/bruce
 
G

Guest

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 said:
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]
http://www.objectsharp.com/blogs/bruce

Problem doesn't solve said:
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
 
H

Harry Simpson

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 said:
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 said:
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]
http://www.objectsharp.com/blogs/bruce

Problem doesn't solve said:
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
 
G

Guest

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 said:
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 said:
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 said:
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]
http://www.objectsharp.com/blogs/bruce

:

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
 

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

No members online now.

Forum statistics

Threads
473,786
Messages
2,569,626
Members
45,328
Latest member
66Teonna9

Latest Threads

Top