runtime error

Discussion in 'ASP.NET Starter Kits' started by bahram, Aug 22, 2006.

  1. Hi
    Do I have to subscribe to MA SQL 2005 in order to run personal starter kit?
    Starter kits runs fine on my machine. But when I run it on discountasp.net, I get

    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".






    Code:
    <!-- 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.






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







    <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="White"/>


    <customErrors mode="RemoteOnly"/>


    <compilation debug="true"/>


    <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.3600.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>





    Can you tell me were is the problem. I'm set to asp.net 2. XP pro


    Thank you
     
  2. Firstly,yes you wil need to subscribe to MS SQL 2005 after which you will have to modify the connection string in your web config i.e

    Replace:

    <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'/>

    with
    <add name='Personal' connectionString='Data Source=<DB_Server>.discountasp.net;Integrated Security=false;Initial Catalog=<DB_Name>;User ID=<DB_User>;Password=<DB_password>' providerName='System.Data.SqlClient'/>

    <remove name='LocalSqlServer'/>

    <add name='LocalSqlServer' connectionString='Data Source=<DB_Server>;Integrated Security=false;Initial Catalog=<DB_Name>;User ID=<DB_User>;Password=<DB_password>' providerName='System.Data.SqlClient' />

    **Prior to any changes in the connection string you will have to attach the database files(mdf) using our online SQL tools.

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     

Share This Page