Link to home
Start Free TrialLog in
Avatar of jxharding
jxharding

asked on

<authentication mode= "none"/"forms"/"windows" /> -still get error:error to use a section registered as allowDefinition='MachineToApplication' beyond application level.This error can be caused

hi,
IT IS NOT A CASE OF a extra web.config lying in the directory of the web pages.
IT IS NOT A CASE OF the web page not being an application. (mabye i must double check my method)

i have a windows 2003 server. IIS6
we are running a classic asp site from it.
now i made a c# website in asp.net 2005.
the server will now run a classic asp website and my new site.
i installed .net framework 2.0 on windows 2003
i am developing on a XP pro machine with iis 5.1.



Server Error in '/' Application.
--------------------------------------------------------------------------------

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser 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 28:             ASP.NET to identify an incoming user.
Line 29:         -->
Line 30:       <authentication mode="None" />   --      !!!!!!!!--IN RED FONT !!!!!!!!!! THE ERROR POINT TO THIS LINE
Line 31:
Line 32:
 

Source File: C:\Inetpub\wwwroot\mohair\intra\web.config    Line: 30
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42


--------nothing special in the web.config file:
<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
      <appSettings/>
      <connectionStrings>
  <remove name="LocalSqlServer" />
  <add name="cmwConnectionString" connectionString="Data Source=SQLSERVER;Initial Catalog=abc;Persist Security Info=True;User ID=abc;Password=abc"   providerName="System.Data.SqlClient" />
 </connectionStrings>
      <system.web>
            <compilation defaultLanguage="c#" />
            <authentication mode="None" />
      </system.web>
</configuration>


i tried all possible authentication modes
no matter what i make the  authentication mode, i still get the error pointing to line : <authentication mode="None" />


this is what i tried:

right click web sites
new web site
Description Intra


IP ADDRESS AND PORT SETTINGS WIZARD PAGE
Enter IP address to Use for this website:
All unassigned

TCP Port 81 (80 already used by classic asp site)

Host Header :blank


WEBSITE HOME DIRECTORY WIZARD PAGE

BROWSE TO FOLDER WITH FILES: ( i copied them straight from development machines)
web.config
default.aspx
default.aspx.cs

TICKED ALLOW ANONYMOUS ACCESS TO THIS WEBSITE

WEB SITE ACCESS PERMISSIONS
tick READ


now i try to access the web page:
i get the above mentioned error.

now i attempt to make a virtual directory of the website:
right click the intra website -> create new virtual directory.
alias = Intra
browse to same folder
permissons - only read ticked


i still get the same error.

now i right click the virtual directory
properties - virtual director tab-
I click on application name to make it a application.

i still get the same error.


if i now remove the application and make it a virtual directory again, i still get the same error




ASKER CERTIFIED SOLUTION
Avatar of mmarinov
mmarinov

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jxharding
jxharding

ASKER

hi, i think i made a advancement, but still an error:

now i compiled the website.
(publised web site by right clicking project)

now i took the files:
bin
       App_Code.compiled
      App_Code.dll            
      App_Web_dscbjl1j.dll
Default.aspx
PrecompiledApp.config
Tel.aspx
Web.Config

and put it into the folder.
i made it an application.

now i get the error

Server Error in '/' Application.
--------------------------------------------------------------------------------

The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /intranet/default.aspx


--------------------------------------------------------------------------------
Version Information: Mi
if i click on the web.config i get the error:
An error has occured attempting to read the configuration. The error message is:

Index was outside the bounds of the array.

Stack Trace:

   at Microsoft.Aspnet.Snapin.ConfigSetting..ctor(String VirtDir, String Machine, String site, String siteName, String location, Int32 processID, Boolean AllowOpenAtSameLevel)
   at Microsoft.Aspnet.Snapin.ConfigSetting..ctor(String VirtDir, String Machine, String site, String siteName, String location, Int32 processID)
   at Microsoft.Aspnet.Snapin.AspNetManagementUtility.DisplayAspNetConfigSettings(String machineName, String site, String virtualDirectory, String siteName, String location, Int32 processID, String& exception)
jxharding,

Have you installed correct .net 2.0?
if you do not have other .net frameworks then just go in the Visual Studio (in the start menu) -> Tools -> Command prompt and run
aspnet_regiis -i

the this should fix the problem

Regards
Martin
hi, i did get the .net 2.0 framework from the visual studio dvd
and installed it on the webserver.
its version
2.0.50727.42

i do have other .net frameworks on the same machine.
the other frameworks are 1.0 and 1.1
jxharding,

Sometime installing the new version is not complete handled by the iis
check this article http://msdn2.microsoft.com/en-us/library/k6h9cz8h(VS.80).aspx how to install a specific version of asp.net to the specific virtual directory

Regards
Martin
thanks so far martin
 have only 1  .net 2 framework on the server.
the other 2 are .net 1 versions.

when i right click the website , and click on asp.net it says :version 2.0....

MSDN says:
The following command installs the ASP.NET version that is associated with the ASP.NET IIS Registration tool and updates the script maps of all existing ASP.NET applications. Note that only applications that are currently mapped to an earlier version of ASP.NET are affected.

aspnet_regiis -i

should i re-register the same version?

my error is now on not being able to find the page, and that is possibly caused by the web.config not reading correctly via the edit configuration button.
does this mean the file is buggered up?
i copied back the original file from development machine and still the error



jxharding,

Can you post the entire error message from screen and also the code line that it is errored

Regards
Martin
i think my problem could be that i am running from port 81.
the classic asp site is running on port 80.
i have to make a new website for the asp.net app and i chose port 81.
e.g. the classic asp site is www.abc.com
im trying to make the new site available by going to www.abc.com/intranet

it cannot find any page now.
Server Error in '/' Application.
--------------------------------------------------------------------------------

The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /intranet/default.aspx

so i thought www.abc.com:81 would work.

there's something going on if i type in : www.abc.com:81

it now works on the internal computers.

can i open this up to the rest of the world?

1 last question pls
the site is working now internally.

can i somehow open up port 81 to the rest of the world so i can visit
www.abc.com/intranet
from outside the company?

would i have to register a new domain ?

 thanks!
jxharding,

No you do not have to do that, but you have to allow this port. I suggest you to post new question about this. It is preferable to not mix the questions.
Because you have answered your question mostly alone you can think off posting in Community Support for returning points

Regards
Martin