locked
How do you publish your site? RRS feed

  • Question

  • User-867221238 posted

    Ok this is what is happening so far.

     I finally edited the PWS to how I want it to look.  Now that I am trying to post it to a server i get this error

    Server Error in '/' Application.

    Runtime Error

    Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

    Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

    <!-- Web.Config Configuration File -->
    
    <configuration>
        <system.web>
            <customErrors mode="Off"/>
        </system.web>
    </configuration>

    Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

    <!-- Web.Config Configuration File -->
    
    <configuration>
        <system.web>
            <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
        </system.web>
    </configuration>
     

    I am using http://www.1and1.com to host my site.  I have tried to talk to there Tech support but would have been better off running my car into a brick wall :)

    I have tried to edit the web.config to what it tells me to add but this is all that will come up.  This is what is in my web.config file.

    <?xml version="1.0"?>

    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

    <connectionStrings>

    <add name="Personal" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Personal.mdf" providerName="System.Data.SqlClient" />

    <remove name="LocalSqlServer"/>

    <add name="LocalSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf" />

    </connectionStrings>

    <system.web>

    <pages styleSheetTheme="Black"/>

    <customErrors mode="off"/>

    <identity impersonate="true"/>

    <compilation debug="false"/>

    <authentication mode="Forms">

    <forms loginUrl="Default.aspx" protection="Validation" timeout="300" />

    </authentication>

    <authorization>

    <allow users="*"/>

    </authorization>

    <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>

    <roleManager enabled="true"/>

    <siteMap defaultProvider="XmlSiteMapProvider" enabled="true">

    <providers>

    <add name="XmlSiteMapProvider"

    description="SiteMap provider which reads in .sitemap XML files."

    type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

    siteMapFile="web.sitemap"

    securityTrimmingEnabled="true"/>

    </providers>

    </siteMap>

    </system.web>

    <location path="Admin">

    <system.web>

    <authorization>

    <allow roles="Administrators"/>

    <deny users="*"/>

    </authorization>

    </system.web>

    </location>

    </configuration>

     

    Now I know that the database is not in the path that is in the web.config file.  The database on the server is in /db folder.  What I need to know is how do i edit the web.config file to reflect this. and do I need to load the Personnal.mdf with it?  Or do I use the database that is provided with the Server?

     

    It runs fine on my computer, it's just when I copy it to the server and test it online that it takes a poop :(

    Please help me out.

     

    Thanks

    Chris

    Monday, May 14, 2007 4:10 PM

