Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 http://gametek.me/V5/ 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>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Welcome to ASP.NET!
    </h2>
    <p>
        To learn more about ASP.NET visit <a href="http://www.asp.net" title="ASP.NET Website">www.asp.net</a>.
    </p>
    <p>
        You can also find <a href="http://go.microsoft.com/fwlink/?LinkID=152368&amp;clcid=0x409"
            title="MSDN ASP.NET Docs">documentation on ASP.NET at MSDN</a>.
    </p>
</asp:Content>


Web.config

<?xml version="1.0"?>

<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>

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

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

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

    <membership>
      <providers>
        <clear/>
        <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="/" />
      </providers>
    </membership>

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

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

  </system.web>

  <system.webServer>
     <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
</configuration>
<!-- 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. weblogs.asp.net/owscott/archive/2010/07/29/… –  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

1 Answer 1

up vote 0 down vote accepted

EDITED

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

 
discard

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.