[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

WebConfig Help - Newby

Posted on 2004-11-04
17
Medium Priority
?
652 Views
Last Modified: 2008-03-10
I'm trying to configure my first asp.net site. I have the site set up in iis. I've also made my members folder a virtual directory and added it's own web config file. Which looks like this..

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
   
  <system.web>

    <!--  DYNAMIC DEBUG COMPILATION
          Set compilation debug="true" to insert debugging symbols (.pdb information)
          into the compiled page. Because this creates a larger file that executes
          more slowly, you should set this value to true only when debugging and to
          false at all other times. For more information, refer to the documentation about
          debugging ASP.NET files.
    -->
    <compilation defaultLanguage="vb" debug="true" />

    <!--  CUSTOM ERROR MESSAGES
          Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable.
          Add <error> tags for each of the errors you want to handle.

          "On" Always display custom (friendly) messages.
          "Off" Always display detailed ASP.NET error information.
          "RemoteOnly" Display custom (friendly) messages only to users not running
           on the local Web server. This setting is recommended for security purposes, so
           that you do not display application detail information to remote clients.
    -->
    <customErrors mode="Off" />

    <!--  AUTHENTICATION
          This section sets the authentication policies of the application. Possible modes are "Windows",
          "Forms", "Passport" and "None"

          "None" No authentication is performed.
          "Windows" IIS performs authentication (Basic, Digest, or Integrated Windows) according to
           its settings for the application. Anonymous access must be disabled in IIS.
          "Forms" You provide a custom form (Web page) for users to enter their credentials, and then
           you authenticate them in your application. A user credential token is stored in a cookie.
          "Passport" Authentication is performed via a centralized authentication service provided
           by Microsoft that offers a single logon and core profile services for member sites.
    -->
    <authentication mode="Forms">
            <forms loginUrl="login.aspx" protection="All" timeout="30>
                  <credentials passwordFormat="Clear">
                        <user name="me" password="pwd"/>
                  </credentials>
            </forms>
      </authentication>

    <!--  AUTHORIZATION
          This section sets the authorization policies of the application. You can allow or deny access
          to application resources by user or role. Wildcards: "*" mean everyone, "?" means anonymous
          (unauthenticated) users.
    -->
   
      
      <location path="admin/">
              <system.web>
                  <authorization>
                        <allow users="me"/>
                  </authorization>
            </system.web>
      </location>
      <location path="useronly/">
            <system.web>
                  <authorization>
                        <deny users="?" />
                  </authorization>
            </system.web>
      </location>
      <location path="public/">
            <system.web>
                  <authorization>
                        <allow users="*" />
                  </authorization>
            </system.web>
      </location>

    <!--  APPLICATION-LEVEL TRACE LOGGING
          Application-level tracing enables trace log output for every page within an application.
          Set trace enabled="true" to enable application trace logging.  If pageOutput="true", the
          trace information will be displayed at the bottom of each page.  Otherwise, you can view the
          application trace log by browsing the "trace.axd" page from your web application
          root.
    -->
    <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />


    <!--  SESSION STATE SETTINGS
          By default ASP.NET uses cookies to identify which requests belong to a particular session.
          If cookies are not available, a session can be tracked by adding a session identifier to the URL.
          To disable cookies, set sessionState cookieless="true".
    -->
    <sessionState
            mode="InProc"
            stateConnectionString="tcpip=127.0.0.1:42424"
            sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
            cookieless="false"
            timeout="20"
    />

    </system.web>
 
 
</configuration>

when I try to access my members/default.aspx page I get the following....

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 37:            by Microsoft that offers a single logon and core profile services for member sites.
Line 38:     -->
Line 39:     <authentication mode="Forms">
Line 40:             <forms loginUrl="login.aspx" protection="All" timeout="30>
Line 41:                   <credentials passwordFormat="Clear">
 

Source File: C:\Inetpub\wwwroot\mdfx\partnersite\web.config    Line: 39


Thanks for your help.
Jody
0
Comment
Question by:kevinbenedict
  • 8
  • 6
  • 2
  • +1
17 Comments
 
LVL 6

Expert Comment

by:ryerras
ID: 12496202
looks like the problem is with this
<forms loginUrl="login.aspx" protection="All" timeout="30>

close the double quotes for timeout like --> timeout="30"
0
 

Author Comment

by:kevinbenedict
ID: 12496234
I changed that but still get the same 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 37:            by Microsoft that offers a single logon and core profile services for member sites.
Line 38:     -->
Line 39:     <authentication mode="Forms">
Line 40:             <forms loginUrl="login.aspx" protection="All" timeout="30">
Line 41:                   <credentials passwordFormat="Clear">
 

Source File: C:\Inetpub\wwwroot\mdfx\partnersite\web.config    Line: 39
0
 
LVL 6

Expert Comment

by:ryerras
ID: 12496309
THis could probably mean, your site is not set as an application

Go to Control Panel-->> Administrative Tools --> IIS --> on the left side, click on Web Sites --> Default Web site-->>then select your application and right click and go to properties --> then on the Directory Tab , in the lower tab (Application Settings) -->Application Name and the textbox besides it are disabled, then click on the create button to set the project as an application

try this and let me know
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 18

Expert Comment

by:tusharashah
ID: 12496689
Try to remove: <credentials passwordFormat="Clear"> & see

I believe that works only with Passport Authentication

-tushar
0
 

Author Comment

by:kevinbenedict
ID: 12496779
ryerras,
My applicaation Name has the textboxes already with information in them

Under Application name: MDFx
Execute Permissions: Script Only
Application Pool: Default Pool
0
 

Author Comment

by:kevinbenedict
ID: 12496786
tusharashah,

I thought meant "clear text" for the password
0
 
LVL 6

Expert Comment

by:ryerras
ID: 12496841
Did you set the scripts only permissions below that create application stuff I said befpre

Set execute permissions for Scripts only and High (Isolated) application protection. Press Apply.
0
 

Author Comment

by:kevinbenedict
ID: 12496896
I don't see that.

I'm on the Virtual Directory tab in IIS and this is what I have

Under Application name: SolProv
Execute Permissions: Script Only
Application Pool: Default Pool

There is a remove button by Application Name
Then below it configuration
The UNLOAD button is grayed out.
0
 
LVL 6

Expert Comment

by:ryerras
ID: 12496931
Below that configuration line, you should see Execute Permissions, then a drop down for that, then in the next line, you should see Application protection
0
 

Author Comment

by:kevinbenedict
ID: 12496960
I have Execute Permissions with a drop down selected to Scripts Only
The next line is Application Pool with a drop down selected to DefaultAppPool
0
 
LVL 6

Expert Comment

by:ryerras
ID: 12497018
Hmm, I am lost, what else could be wrong. Look at the microsoft answer for this problem


What Does The “Parser Error Message” Mean?
Q: We have a fully patched IIS 5 server and are receiving the following error “Parser Error Message: It is an error to use a section registered allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS“. Can you explain what this means?

A: I love these verbose Asp.net error messages! They often direct you to the solution as well as describe the problem. You“ll see this error when your Asp.net application is configured such that it uses a feature like <authentication mode../> or <sessionState..> that requires an“ Application” be defined in the metabase, and that definition is missing. You can correct this by either removing such settings from your web.config files, or by clicking Create on the Home Directory, Virtual Directory, or Directory properties tab of a web site, virtual directory, or directory, respectively. This location will require at least the Scripts Only permission and Read permissions as well.
0
 

Author Comment

by:kevinbenedict
ID: 12497051
That's actually where I started and I'm just scratching my head.

0
 
LVL 9

Accepted Solution

by:
hismightiness earned 1000 total points
ID: 12498376
Have you tried removing the Application and creating a new one in IIS to be sure that the application is created?  I have seen this error several times, but normally the application isn't even created when this error occurs.  

Also, you may or may not get more information with this, but try choosing "Start without Debugging" under the "Debug" menu.  This can sometimes point out exact Web.Config error messages.
0
 

Author Comment

by:kevinbenedict
ID: 12498520
I've blown the virtual Directory and re-created it twice.  Where do I find the "Debug" Menu?

Thanks
0
 
LVL 6

Expert Comment

by:ryerras
ID: 12498563
he is talking abt execution mode, use F5 for executing in DEBUG mode, and Ctrl+F5 for excuting in "Without Debug" Mode. You can also find these in DEBUG menu on the VS.NET
0
 
LVL 9

Expert Comment

by:hismightiness
ID: 12498965
Visual Studio - are you not using Visual Studio?
0
 

Author Comment

by:kevinbenedict
ID: 12499353
No DWMX
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Screencast - Getting to Know the Pipeline
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question