Answers

  • User-1705717250 posted

    Well what you need to do is make a blanks database using mylittleadmin in the control panel at 1and1.

    Then using the Personnal.sql create the tables into the blank database - This creates the main application table but you then need to add the membership tables to do this

    On our local PC, run aspnet_regsql.exe as a commandline process to create a .sql script which would create the “aspnet” portion of my database.  On my PC, it was in:  C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>

         aspnet_regsql.exe -S [mssqlxx.1and1.com] -U [dboyyyyyyyyy] -P [zzzzzzzz] -A all <o:p></o:p>

         -d [dbyyyyyyyyy] -sqlexportonly [aspnet_add.sql]<o:p></o:p>

    <o:p> </o:p>

                I guess you can make out the options here<o:p></o:p>

                -S = your 1and1 sql server (xx) instance name<o:p></o:p>

                -d = Database/DB Owner name (yyyyyyyyy and password zzzzzzzz)<o:p></o:p>

                -sqlexportonly = the name of the file you need, in this case “aspnet_add.sql” is created.<o:p></o:p>

         (I think the -U [dboyyyyyyyyy] -P [zzzzzzzz] switches were not necessary)<o:p></o:p>

    <o:p> </o:p>

                I used the 1and1 MS-SQL admin, mylittleadmin tool, tools, Query Analyser tool to run this<o:p></o:p>

                script, specifying where on my local PC the script was.  Then tables, stored procedures, and<o:p></o:p>

         views were created, for the “aspnet functions” portion of the DB out on 1and1.<o:p></o:p>

    Then you need to add some data into the web.config file

     

    <membership defaultProvider="CustomizedMembershipProvider" ><o:p></o:p>

          <providers><o:p></o:p>

            <add name="CustomizedMembershipProvider"<o:p></o:p>

                            type="System.Web.Security.SqlMembershipProvider"<o:p></o:p>

                            connectionStringName="LocalSqlServer"<o:p></o:p>

                            enablePasswordRetrieval="false"<o:p></o:p>

                            enablePasswordReset="true"<o:p></o:p>

                            requiresQuestionAndAnswer="true"<o:p></o:p>

                            applicationName="/main"<o:p></o:p>

                            requiresUniqueEmail="true"<o:p></o:p>

                            passwordFormat="Hashed"<o:p></o:p>

                            maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7"<o:p></o:p>

                            minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10"<o:p></o:p>

                            passwordStrengthRegularExpression=""/><o:p></o:p>

          </providers><o:p></o:p>

        </membership>

    <o:p></o:p> 

    <connectionStrings><o:p></o:p>

                <add name="classifiedsConnection" connectionString="server=mssqlxx.1and1.com;<o:p></o:p>

                     initial catalog=dbyyyyyyyyy; uid=dboyyyyyyyyy; Pwd=zzzzzzzz"/><o:p></o:p>

                <remove name="LocalSqlServer"/><o:p></o:p>

                <add name="LocalSqlServer" connectionString="server=mssqlxx.1and1.com;<o:p></o:p>

                    initial catalog=dbyyyyyyyyy; uid=dboyyyyyyyyy; Pwd=zzzzzzzz"/><o:p></o:p>

      </connectionStrings><o:p></o:p>

    Well sorry for a long post but that should see you up and running. Any problems let me know.

    Good Luck.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 14, 2007 4:42 PM
  • User-1705717250 posted

    You are very close but not quite.

    Firstly the  connectionStrings add name="classifiedsConnection" is wrong, this is my fault I typed the wrong starter kit name in my post sorry. So it should be add name="Personal" 

    You also need to make sure that you application name is correct, you can check this in the 1and1 control panel, file manager then properties on the folder.

    You may also find this post helpful http://forums.asp.net/p/1110595/1710593.aspx

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, May 17, 2007 4:09 AM
  • User-1705717250 posted

    It would seem that the membership and sitemap sections have merged in the web.config file.

     

    <membership>
    <providers>
    <clear/>
    <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, 
    System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 
    connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true"
     requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="true"
    passwordFormat="Hashed" 
    maxInvalidPasswordAttempts="5" 
    minRequiredPasswordLength="7"
     minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
    </providers>
    </membership>
    
    
    <siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
    <providers>
    <clear/>
    <add name="XmlSiteMapProvider" type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral,
     PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="web.sitemap" securityTrimmingEnabled="true"/>
    </providers>
    </siteMap>
     You may need to adjust some of the data above as per your application but should give you the framework.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, May 17, 2007 4:39 PM

