Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am going to build a site using Microsoft Visual web developer 2010 express, and when complied the site on the machine i built it in, it works using debug, on the webserver that should serve it, i get a runtime error. I am using the default templater to start with, then work on the way. So when i try to access i get a runtime error, when i use the debug on MSVWD It works perfectly. Any ideas whats wrong?

Default code from the program

<%@ Page Title="Home Page" Language="VB" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeFile="Default.aspx.vb" Inherits="_Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
        Welcome to ASP.NET!
        To learn more about ASP.NET visit <a href="" title="ASP.NET Website"></a>.
        You can also find <a href=";clcid=0x409"
            title="MSDN ASP.NET Docs">documentation on ASP.NET at MSDN</a>.


<?xml version="1.0"?>

  For more information on how to configure your ASP.NET application, please visit
        <customErrors mode="Off"/>

    <add name="ApplicationServices"
         connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
         providerName="System.Data.SqlClient" />

    <compilation debug="false" strict="false" explicit="true" targetFramework="4.0" />

    <authentication mode="Forms">
      <forms loginUrl="~/Account/Login.aspx" timeout="2880" />

        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices"
             enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
             maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
             applicationName="/" />

        <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>

    <roleManager enabled="false">
        <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
        <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />


     <modules runAllManagedModulesForAllRequests="true"/>
<!-- Web.Config Configuration File -->

Screenshot of error Error when going on local

share|improve this question
Can you give us more detail than "I get an error"? – squillman Aug 22 '12 at 17:56
@squillman It only says Server Error in '/' Application. Runtime Error – Teknikk Aug 22 '12 at 18:01
Set customErrors to off or remoteonly per this post. That will give you the exception that is being thrown and should help to lead you in the direction of how to fix the problem.… – squillman Aug 22 '12 at 18:09
@squillman Turned it off, and it returned this error, Line 11: </configuration> Line 12: Line 13: <connectionStrings> Line 14: <add name="ApplicationServices" Line 15: connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" Source File: X:\WebSite\wwwrootTF2Gametek\v5\web.config Line: 13 – Teknikk Aug 22 '12 at 18:12
up vote 0 down vote accepted


Did you read the Parser Error Message?

There are multiple root elements. Line 13, position 4

Essentially you have closed the web.config XML tree on line 11 where you declare </configuration>

You either need to remove that line all together or move it to the end of the file.

BTW, there is no way this file as it is would have worked in development. It's not valid XML.

share|improve this answer
The App_Data folder has Read/Write permissions, but still doesn't work, i've added a screenshot of the error, and the web.config – Teknikk Aug 22 '12 at 18:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.