locked
works local but not after publlishing RRS feed

  • Question

  • User-900840368 posted

    Hello, being very new to .net and yet very eager to learn, I appologize in advance for my ignoranceand any information I have left out.  I was most interested in the starter kits as they really give you a change to dig in to a working program to see the nuances.  I hope with the help of this forum I can get this program working. 

    I have the following config:

    Separate Server 2003 server on local lan for testing running SQL 2000 and SQL 2005 Express
    WINXP on development machine runing Visual Studio 2005

    I downloaded Classifieds Starter kit; installed it; loaded it into VWD 2005; created an admin account; ran the program using Ctrl + F5; browsed the app; everything worked as expected.

    I built and published the project to a folder on the local machine and the copied the files over to the webserver.  I attacted the 2 databases in the App_Data folder to the SQL2005 Express. I ran the default.apx file and "poop" no go.  I am sure I am doing something wrong or havn't configured it properly, but being this my first real project to look at, I don't know where to start.  I have included the web.config file and the error received when trying to run the default.aspx page.  I look forward to any responses to help solve this mystery.[:(]

    Thanks a million.

     Wolf

     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>
    =================================================================================

    web.config file
    =====================================================================================
    <?xml version="1.0"?>
    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
     <location path="Admin">
      <system.web>
       <authorization>
        <allow roles="Administrators"/>
        <deny users="*"/>
       </authorization>
      </system.web>
     </location>
     <location path="PostAd.aspx">
      <system.web>
       <authorization>
        <deny users="?"/>
       </authorization>
      </system.web>
     </location>
     <location path="EditPhotos.aspx">
      <system.web>
       <authorization>
        <deny users="?"/>
       </authorization>
      </system.web>
     </location>
     <location path="MyAds.aspx">
      <system.web>
       <authorization>
        <deny users="?"/>
       </authorization>
      </system.web>
     </location>
     <location path="MyProfile.aspx">
      <system.web>
       <authorization>
        <deny users="?"/>
       </authorization>
      </system.web>
     </location>
     <system.web>
      <customErrors defaultRedirect="Error.aspx" mode="RemoteOnly"/>
      <pages styleSheetTheme="Red"/>
      <authentication mode="Forms"/>
      <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>
      <profile enabled="true">
       <properties>
        <add name="FirstName" type="System.String"/>
        <add name="LastName" type="System.String"/>
        <add name="MemberId" defaultValue="0" type="System.Int32"/>
        <group name="Core"/>
       </properties>
      </profile>
      <roleManager enabled="true"/>
      <siteMap defaultProvider="RoleEnabled_AspNetXmlSiteMapProvider" enabled="true">
       <providers>
        <clear/>
        <add name="RoleEnabled_AspNetXmlSiteMapProvider" type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="web.sitemap" securityTrimmingEnabled="true"/>
       </providers>
      </siteMap>
     </system.web>
     <connectionStrings>
      <add name="classifiedsConnection" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\classifiedsdb.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
     </connectionStrings>
     <system.net>
      <mailSettings>
       <smtp>
        <network host="yourSMTPhostname" port="25" defaultCredentials="true" userName="enterUserNameHereIfRequired" password="enterPasswordIfRequired"/>
        /&gt;
       </smtp>
      </mailSettings>
     </system.net>
    </configuration>

    ======================================================================================

    Thursday, December 6, 2007 5:17 PM

All replies

  • User810302116 posted

    Hi,

    can you please change your web.config as follows:

    change in this line <customErrors defaultRedirect="Error.aspx" mode="RemoteOnly"/>

    change RemoteOnly to On so that you can view the error message and display it here. The error message you posted is a generic error message which doesn't contain any info to help rectify the error.

    Regards

    Thursday, December 6, 2007 5:57 PM
  • User730446648 posted

    Actually, in the web.config file you want Off not On.

    Like this <customErrors mode="Off"/>

    Note that it is case sensitive "Off"

    The other issue, to start at least, is with your connection string.

    Try something like this, of course you will have to enter your usernames and passwords.

    The first connection is pointing to the ads database, and the second is pointing to your asp.net members database.

    <connectionStrings>

    <add name="classifiedsConnection" connectionString="Data Source=xxxxxxxxxxxx;

    Initial Catalog=xxxxxxxx;

    User ID=xxxxxxx;

    Password='xxxxxxx';
    " />

    <remove name="LocalSqlServer"/>

    <add name="LocalSqlServer" connectionString="Data Source=xxxxxxxxxxxxxxx;

    Initial Catalog=xxxxxxxxxx

    User ID=xxxxxxxxxxx;

    Password='xxxxxxxxxxx';
    " />

    </connectionStrings>

    If that doesn't work post your error, once you have the mode="Off" it will give more information.

    Also, whoever your hosting server is there should be somewhere on their site,

    or in the control panel that will give you an idea of how they want you to connect to the databases.

     

    Good Luck

    Daniel Meis

     

    Thursday, December 6, 2007 10:11 PM
  • User1128022426 posted

    As Daniel mentioned, DB connection strings is the most common cause of errors when uploading to a host.

    It'll help if you disable custom errors. This will allow you to view a stack trace of the cause of the exception.

    Friday, December 7, 2007 8:56 AM
  • User1952034072 posted

    Thats exactly my problem I dont know where to begin 6 long days and nights i think i figured how to put the databases on the server using database publishing wizard and database manager but im only allowed one database so i cant get the 2 of them on If thats right not sure if i need to buy another?

    Also I havent been able to get any starterkits working on the host, any help from anyone would be great plzzzzzzzzz

    Friday, December 7, 2007 11:45 AM
  • User-900840368 posted

    Thanks for the input Daniel,

     I changed the mode to "Off" - However, I still receive the same error message.  Does this change need to be made within VWD 2005 and then rebuild?

    Also - I have changed the conection strings as you indicated - however, I am not sure of two items.

    1 - Would the datasource look somthing like this?  I am runing this on a local server to get working first then loading to host. 
    <add name="LocalSqlServer" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Inetpub\wwwroot\classifieds\App_Data\classifiedsdb.mdf;

    2. - I am not sure what data should be entered for the following:
    Initial Catalog=xxxxxxxxxx

    Thanks for the replies...

    Wolf

    Friday, December 7, 2007 12:39 PM
  • User1952034072 posted
    Can anyone please help me with this?

    Server Error in '/' Application.

    An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

    Source Error:

    The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

    1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

      <%@ Page Language="C#" Debug="true" %>

    or:

    2) Add the following section to the configuration file of your application:

    <configuration>
       <system.web>
           <compilation debug="true"/>
       </system.web>
    </configuration>

    Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

    Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

    Stack Trace:

    [SqlException (0x80131904): An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]
       System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +739123
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
       System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +685966
       System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +109
       System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +383
       System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181
       System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
       System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +130
       System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
       System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
       System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
       System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
       System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
       System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
       System.Data.SqlClient.SqlConnection.Open() +111
       System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +84
       System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +197
       System.Web.Security.SqlRoleProvider.RoleExists(String roleName) +482
       System.Web.Security.Roles.RoleExists(String roleName) +242
       ASP.global_asax.Application_Start(Object sender, EventArgs e) +14

    Friday, December 7, 2007 1:10 PM
  • User1128022426 posted

    You do not need to rebuild. Just make the change to the webconfig file and upload it.

    the xxxxxxxxxx are the database name.

    The DOT in DataSource =.\SQLExpress means your localhost running a sql express instance named "SQLExpress" so you need to replace that DOT with the database server name that your host provided. You will also need to enter the user/pass to access that database. If you need help creating the connection String check http://www.connectionstrings.com/?carrier=sqlserver2005 

    Your's should look like

    <add name="LocalSqlServer" connectionString="Data Source=DB_SERVERNAME;Initial Catalog=DATABASE_NAME;User Id=USER;Password=PASS;" providerName="System.Data.SqlClient"/>

    To answer the previous post, YOU CAN merge both databases into ONE.

    Use C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe to prepare the classifieds database to support membership then point the membership connection string the to classifieds db

    Like that

    <connectionStrings>
    <clear/>
    <add name="classifiedsConnection" connectionString="Data Source=server ;Initial Catalog=db;User Id=user;Password=pass;" providerName="System.Data.SqlClient"/>
    <add name="LocalSqlServer" connectionString="Data Source=server ;Initial Catalog=db;User Id=user;Password=pass;" providerName="System.Data.SqlClient"/>
    </connectionStrings>

    Good luck

    Friday, December 7, 2007 1:17 PM
  • User1952034072 posted

    thanks ashmetry

    This is the error im getting i find the coding quite blinding could you help me if i give you my server details etc to adjust my web.config

    Stack Trace:

    [SqlException (0x80131904): An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]
       System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +739123
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
       System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +685966
       System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +109
       System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +383
       System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181
       System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
       System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +130
       System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
       System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
       System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
       System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
       System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
       System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
       System.Data.SqlClient.SqlConnection.Open() +111
       System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
       System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +162
       System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +107
       AdsDataComponentTableAdapters.AdsDataAdapter.GetAdsByRandomOrder(Int32 NumRecords, Int32 AdStatus, Int32 AdLevel) +349
       AspNet.StarterKits.Classifieds.BusinessLogicLayer.AdsDB.GetFeaturedAdsSelection(Int32 maxNumAds) +72
       AspNet.StarterKits.Classifieds.Web.FeaturedAdCache.FetchFeaturedAd() +14
       AspNet.StarterKits.Classifieds.Web.FeaturedAdCache.GetFeaturedAd(HttpContext context) +107
       AspNet.StarterKits.Classifieds.Web.FeaturedAdCache.GetFeaturedAd() +12
    
    [TargetInvocationException: Exception has been thrown by the target of an invocation.]
       System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0
       System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +72
       System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +296
       System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29
       System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +482
       System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +2040
       System.Web.UI.WebControls.Repeater.GetData() +50
       System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +232
       System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +53
       System.Web.UI.WebControls.Repeater.DataBind() +72
       System.Web.UI.WebControls.Repeater.EnsureDataBound() +55
       System.Web.UI.WebControls.Repeater.OnPreRender(EventArgs e) +12
       System.Web.UI.Control.PreRenderRecursiveInternal() +77
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360

    Friday, December 7, 2007 1:28 PM
  • User1128022426 posted

    first line  An error has occurred while establishing a connection to the server. 

    Means You have bad configuration to your database. You will need to get that from your hosting provider, ask for the server name, database name, your user/pass

    where are you hosting?

    -Ash

    Friday, December 7, 2007 2:05 PM
  • User1952034072 posted

    This is my web.config could you give me some pointers as to what goes where i want to see this site working so much :)

    <?xml version="1.0"?>

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

    <location path="Admin">

    <system.web>

    <authorization>

    <allow roles="Administrators"/>

    <deny users="*"/>

    </authorization>

    </system.web>

    </location>

    <location path="PostAd.aspx">

    <system.web>

    <authorization>

    <deny users="?"/>

    </authorization>

    </system.web>

    </location>

    <location path="EditPhotos.aspx">

    <system.web>

    <authorization>

    <deny users="?"/>

    </authorization>

    </system.web>

    </location>

    <location path="MyAds.aspx">

    <system.web>

    <authorization>

    <deny users="?"/>

    </authorization>

    </system.web>

    </location>

    <location path="MyProfile.aspx">

    <system.web>

    <authorization>

    <deny users="?"/>

    </authorization>

    </system.web>

    </location>

    <system.web>

    <customErrors defaultRedirect="Error.aspx" mode="Off"/>

    <pages styleSheetTheme="Red"/>

    <authentication mode="Forms"/>

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

    <profile enabled="true">

    <properties>

    <add name="FirstName" type="System.String"/>

    <add name="LastName" type="System.String"/>

    <add name="MemberId" defaultValue="0" type="System.Int32"/>

    <group name="Core"/>

    </properties>

    </profile>

    <roleManager enabled="true"/>

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

    <providers>

    <clear/>

    <add name="RoleEnabled_AspNetXmlSiteMapProvider" type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="web.sitemap" securityTrimmingEnabled="true"/>

    </providers>

    </siteMap>

    </system.web>

    <connectionStrings>

    <add name="classifiedsConnection" connectionString="Data Source=mssql.pipeten.co.uk\SQLEXPRESS;AttachDbFilename=|DataDirectory|\classifiedsdb.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>

    </connectionStrings>

    <system.net>

    <mailSettings>

    <smtp>

    <network host="yourSMTPhostname" port="25" defaultCredentials="true" userName="enterUserNameHereIfRequired" password="enterPasswordIfRequired"/>

    </smtp>

    </mailSettings> </system.net>

    </configuration>

    Friday, December 7, 2007 2:06 PM
  • User1128022426 posted

    you'll need to create a sql2005 db from your hosting control panel, enter that db name in the initial catalog as well as the user/pass

     

    <add name="classifiedsConnection" connectionString="Data Source=mssql.pipeten.co.uk;Initial Catalog=db_name;User Id=user;Password=pass;" providerName="System.Data.SqlClient"/>

    Friday, December 7, 2007 2:18 PM
  • User1952034072 posted

    Thanks mate

    Yes I have all the details of user name etc i think I have a reseller package with pipeten.

    It was just what i wrote and where could you guide me through it please

    Friday, December 7, 2007 2:31 PM
  • User1952034072 posted

    I have put the aspnet and classifieds.mdf on the server with database publishing wizard

    Friday, December 7, 2007 2:33 PM
  • User1128022426 posted

    Well what does the wizard tell you one where the mdf are stored? You need to find the path to the mdf files then use that...Im assuming you're not using sqlserver 2005 then?? in that case the connection string is different..check http://www.connectionstrings.com/?carrier=sqlserver2005 

    I would contact pipe10 to get the details oh the sqlserver connection. i pretty sure thats the main problem at the moment

    Friday, December 7, 2007 2:42 PM
  • User1952034072 posted

    I have the target database etc its just where do i put it in the files ?

    If i can get this to work i know i can get the rest to work

    thanks for helping

    Friday, December 7, 2007 2:55 PM
  • User1128022426 posted

    Im not sure what you mean. The mdf file IS your database.. they should sit in your App_Data folder

    Friday, December 7, 2007 3:37 PM
  • User1952034072 posted

    I mean what files do i change to direct them to it is it my web config?? this is my web config file i actually got to see the site live on the web but i must have done something its not showing again hmmmmmmmm thanks once again !

    <?xml version="1.0"?>

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

    <location path="Admin">

    <system.web>

    <authorization>

    <allow roles="Administrators"/>

    <deny users="*"/>

    </authorization>

    </system.web>

    </location>

    <location path="PostAd.aspx">

    <system.web>

    <authorization>

    <deny users="?"/>

    </authorization>

    </system.web>

    </location>

    <location path="EditPhotos.aspx">

    <system.web>

    <authorization>

    <deny users="?"/>

    </authorization>

    </system.web>

    </location>

    <location path="MyAds.aspx">

    <system.web>

    <authorization>

    <deny users="?"/>

    </authorization>

    </system.web>

    </location>

    <location path="MyProfile.aspx">

    <system.web>

    <authorization>

    <deny users="?"/>

    </authorization>

    </system.web>

    </location>

    <system.web>

    <customErrors defaultRedirect="Error.aspx" mode="Off"/>

    <pages styleSheetTheme="Red"/>

    <authentication mode="Forms"/>

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

    <profile enabled="true">

    <properties>

    <add name="FirstName" type="System.String"/>

    <add name="LastName" type="System.String"/>

    <add name="MemberId" defaultValue="0" type="System.Int32"/>

    <group name="Core"/>

    </properties>

    </profile>

    <roleManager enabled="true"/>

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

    <providers>

    <clear/>

    <add name="RoleEnabled_AspNetXmlSiteMapProvider" type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="web.sitemap" securityTrimmingEnabled="true"/>

    </providers>

    </siteMap>

    </system.web>

    <connectionStrings>

    <add name="classifiedsConnection" connectionString="Data Source=mssql.pipeten.co.uk\MSSQL\Databases;Initial Catalog=NeroLyl_one;User Id=xxxxxxxxxx;Password=xxxxxxx" providerName="System.Data.SqlClient"/>

    </connectionStrings>

    <system.net>

    <mailSettings>

    <smtp>

    <network host="mail.borderclassifieds.co.uk" port="25" defaultCredentials="true" userName="enterUserNameHereIfRequired" password="enterPasswordIfRequired"/>

    </smtp>

    </mailSettings>

    </system.net>

    </configuration>

    Friday, December 7, 2007 4:07 PM
  • User1128022426 posted

    try changing Source=mssql.pipeten.co.uk\MSSQL\Databases;Initial Catalog=NeroLyl_one;User Id=xxxxxxxxxx;Password=xxxxxxx"

    to Source=mssql.pipeten.co.uk;Initial Catalog=NeroLyl_one;User Id=xxxxxxxxxx;Password=xxxxxxx"

    or tp Source=mssql.pipeten.co.uk\MSSQL;Initial Catalog=NeroLyl_one;User Id=xxxxxxxxxx;Password=xxxxxxx

    Friday, December 7, 2007 4:21 PM
  • User1952034072 posted

    still not working for me ? hmm sorry

    [SqlException (0x80131904): An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]
       System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +739123
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
       System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +685966
       System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +109
       System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +383
       System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181
       System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
       System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359
       System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
       System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
       System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
       System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
       System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
       System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
       System.Data.SqlClient.SqlConnection.Open() +111
       System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
       System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +162
       System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +107
       AdsDataComponentTableAdapters.AdsDataAdapter.GetAdsByRandomOrder(Int32 NumRecords, Int32 AdStatus, Int32 AdLevel) +349
       AspNet.StarterKits.Classifieds.BusinessLogicLayer.AdsDB.GetFeaturedAdsSelection(Int32 maxNumAds) +72
       AspNet.StarterKits.Classifieds.Web.FeaturedAdCache.FetchFeaturedAd() +14
       AspNet.StarterKits.Classifieds.Web.FeaturedAdCache.GetFeaturedAd(HttpContext context) +107
       AspNet.StarterKits.Classifieds.Web.FeaturedAdCache.GetFeaturedAd() +12

    [TargetInvocationException: Exception has been thrown by the target of an invocation.]
       System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0
       System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +72
       System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +296
       System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29
       System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +482
       System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +2040
       System.Web.UI.WebControls.Repeater.GetData() +50
       System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +232
       System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +53
       System.Web.UI.WebControls.Repeater.DataBind() +72
       System.Web.UI.WebControls.Repeater.EnsureDataBound() +55
       System.Web.UI.WebControls.Repeater.OnPreRender(EventArgs e) +12
       System.Web.UI.Control.PreRenderRecursiveInternal() +77
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360

    Friday, December 7, 2007 4:49 PM
  • User730446648 posted

    Hey wolf,  

    As mentioned by ash you should also add this to your web.config to show more info on errors.

    <compilation debug="true"/>

    Check before adding though it may already be in there,

    and once your done with the issues you will also need to change it back, along with the custom remote errors mode="Off".

    Also - I have changed the conection strings as you indicated - however, I am not sure of two items.

    1 - Would the datasource look somthing like this?  I am runing this on a local server to get working first then loading to host. 
    <add name="LocalSqlServer" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Inetpub\wwwroot\classifieds\App_Data\classifiedsdb.mdf;

    2. - I am not sure what data should be entered for the following:
    Initial Catalog=xxxxxxxxxx

     

    I have two different web.configs, they are identical, except for the connection strings, one is for local and the other is for online.

    As far as the initial catalog, you could try a user name to see if that works,

    but your first step really is checking with your host,

    as to how they want you to connect to the databases.

    Who is your hosting server???????

    Maybe someone knows how to connect to your host.

     

     

     

    Friday, December 7, 2007 10:07 PM
  • User1952034072 posted

    Hi Ash i got this info off my company - Driver={SQL Native Client};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

    How and where would i put this in the web.config once again thanx alot!!!!!!!!

    Saturday, December 8, 2007 2:53 PM
  • User1128022426 posted

    <add name="LocalSqlServer" connectionString="Driver={SQL Native Client};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;"

     .....

    Saturday, December 8, 2007 3:33 PM
  • User1952034072 posted

    Hey Ash

    Im getting closer it worked but i got this error trying to login could you tell me whats wrong with it now?

    [FileNotFoundException: Could not find file 'H:\hshome\nerolyle\borderclassifieds.co.uk\App_Data\site-config.xml'.]
       System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +1971213
       System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +998
       System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access) +57
       AspNet.StarterKits.Classifieds.BusinessLogicLayer.SiteSettings.LoadFromXml() +134
    
    [Exception: The Site Configuration could not be loaded.]
       AspNet.StarterKits.Classifieds.BusinessLogicLayer.SiteSettings.LoadFromXml() +234
       AspNet.StarterKits.Classifieds.BusinessLogicLayer.SiteSettings.LoadFromConfiguration() +7
       AspNet.StarterKits.Classifieds.BusinessLogicLayer.SiteSettings.GetSharedSettings() +14
       Login_aspx.PasswordRecovery_Init(Object sender, EventArgs e) +15
       System.Web.UI.Control.OnInit(EventArgs e) +2117356
       System.Web.UI.WebControls.PasswordRecovery.OnInit(EventArgs e) +11
       System.Web.UI.Control.InitRecursive(Control namingContainer) +321
       System.Web.UI.Control.InitRecursive(Control namingContainer) +198
       System.Web.UI.Control.InitRecursive(Control namingContainer) +198
       System.Web.UI.Control.InitRecursive(Control namingContainer) +198
       System.Web.UI.Control.InitRecursive(Control namingContainer) +198
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +692
    

    Saturday, December 8, 2007 3:38 PM
  • User1128022426 posted

    There should a file called site-config.xml inside App_Data folder. If its there then check your permissions to the folder. Make sure you can read/write to that directory/check from your control panel or contact the hosting support.

     

    Saturday, December 8, 2007 3:50 PM
  • User1952034072 posted

    Im a bit lost with that Ash i have seen permission settings for stuff from sql server management not sure though i feel lost with it again but its showing

     

    Saturday, December 8, 2007 4:08 PM
  • User1952034072 posted

    I have full permissions for that folder!

    Saturday, December 8, 2007 4:24 PM
  • User1952034072 posted

    Hi now its showing this ??????????????? I havent changed anything

    [ArgumentException: Keyword not supported: 'driver'.]
       System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey) +417
       System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules) +99
       System.Data.SqlClient.SqlConnectionString..ctor(String connectionString) +52
       System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous) +25
       System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) +141
       System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value) +38
       System.Data.SqlClient.SqlConnection.set_ConnectionString(String value) +4
       AdsDataComponentTableAdapters.AdsDataAdapter.InitConnection() +72
       AdsDataComponentTableAdapters.AdsDataAdapter.InitAdapter() +805
       AdsDataComponentTableAdapters.AdsDataAdapter.GetAdsByRandomOrder(Int32 NumRecords, Int32 AdStatus, Int32 AdLevel) +26
       AspNet.StarterKits.Classifieds.BusinessLogicLayer.AdsDB.GetFeaturedAdsSelection(Int32 maxNumAds) +72
       AspNet.StarterKits.Classifieds.Web.FeaturedAdCache.FetchFeaturedAd() +14
       AspNet.StarterKits.Classifieds.Web.FeaturedAdCache.GetFeaturedAd(HttpContext context) +109
       AspNet.StarterKits.Classifieds.Web.FeaturedAdCache.GetFeaturedAd() +12
    
    [TargetInvocationException: Exception has been thrown by the target of an invocation.]
       System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0
       System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +72
       System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +318
       System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +23
       System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +484
       System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1874
       System.Web.UI.WebControls.Repeater.GetData() +50
       System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +214
       System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +54
       System.Web.UI.WebControls.Repeater.DataBind() +62
       System.Web.UI.WebControls.Repeater.EnsureDataBound() +55
       System.Web.UI.WebControls.Repeater.OnPreRender(EventArgs e) +13
       System.Web.UI.Control.PreRenderRecursiveInternal() +88
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5730
    Saturday, December 8, 2007 4:35 PM
  • User1128022426 posted

    "ArgumentException: Keyword not supported: 'driver'."

    That seems to me that its not liking the connection string you entered...(notice you entered driver)...

    Ask your hosting how exactly is this connection setup...??? You need to understand if there are options on ways the hosting company lets you connect to the db.

    Saturday, December 8, 2007 9:10 PM
  • User730446648 posted

    You know nero, that this is not your post, and yet you have pushed your way in.

    Wolf can't even get a work in.

    Which makes you quite an ass.

    I'm really surprised Ash is being as nice as he is, which I really have got to hand it to you Ash.

    Your much nicer than I am, I would have dropped him on the last page.

    So all I have to say is Nero, your an ass, and I hope your listening to Ash 'cause I doubt many others will put up with you.

    Good Luck, your going to need it.

     

    Saturday, December 8, 2007 10:19 PM
  • User1128022426 posted

    :) LOL thats awesome, this has been going on in quite a loop.

    Nero, really I think your hosting support folks neeed to help you on getting that runing. Its really not an application problem, its a config/user problem that you need to straighten it up with the hosting company...

    Saturday, December 8, 2007 10:34 PM
  • User1952034072 posted

    Thanks Ash for your help.

    Darknight some people are new here I thought this was a forum where people spoke about problems I done a search on my problem and this came up so I wasnt aware of personal forums or posts, in saying that i started to wonder why i couldnt mark as answer but hey I sure know now. So apologies  to Wolf. Hope you got your problem sorted out !!

    Once again Ash thanks alot I will leave this forum before im linched lol  All the best!

    Sunday, December 9, 2007 7:35 AM
  • User-900840368 posted

    Whew!  lot going on here in this thread.  Thanks darkkight for your post - little tough on the guy, but hey school of hard knocks right?!

    Anyway, thanks and here is the response to your post reply.

    I guess I was not too clear on the host thing.  I have a server in house (called WEBSERVER) that I am using for testing (i want to get it working before I publish online)  So...  having said that.  My server is a 2003 with SQL 2005 Express.  It is on my local lan.  I have a separate laptop on the same lan for the development, running Visual Studio 2005.  I built the project and moved it over to the WEBSERVER test machine.  I then run the program from the laptop (http://webserver/classifieds/default.aspx).

    I have changed the errors code to the following
    <customErrors defaultRedirect="Error.aspx" mode="Off"/>

    I have added the following
    <compilation debug="true"/>

    My connection statement is as follows
    <connectionStrings>
     <add name="LocalSqlServer" connectionString="Data Source=WEBSERVER;Initial Catalog=C:\Inetpub\wwwroot\classifieds\App_Data\classifiedsdb.mdf;User Id=wolf;Password=password;" providerName="System.Data.SqlClient"/>
       </connectionStrings>
       
    I run http://webserver/classifieds/default.aspx and I still get the following error.  ARRRGH  - :-)
    -------------------------------------
    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>
    ===============================================================================

    Thanks for getting us back on track darkknight.
    and no problem jumping in nerolyle , I am excited too that someone is helping with this, seeing as how we are newbies.

    Wolf

    Sunday, December 9, 2007 10:45 AM
  • User1952034072 posted

    Hey thanks Wolf your a gent

    I ve posted my own now says something about my skills of this when ive just worked out how to use the forum lol Your welcome on mine i think we have similar issues ie lack of knowledge :)

    Sunday, December 9, 2007 12:02 PM
  • User-900840368 posted

    I uploaded the files to a dedicated server that I have hosted with Godaddy.  I now get the following 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: Unrecognized attribute 'xmlns'.

    Source Error:

    Line 1:  <?xml version="1.0"?>
    Line 2:  <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    Line 3:  	<location path="Admin">
    Line 4:  		<system.web>

    Any help on this??

    Thanks,

    Wolf

     

    Sunday, December 9, 2007 5:55 PM
  • User1128022426 posted

    I bet you have a bad xml in your config file...Open it in IE and see if it draws correctly...

    Sunday, December 9, 2007 11:40 PM
  • User-900840368 posted

    I opend up in IE and this is what I get.

     

      <?xml version="1.0" ?>
    - <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    - <location path="Admin">
    - <system.web>
    - <authorization>
      <allow roles="Administrators" />
      <deny users="*" />
      </authorization>
      </system.web>
      </location>
    - <location path="PostAd.aspx">
    - <system.web>
    - <authorization>
      <deny users="?" />
      </authorization>
      </system.web>
      </location>
    - <location path="EditPhotos.aspx">
    - <system.web>
    - <authorization>
      <deny users="?" />
      </authorization>
      </system.web>
      </location>
    - <location path="MyAds.aspx">
    - <system.web>
    - <authorization>
      <deny users="?" />
      </authorization>
      </system.web>
      </location>
    - <location path="MyProfile.aspx">
    - <system.web>
    - <authorization>
      <deny users="?" />
      </authorization>
      </system.web>
      </location>
    - <system.web>
      <customErrors defaultRedirect="Error.aspx" mode="Off" />
      <pages styleSheetTheme="Red" />
      <authentication mode="Forms" />
    - <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>
    - <profile enabled="true">
    - <properties>
      <add name="FirstName" type="System.String" />
      <add name="LastName" type="System.String" />
      <add name="MemberId" defaultValue="0" type="System.Int32" />
      <group name="Core" />
      </properties>
      </profile>
      <roleManager enabled="true" />
      <compilation debug="true" />
    - <siteMap defaultProvider="RoleEnabled_AspNetXmlSiteMapProvider" enabled="true">
    - <providers>
      <clear />
      <add name="RoleEnabled_AspNetXmlSiteMapProvider" type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="web.sitemap" securityTrimmingEnabled="true" />
      </providers>
      </siteMap>
      </system.web>
    - <connectionStrings>
      <add name="LocalSqlServer" connectionString="Data Source=DED-UTA-0914.secureserver.net;Initial Catalog=C:\Inetpub\vhosts\mywaupaca.com\httpdocs\classifieds\App_Data\classifiedsdb.mdf;User Id=sa;Password=xxxxxxxx;" providerName="System.Data.SqlClient" />
      </connectionStrings>
    - <system.net>
    - <mailSettings>
    - <smtp>
      <network host="yourSMTPhostname" port="25" defaultCredentials="true" userName="enterUserNameHereIfRequired" password="enterPasswordIfRequired" />
      />
      </smtp>
      </mailSettings>
      </system.net>
      </configuration>
    Monday, December 10, 2007 10:34 AM
  • User730446648 posted

    Hey wolf,

    I've got work to do all day here in front of the computer, so I'll check back often, but what your seeing the the runtime.

    Log into you control panel, on godaddy, and choose directory, and change the runtime to 2.0.

    It will probablly take upto 15min to finalize the switch.

    One step at a time.

     

    Just to let you guys know, I'm not usally that mean, the way nero just took over pissed me off,

    I hate pushy people, and I'm sure nero didn't mean to do that.

    So nero if your out there, sorry I was so hard on you,

    and asking questions is great, just write your own post so we stay on track with the original concern.

    And it's fun to be an ass sometimes, and yes I can be an ass.

    I hope there's no hard feelings.

     

    Monday, December 10, 2007 10:38 AM
  • User-900840368 posted

    Log into you control panel, on godaddy, and choose directory, and change the runtime to 2.0.

    I checked it out and it shows I am running 2.0 - I am on a dedicated server that is hosted by them.

    Monday, December 10, 2007 11:06 AM
  • User1128022426 posted

    If you are running on a subdomain, the subdomain might not be configured to have .NET 20 even though the main domain has it setup..You might want to check that.

    Also contact godaddy helpdesk, it might be a glitch and even though it says 2.0 it might be running 1.1

    Monday, December 10, 2007 11:22 AM
  • User730446648 posted

    You can get that error if you are running two different frameworks in the same application pool, or with subdomains like ash stated.

    If you have access to change the asp.net runtime, change to 1.1 wait 10 or 15 min and switch it back to 2.0

    If that doesn't work you will need to call godaddy.

    The web.config looks okay for the most part,

    The only thing I see that you'll have a problem with is the connection string.

    Are you combining the two databases??

    And I am on a shared server account and I cannot use the App_Data file to hold the databases.

    C:\Inetpub\vhosts\mywaupaca.com\httpdocs\classifieds\App_Data\classifiedsdb.mdf

    But we'll work on that in a minute.

     

    Monday, December 10, 2007 11:32 AM
  • User-900840368 posted

    absolutly right on Ash - I dug deep in IIS and found that I did not have 2.0 selected for that site.

    Error gone, but now have 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: 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 40: 		<customErrors defaultRedirect="Error.aspx" mode="Off"/>
    Line 41: 		<pages styleSheetTheme="Red"/>
    Line 42: 		<authentication mode="Forms"/>
    Line 43: 		<membership>
    Line 44: 			<providers>

    Source File: C:\Inetpub\vhosts\mywaupaca.com\httpdocs\classifieds\web.config    Line: 42

    Monday, December 10, 2007 12:01 PM
  • User-900840368 posted

    I have changed the runtime to 2.0

    I am not combinding data bases, so does that mean that I need another connection string for the second db?

    Also - remember, i am running on a dedicated server that I have full control over.

    Wolf

     

    Monday, December 10, 2007 12:10 PM
  • User730446648 posted

    Yes, you do need to point to both of them.

    Unless dedicated servers are completly different you are going to need to go into the control panel,

    click databases, choose MSSQL and create both the databases.

    I don't think godaddy supports databases in the mdf format, most don't.

     

    Make note of the database user names and passwords. and use a connection string like this.

    After you have your databases, go into the control panel click on databases, and then  click on MSSQL.

    then click on the edit/view icon, and you will see several icons at the top, one says configuration.

    click it and it will give you the exact format to use, although mine below is probabally close.

    The first connection is pointing to the ads database, and the second is pointing to your asp.net members database.

    <connectionStrings><add name="classifiedsConnection" connectionString="Data Source=xxxxxxxxxxxx;

    Initial Catalog=xxxxxxxx;

    User ID=xxxxxxx;

    Password='xxxxxxx';
    " />

    <remove name="LocalSqlServer"/>

    <add name="LocalSqlServer" connectionString="Data Source=xxxxxxxxxxxxxxx;

    Initial Catalog=xxxxxxxxxx

    User ID=xxxxxxxxxxx;

    Password='xxxxxxxxxxx';
    " />

    </connectionStrings>

    By the way, Godaddy automatically creates everything you need for the members database,

    the second one though, you will need to delete all table, views, and stored procedures.

    If you need help loading the database let me know.

    The only question I would have to help you load is, did you make any changes to the database at all?

    Other than creating a username.

    Good luck

     

     

    Monday, December 10, 2007 12:32 PM
  • User-900840368 posted

    I have changed my web.config which not states

    <?xml version="1.0"?>
    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
     <location path="Admin">
      <system.web>
       <authorization>
        <allow roles="Administrators"/>
        <deny users="*"/>
       </authorization>
      </system.web>
     </location>
     <location path="PostAd.aspx">
      <system.web>
       <authorization>
        <deny users="?"/>
       </authorization>
      </system.web>
     </location>
     <location path="EditPhotos.aspx">
      <system.web>
       <authorization>
        <deny users="?"/>
       </authorization>
      </system.web>
     </location>
     <location path="MyAds.aspx">
      <system.web>
       <authorization>
        <deny users="?"/>
       </authorization>
      </system.web>
     </location>
     <location path="MyProfile.aspx">
      <system.web>
       <authorization>
        <deny users="?"/>
       </authorization>
      </system.web>
     </location>
     <system.web>
      <customErrors defaultRedirect="Error.aspx" mode="Off"/>
      <pages styleSheetTheme="Red"/>
      <authentication mode="Forms"/>
      <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>
      <profile enabled="true">
       <properties>
        <add name="FirstName" type="System.String"/>
        <add name="LastName" type="System.String"/>
        <add name="MemberId" defaultValue="0" type="System.Int32"/>
        <group name="Core"/>
       </properties>
      </profile>
      <roleManager enabled="true"/>
      <compilation debug="true"/>
      <siteMap defaultProvider="RoleEnabled_AspNetXmlSiteMapProvider" enabled="true">
       <providers>
        <clear/>
        <add name="RoleEnabled_AspNetXmlSiteMapProvider" type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="web.sitemap" securityTrimmingEnabled="true"/>
       </providers>
      </siteMap>
     </system.web>
     
     <connectionStrings><add name="classifiedsConnection" connectionString="Data Source=DED-UTA-0914\SQLEXPRESS;
    Initial Catalog=C:\Inetpub\vhosts\mywaupaca.com\httpdocs\classifieds\App_Data\classifiedsdb.mdf;
    User ID=uptempoair;
    Password='xxxxxxxxxxxxx';" />
    <remove name="LocalSqlServer"/>
    <add name="LocalSqlServer" connectionString="Data Source=DED-UTA-0914\SQLEXPRESS;
    Initial Catalog=C:\Inetpub\vhosts\mywaupaca.com\httpdocs\classifieds\App_Data\ASPNETDB.MDF
    User ID=uptempoair;
    Password='xxxxxxxxxxx';" />
    </connectionStrings>


     <system.net>
      <mailSettings>
       <smtp>
        <network host="yourSMTPhostname" port="25" defaultCredentials="true" userName="enterUserNameHereIfRequired" password="enterPasswordIfRequired"/>
        /&gt;
       </smtp>
      </mailSettings>
     </system.net>
    </configuration>

     

     

     When I run the default.aspx I get

    Server Error in '/' Application.

    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 40: 		<customErrors defaultRedirect="Error.aspx" mode="Off"/>
    Line 41: 		<pages styleSheetTheme="Red"/>
    Line 42: 		<authentication mode="Forms"/>
    Line 43: 		<membership>
    Line 44: 			<providers>

    Tuesday, December 11, 2007 12:59 PM
  • User730446648 posted

    On your last post you have two connection strings, I think you forgot to delete one of them, and one of them shows your username and password.

    click edit on that post and delete them immediatly, anyone can see this, and google indexes frequently here.

    So does godaddy allow you to point to .mdf files when on a dedicated server????

    C:\Inetpub\vhosts\mywaupaca.com\httpdocs\classifieds\App_Data\ASPNETDB.MDF

     

    Tuesday, December 11, 2007 1:13 PM
  • User-900840368 posted

    thanks - that was an old password, but I did forget to delete the string.  I updated it as is now on the server.  I have pointed directly to SQL .mdf before for some forums I am running on the same server.

    Do I need to attach the databases in SQL 2005? or does the program do that?

    wolf

     

    Tuesday, December 11, 2007 1:33 PM
  • User730446648 posted

    I'm going christmas shopping so this is my last post for a while, but I could not just upload the mdf files.

    I had to create the database on godaddy, and then used sql scripts to make the table, views, and stored procedures.

    So unless, they will let you do that on a dedicated server, which I dought it, your mdf files online are useless.

    See my post on the last page on how to create the databases.

    Good Luck, and I'll talk to you soon.

    Daniel

    Tuesday, December 11, 2007 1:39 PM
  • User1128022426 posted

    Wolf, just a tip. since you seem to have more control over the server than any of us (it being a dedicated server and all) You'll probably experience errors that we are not used to..

    Googling the error string usually gives you a pretty good idea on the cause of the error especially if your return results in a Microsoft KB link.

    Always try that before getting lazy and posting....Copying and pasting in google the machine.config error you had earlier resulted in alot of useful hints you should check it out.

    Also tackle one issue at a time...If ASP.NET is not configured correctly it doesnt matter if the connection string is missing, you wont get that far.

    Daniel, I like Ferraris....Just in case you are wondering what to get me.. ;)

    Tuesday, December 11, 2007 2:08 PM
  • User-900840368 posted
    Sorry Ash, I thought this was a forum where people could come to get on the right track.  I did not know that you had to already have tried everything in the world before coming here.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>

    I just purchased Visual 2005 and was excited to see the starter kits, hoping it would kick start me into learning .net and SQL 2005 for that matter.  I saw the fourms in the help section of the software.  Who would have thought that I needed to try to find the help elsewhere before posting on your forum.

    I explained that I was new to this at the very beginning of the post - maybe you should have told me fresh off the bat  that I should leave.

    I appreciate the help I’ve gotten from this forum, but I feel that I need to go elsewhere for assistance.

    Thanks anyway.

     

    Tuesday, December 11, 2007 2:43 PM
  • User1128022426 posted

    Wolf. You're missing the point.. Im not saying don't ask, you are right about the forum being here to help. I'm just saying that doing nothing at all before asking is lazy.

    Nothing wrong in being a newbie, we were all newbies at somepoint and still are in alot of areas. I'm just giving my suggestion, you will learn more when you try, fail then ask..

    Google an error is the least you can do.. If you do NOTHING, you're just wasting time posting. Racing the learning curve wont get you very far fixing issues that you will encounter later on .

    :) Good luck..

    Tuesday, December 11, 2007 2:54 PM
  • User730446648 posted

    Hey wolf, don't get discouraged.

    The asp.net forums are fantastic for getting help when you get stuck.

    I think what ash was saying is you learn a lot more by trying, rather than just waiting for one of us to help.

    Odds are that any error you get, someone has gone through it before.

    And I don't know how much experience you have, but there is nothing more gratifying than conquering a coding problem.

    But everyone on this site is here, because they want to help.

    I am in no way affiliated with asp.net, I just want to share my knowledge.

    Trust me, I know how frustrating it can be to get the starterkit online.

    So keep posting when you can't figure something out.

    I want you to get it, and I love to see what people have done with the classifieds starter kit.

    Talk to you soon.

    Daniel Mes

     

    Tuesday, December 11, 2007 7:31 PM
  • User-1431398638 posted

    hi,

    this is real web.config running on www.gurgaonservices.com.

    just put everything in a single database and publish it after creating administrator from wensite administration.

    <?xml version="1.0"?>

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

    <system.web>

    <customErrors mode="Off"/>

    <compilation debug="true"/>

    </system.web>

    <location path="Admin">

    <system.web>

    <authorization>

    <allow roles="Administrators"/>

    <deny users="*"/>

    </authorization>

    </system.web>

    </location>

    <location path="PostAd.aspx">

    <system.web>

    <authorization>

    <deny users="?"/>

    </authorization>

    </system.web>

    </location>

    <location path="EditPhotos.aspx">

    <system.web>

    <authorization>

    <deny users="?"/>

    </authorization>

    </system.web>

    </location>

    <location path="MyAds.aspx">

    <system.web>

    <authorization>

    <deny users="?"/>

    </authorization>

    </system.web>

    </location>

    <location path="MyProfile.aspx">

    <system.web>

    <authorization>

    <deny users="?"/>

    </authorization>

    </system.web>

    </location>

    <system.web>

    <authorization>

    <allow roles="Administrators"/>

    </authorization>

    <pages styleSheetTheme="Blue"/>

    <authentication mode="Forms"/>

    <membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="15">

    <providers>

    <clear />

    <add

    name="SqlProvider"

    type="System.Web.Security.SqlMembershipProvider"

    connectionStringName="LocalSqlServer"

    applicationName="Classifieds"

    enablePasswordRetrieval="false"

    enablePasswordReset="true"

    requiresQuestionAndAnswer="true"

    requiresUniqueEmail="true"

    passwordFormat="Hashed" />

    </providers>

    </membership>

    <profile enabled="true">

    <properties>

    <add name="FirstName" type="System.String"/>

    <add name="LastName" type="System.String"/>

    <add name="MemberId" defaultValue="0" type="System.Int32"/>

    <group name="Core"/>

    </properties>

    </profile>

    <roleManager enabled="true" />

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

    <providers>

    <clear/>

    <add name="RoleEnabled_AspNetXmlSiteMapProvider" type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="web.sitemap" securityTrimmingEnabled="true"/>

    </providers>

    </siteMap>

    <!--<compilation debug="true"/>-->

    </system.web>

    <connectionStrings>

    <add name="classifiedsConnection" connectionString="Data Source=serveraddress; Initial Catalog=datatbase; User ID=id; Password=p;"/>

    <remove name="LocalSqlServer"/>

    <add name="LocalSqlServer" connectionString="Data Source=serveraddress; Initial Catalog=datatbase; User ID=id; Password=p;"/>

    </connectionStrings>

    <system.net>

    <mailSettings>

    <smtp>

    <network host="smtp.gmail.com" port="465" defaultCredentials="true" userName="" password=""/>

    /&gt;

    </smtp>

    </mailSettings>

    </system.net>

    </configuration>

     

     

    regards

    ashu

    Tuesday, January 29, 2008 1:51 AM
  • User-1431398638 posted

    hi,

    this is real web.config running on www.gurgaonservices.com.

    just put everything in a single database and publish it after creating administrator from wensite administration.

    <?xml version="1.0"?>

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

    <system.web>

    <customErrors mode="Off"/>

    <compilation debug="true"/>

    </system.web>

    <location path="Admin">

    <system.web>

    <authorization>

    <allow roles="Administrators"/>

    <deny users="*"/>

    </authorization>

    </system.web>

    </location>

    <location path="PostAd.aspx">

    <system.web>

    <authorization>

    <deny users="?"/>

    </authorization>

    </system.web>

    </location>

    <location path="EditPhotos.aspx">

    <system.web>

    <authorization>

    <deny users="?"/>

    </authorization>

    </system.web>

    </location>

    <location path="MyAds.aspx">

    <system.web>

    <authorization>

    <deny users="?"/>

    </authorization>

    </system.web>

    </location>

    <location path="MyProfile.aspx">

    <system.web>

    <authorization>

    <deny users="?"/>

    </authorization>

    </system.web>

    </location>

    <system.web>

    <authorization>

    <allow roles="Administrators"/>

    </authorization>

    <pages styleSheetTheme="Blue"/>

    <authentication mode="Forms"/>

    <membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="15">

    <providers>

    <clear />

    <add

    name="SqlProvider"

    type="System.Web.Security.SqlMembershipProvider"

    connectionStringName="LocalSqlServer"

    applicationName="Classifieds"

    enablePasswordRetrieval="false"

    enablePasswordReset="true"

    requiresQuestionAndAnswer="true"

    requiresUniqueEmail="true"

    passwordFormat="Hashed" />

    </providers>

    </membership>

    <profile enabled="true">

    <properties>

    <add name="FirstName" type="System.String"/>

    <add name="LastName" type="System.String"/>

    <add name="MemberId" defaultValue="0" type="System.Int32"/>

    <group name="Core"/>

    </properties>

    </profile>

    <roleManager enabled="true" />

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

    <providers>

    <clear/>

    <add name="RoleEnabled_AspNetXmlSiteMapProvider" type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="web.sitemap" securityTrimmingEnabled="true"/>

    </providers>

    </siteMap>

    <!--<compilation debug="true"/>-->

    </system.web>

    <connectionStrings>

    <add name="classifiedsConnection" connectionString="Data Source=serveraddress; Initial Catalog=datatbase; User ID=id; Password=p;"/>

    <remove name="LocalSqlServer"/>

    <add name="LocalSqlServer" connectionString="Data Source=serveraddress; Initial Catalog=datatbase; User ID=id; Password=p;"/>

    </connectionStrings>

    <system.net>

    <mailSettings> <smtp>

    <network host="smtp.gmail.com" port="465" defaultCredentials="true" userName="" password=""/>

    /&gt;

    </smtp>

    </mailSettings>

    </system.net>

    </configuration>

     

     

    regards

    ashu

    Tuesday, January 29, 2008 1:51 AM
  • User612424178 posted

    i have the same problem. i'm not using data base for sendding email but give same kind of error

     

    this my web.confg file

     

    <?xml version="1.0"?>
    <!-- 
        Note: As an alternative to hand editing this file you can use the 
        web admin tool to configure settings for your application. Use
        the Website->Asp.Net Configuration option in Visual Studio.
        A full list of settings and comments can be found in 
        machine.config.comments usually located in 
        \Windows\Microsoft.Net\Framework\v2.x\Config 
    -->
    <configuration>
    	<system.net>
    		<mailSettings>
    			<smtp from="admin@XXXX.com">
    				<network host="smtp.XXX.com" port="25" userName="admin@XXX.com" password="XXX" />
    			</smtp>
    		</mailSettings>
    	</system.net>
    	<appSettings/>
    	<connectionStrings/>
    	<system.web>
    		<!-- 
                Set compilation debug="true" to insert debugging 
                symbols into the compiled page. Because this 
                affects performance, set this value to true only 
                during development.
            -->
    		<compilation debug="true"/>
    		<!--
                The <authentication> section enables configuration 
                of the security authentication mode used by 
                ASP.NET to identify an incoming user. 
            -->
    		<authentication mode="Windows"/>
    		<!--
                The <customErrors> section enables configuration 
                of what to do if/when an unhandled error occurs 
                during the execution of a request. Specifically, 
                it enables developers to configure html error pages 
                to be displayed in place of a error stack trace.
    
            <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
                <error statusCode="403" redirect="NoAccess.htm" />
                <error statusCode="404" redirect="FileNotFound.htm" />
            </customErrors>
            -->
    	</system.web>
    </configuration>
    

    Tuesday, March 15, 2011 2:51 AM