All replies

  • User-1705717250 posted

    Well what you need to do is make a blanks database using mylittleadmin in the control panel at 1and1.

    Then using the Personnal.sql create the tables into the blank database - This creates the main application table but you then need to add the membership tables to do this

    On our local PC, run aspnet_regsql.exe as a commandline process to create a .sql script which would create the “aspnet” portion of my database.  On my PC, it was in:  C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>

         aspnet_regsql.exe -S [mssqlxx.1and1.com] -U [dboyyyyyyyyy] -P [zzzzzzzz] -A all <o:p></o:p>

         -d [dbyyyyyyyyy] -sqlexportonly [aspnet_add.sql]<o:p></o:p>

    <o:p> </o:p>

                I guess you can make out the options here<o:p></o:p>

                -S = your 1and1 sql server (xx) instance name<o:p></o:p>

                -d = Database/DB Owner name (yyyyyyyyy and password zzzzzzzz)<o:p></o:p>

                -sqlexportonly = the name of the file you need, in this case “aspnet_add.sql” is created.<o:p></o:p>

         (I think the -U [dboyyyyyyyyy] -P [zzzzzzzz] switches were not necessary)<o:p></o:p>

    <o:p> </o:p>

                I used the 1and1 MS-SQL admin, mylittleadmin tool, tools, Query Analyser tool to run this<o:p></o:p>

                script, specifying where on my local PC the script was.  Then tables, stored procedures, and<o:p></o:p>

         views were created, for the “aspnet functions” portion of the DB out on 1and1.<o:p></o:p>

    Then you need to add some data into the web.config file

     

    <membership defaultProvider="CustomizedMembershipProvider" ><o:p></o:p>

          <providers><o:p></o:p>

            <add name="CustomizedMembershipProvider"<o:p></o:p>

                            type="System.Web.Security.SqlMembershipProvider"<o:p></o:p>

                            connectionStringName="LocalSqlServer"<o:p></o:p>

                            enablePasswordRetrieval="false"<o:p></o:p>

                            enablePasswordReset="true"<o:p></o:p>

                            requiresQuestionAndAnswer="true"<o:p></o:p>

                            applicationName="/main"<o:p></o:p>

                            requiresUniqueEmail="true"<o:p></o:p>

                            passwordFormat="Hashed"<o:p></o:p>

                            maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7"<o:p></o:p>

                            minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10"<o:p></o:p>

                            passwordStrengthRegularExpression=""/><o:p></o:p>

          </providers><o:p></o:p>

        </membership>

    <o:p></o:p> 

    <connectionStrings><o:p></o:p>

                <add name="classifiedsConnection" connectionString="server=mssqlxx.1and1.com;<o:p></o:p>

                     initial catalog=dbyyyyyyyyy; uid=dboyyyyyyyyy; Pwd=zzzzzzzz"/><o:p></o:p>

                <remove name="LocalSqlServer"/><o:p></o:p>

                <add name="LocalSqlServer" connectionString="server=mssqlxx.1and1.com;<o:p></o:p>

                    initial catalog=dbyyyyyyyyy; uid=dboyyyyyyyyy; Pwd=zzzzzzzz"/><o:p></o:p>

      </connectionStrings><o:p></o:p>

    Well sorry for a long post but that should see you up and running. Any problems let me know.

    Good Luck.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 14, 2007 4:42 PM
  • User-867221238 posted

    OK so should i add it like this?

    <?xml version="1.0"?>
    <configuration>
     <connectionStrings>
                <add name="classifiedsConnection" connectionString="server=mssql09.1and1.com;
                     initial catalog=db205332131; uid=dbo205332131; Pwd=xxxxxxxxx"/>
                <remove name="LocalSqlServer"/>
                <add name="LocalSqlServer" connectionString="server=mssqlxx.1and1.com;
                    initial catalog=db205332131; uid=dbo205332131; Pwd=xxxxxxxxx"/>
      </connectionStrings>

     <system.web>
      <pages styleSheetTheme="Black"/>
      <customErrors mode="RemoteOnly"/>
      <compilation debug="false"/>
      <authentication mode="Forms">
       <forms loginUrl="Default.aspx" protection="Validation" timeout="300" />
      </authentication>
      <authorization>
       <allow users="*"/>
      </authorization>
      <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
      <roleManager enabled="true"/>
      <siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
        <membership defaultProvider="CustomizedMembershipProvider" >
           <providers>
            <add name="CustomizedMembershipProvider"
                            type="System.Web.Security.SqlMembershipProvider"
                            connectionStringName="LocalSqlServer"
                            enablePasswordRetrieval="false"
                            enablePasswordReset="true"
                            requiresQuestionAndAnswer="true"
                            applicationName="/main"
                            requiresUniqueEmail="true"
                            passwordFormat="Hashed"
                            maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7"
                            minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10"
                            passwordStrengthRegularExpression=""/>
            </providers>
            </membership>
      </siteMap>
     </system.web>
     <location path="Admin">
      <system.web>
       <authorization>
        <allow roles="Administrators"/>
        <deny users="*"/>
       </authorization>
      </system.web>
     </location>
    </configuration>

     

    If not PLEASE help me out.  I'm not very good with this stuff.   Never did more then  HTML editing.  This is completely new to me.  Thank you for all the help

    Wednesday, May 16, 2007 4:57 PM
  • User-1705717250 posted

    You are very close but not quite.

    Firstly the  connectionStrings add name="classifiedsConnection" is wrong, this is my fault I typed the wrong starter kit name in my post sorry. So it should be add name="Personal" 

    You also need to make sure that you application name is correct, you can check this in the 1and1 control panel, file manager then properties on the folder.

    You may also find this post helpful http://forums.asp.net/p/1110595/1710593.aspx

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, May 17, 2007 4:09 AM
  • User-867221238 posted

    I'm getting this error 

    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: The provider 'XmlSiteMapProvider' specified for the defaultProvider does not exist in the providers collection.

    Source Error:

    Line 20: 		<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
    Line 21: 		<roleManager enabled="true"/>
    Line 22: 		<siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
    Line 23:            <providers>
    Line 24:         <add name="CustomizedMembershipProvider"

    here is the code

    <?xml version="1.0"?>
    <configuration>
     <connectionStrings>
                <add name="Personal" connectionString="server=mssql09.1and1.com;
                     initial catalog=db205332131; uid=dboxxxxxxxxx; Pwd=xxxxxxxxv"/>
                <remove name="LocalSqlServer"/>
                <add name="LocalSqlServer" connectionString="server=mssql09.1and1.com;
                     initial catalog=db205332131; uid=dboxxxxxxxxx; Pwd=xxxxxxxxx"/>
      </connectionStrings>
     <system.web>
      <pages styleSheetTheme="Black"/>
      <customErrors mode="Off"/>
      <compilation debug="false"/>
      <authentication mode="Forms">
       <forms loginUrl="Default.aspx" protection="Validation" timeout="300" />
      </authentication>
      <authorization>
       <allow users="*"/>
      </authorization>
      <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
      <roleManager enabled="true"/>
      <siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
               <providers>
            <add name="CustomizedMembershipProvider"
                            type="System.Web.Security.SqlMembershipProvider"
                            connectionStringName="LocalSqlServer"
                            enablePasswordRetrieval="false"
                            enablePasswordReset="true"
                            requiresQuestionAndAnswer="true"
                            applicationName="/main"
                            requiresUniqueEmail="true"
                            passwordFormat="Hashed"
                            maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7"
                            minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10"
                            passwordStrengthRegularExpression=""/>
            </providers>
            </siteMap>
     </system.web>
     <location path="Admin">
      <system.web>
       <authorization>
        <allow roles="Administrators"/>
        <deny users="*"/>
       </authorization>
      </system.web>
     </location>
    </configuration>

     

    Can you help?

    Thursday, May 17, 2007 11:58 AM
  • User-1705717250 posted

    It would seem that the membership and sitemap sections have merged in the web.config file.

     

    <membership>
    <providers>
    <clear/>
    <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, 
    System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 
    connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true"
     requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="true"
    passwordFormat="Hashed" 
    maxInvalidPasswordAttempts="5" 
    minRequiredPasswordLength="7"
     minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
    </providers>
    </membership>
    
    
    <siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
    <providers>
    <clear/>
    <add name="XmlSiteMapProvider" type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral,
     PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="web.sitemap" securityTrimmingEnabled="true"/>
    </providers>
    </siteMap>
     You may need to adjust some of the data above as per your application but should give you the framework.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, May 17, 2007 4:39 PM