Last post Sep 20, 2007 10:39 PM by darkknight187
Aug 29, 2007 05:06 PM|JRADVERTISING|LINK
Aug 29, 2007 06:46 PM|millet|LINK
You should set customErrors in web.config to off and than try to run your site. You will get more detailed error. Please, post that error.
Aug 30, 2007 10:14 PM|darkknight187|LINK
Actually it's case sensitive so you need to set the mode to Off,
And post the error if you can't figure it out.
Sep 07, 2007 04:07 PM|cotrill|LINK
i get the same error and when setting to Off, here is what i get.
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" %>
2) Add the following section to the configuration file of your application:
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.
Sep 08, 2007 10:09 AM|darkknight187|LINK
It's telling you it cannot find your stored produre, "GetAdsByRandomOrder"
First off, check your online database and make sure it's there..
Another place to check is App_Code/DAL/Ads.xsd
It sounds like you changed something, maybe playing with the featured ad feature?
Hope this helps
Sep 19, 2007 04:00 PM|JRADVERTISING|LINK
Now I get this error message initially (#1), however, after I refresh the browser I do get the default page, however, when I click to post an ad I get another error message (#2). All after a new clean upload without having made any changes other than the
Here's another question. DO YOU HAVE A STEP BY STEP EXAMPLE OF A COMPLETE SETUP ONTO A REMOTE SERVER? Even the install instruction that comes with the kit is ambiguious and incomplete. I am a visual person and need specifics...what I have found on many of
the forum pages are even more confusing and frustrating. I hope to have your help ASAP.
Line 6: Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)Line 7: Line 8: If (Not Roles.RoleExists("Administrators")) ThenLine 9: Roles.CreateRole("Administrators")Line 10: End If
[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) in E:\web\localsalesm\htdocs\global.asax:8
Line 23: Protected Sub PasswordRecovery_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles PasswordRecovery.InitLine 24: Dim s As SiteSettings = SiteSettings.GetSharedSettings()Line 25: PasswordRecovery.MailDefinition.From = s.SiteEmailFromFieldLine 26: End SubLine 27:
[NullReferenceException: Object reference not set to an instance of an object.] Login_aspx.PasswordRecovery_Init(Object sender, EventArgs e) in E:\web\localsalesm\htdocs\Login.aspx.vb:25 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
Sep 19, 2007 04:09 PM|darkknight187|LINK
I've gotta take off for a bit, but who are you hosting with?
And did you change the runtime to 2.0?
And which type of Database are you trying to install on?
Upload your entire web.config, just in case it's a simple error. (xxx out secure info)
Sep 19, 2007 07:42 PM|JRADVERTISING|LINK
See my reply below...
I've gotta take off for a bit, but who are you hosting with? HOSTING WITH DiscountASP.NET
And did you change the runtime to 2.0? I DO NOT KNOW WHAT THIS MEANS!
And which type of Database are you trying to install on? MS SQL 2005 Server
I am including my web.config file as requested along with the DiscountASP.NET forum install/server instructions...it's all very confusing and opinions appear to be confusing and misleading for an item that's supposed to be 'out of the box' as it were!
Also the instructions are linked from DiscountASP.NET promo page.
I also found some of the Classifieds starter kits have two databases -- one is ASPNETDB.MDF and the other CLASSIFIEDSDB.mdf and the newer verison have one 'classifiedsdb', what's up with that. I bought two SQL 2005 Server databases and it appears I
only needed one...it gets messy and cluttered for me. Any advise and help is appreciated. A visual process would be most beneficial...in fact once I figure this out I will make available to the cyber world a visual/illustrated version specifically for this
<compilation debug="true" />
<allow roles="Administrators" />
<customErrors defaultRedirect="~/Error.aspx" />
<authentication mode="Forms" />
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=188.8.131.52, 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=""/>
<add name="FirstName" type="System.String"/>
<add name="LastName" type="System.String"/>
<add name="MemberId" defaultValue="0" type="System.Int32"/>
<siteMap defaultProvider="RoleEnabled_AspNetXmlSiteMapProvider" enabled="true">
<add name="RoleEnabled_AspNetXmlSiteMapProvider" type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="web.sitemap" securityTrimmingEnabled="true"/>
<add name="classifiedsConnection" connectionString="Data Source=tcp:sql2k510.discountasp.net;Initial Catalog=SQL2005_406375_xxxxxxxxxxx;User ID=SQL2005_406375_xxxxxxxxxxx_user;Password=xxxxxx;"/>
<network host="localhost" port="25" defaultCredentials="true" userName="enterUserNameHereIfRequired" password="enterPasswordIfRequired"/>
2. Install instructions from DiscountASP.NET. Also I could not figure out #4 of the install below!!!
How to install the ASP.NET 2.0 Classified Ad Starter kit
- ASP.NET 2.0
- Visual Web Developer (VWD)
- SQL Express if you intend to develop on your local machine
1) Download and install the starter kit on your computer from http://www.asp.net. Once installed, the Classified Starter kit should be one of the available templates in VWD
2) Open Visual Web Developer
3) Create a local copy of the site
- Select File -> New -> Website. This should bring up the New Web Site dialogue box.
- Select "Classifieds Web Site Starter Kit"
- In Location: Select "File System"
- Put in a location where you want VWD to install the web site
- Select either Visual Basic or Visual C# as language
- Hit OK
4) Install the Database Schema on DiscountASP.NET SQL server
- The SQL script to generate the database is located in the /App_code directory
- You can use your favorite SQL client to execute the script. Here, I am using osql as an example
a) Execute the command below to create the schema
osql -S <sql server name> -U <db_user> -P <DB_password> -d <DB_Name> -i <path to the starterKit>\App_datat\classifieds-add.sql
b) Execute the command below to create some sample data
osql -S <sql server name> -U <db_user> -P <DB_password> -d <DB_Name> -i <path to the starterKit>\App_datat\classifieds-categories.sql
5) Update the Web.config file
- Comment out the following:
<add name="classifiedsConnection" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\classifiedsdb.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
- Add the following:
<add name="classifiedsConnection" connectionString="Data Source=<sql server name>.discountasp.net;Initial Catalog=<DB_Name>;User ID=<db_user>;Password=<DB_password>" />
- Update the SMTP setting
Change host="" to host="localhost"
6) Set up membership / role provider database
See KB: http://kb.discountasp.net/article.aspx?id=10413
7) Copy your site to DiscountASP.NET servers
See KB: http://kb.discountasp.net/article.aspx?id=10364
8) Setup the directory as a web application using the Web Application Tool in the control panel.
Your help is appreciated darkknight187 .
Sep 19, 2007 08:29 PM|darkknight187|LINK
If discount asp is capable of running asp.net 2.0 you would have to enable it, that's what run time is.
Most by default are version 1.0 or 1.1 The classifieds starter kit runs off of 2.0.
Your database version is fine, and the kit does use two databases.
The only difference is that is comes with only the classifieds database and as soon as you run the application on your local computer (view in browser) for the first time it will then automatically create the other database for member information.
Some people like to combine into one, but I recommend sticking with two, so when you have thousands of files, it will run faster.
If you already have your two databases online you just need to point to both of them in your web.config
For example, here is mine, although I am hosting with godaddy so yours may be different, but here's my connection string:
The first points to the ads database and the second is for the members database.
And make sure you leave the name "LocalSqlServer" in, it's being referenced in other locations.
Don't forget the 2.0 runtime.
Sep 20, 2007 11:15 AM|JRADVERTISING|LINK
Thanks...the site is up and running, however, I have a 2 questions still pending...1) is the SMTP/Email in the web.config correct and do I also change the site-config.xml from <SiteEmailAddress>email@example.com</SiteEmailAddress> to reflect an actual
email address: <SiteEmailAddress>firstname.lastname@example.org</SiteEmailAddress> or based on what I submitted earlier remain as is?
Lastly, what program do I use to administer the site in which to circumvent unwanted users/listings, etc.
I did the ASP.NET configuration before uploading, however I am not able to access the pages within the Admin folder. In the browser these pages default to the Login Page...
In advance, thank you again for your help...you have greatly minumized my frustration.
Sep 20, 2007 10:39 PM|darkknight187|LINK
Glad to hear you got it working, and don't forget to mark the post as answered.
As far as managing users I use this great piece of code it's on the bottom of the first post, a long post but it's there.
It's in C#, and I use VB for my coding and it still works fine, so I left it as is.
But what you have to do is, upload the two files to your website, in the main folder where anyone can access it.
If you haven't already, create yourself a login through your website, just like any user of your site.
Then point to your users.aspx file, and set your Id as administrator.
Then delete or move the two users files to a protected part of the website, such as Admin folder.
As far as the email address, yes, you should put in a usable email address.
That xml file is how the site is initially set up, and there is a backup section in App_Data/BLL/SiteSettings.vb
That if the xml settings = Nothing then do these settings type thing, so I would change both.
And in the web.config my settings for godaddy is:
<network host="relay-hosting.secureserver.net" port="25" defaultCredentials="true"/>
The relay hosting part is probably wrong for your site, do a search on your hosting company's site, for send mail settings, or smtp settings.
I think that's it, just make sure you have plenty of backups of what you know works.