I was able to successfully install version 3 (paid version) on a shared hosting plan at WebHost4Life.com (WH4L) and wanted to share with everyone the steps I took. These instructions assume you are somewhat familiar with the WH4L control panel, IIS and SQL. This assumes you have the Windows Advanced hosting plan. Commands you need to type are in red.
- Unzip the files to your local computer (I am running XP). You'll need to be running locally (or have access) SQL Server 2005 so you can run the command line installer (which installs the database). I wish the installer included the MDF/LDFs, or a backup file so you could skip this step...
- Go to your local SQL Server 2005 and backup the database to a file.
- Create a new SQL 2005 database on WH4L. FTP the backup file from step 2, and restore it. You should be able to connect to it from SQL Server Management Studio
- Upload all of the files in the "Web" directory to WH4L. Set that directory as a .Net application in the control panel (version 2.0/3.0/3.5)
- Enable full permissions for the "Network Service" account for the following directories: images, files, App_Data. App_Themes and the DSC.config file. (See the post above from NBStrat on 11/8/08 for more info). Note: you might have to grant the "Everyone" and "Iuser_Accountname" accounts full permissions, too.
- Modify the database connection string in the web.config file (look in the connectionStrings section) to point to WH4L's SQL Server
- Optional: modify web.config to enable remote errors (for remote debugging: <customErrors mode="Off">
- In SQL Management Express, run the following query to enable the SQL Broker service:
ALTER DATABASE xxx SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE
where xxx is the name of your database
You should be good to go now. If not:
- check your asp.net version
- check file/directory permissions
- make sure you can connect to the SQL Server.
Now you need to enable Full Text indexing on your database. In SQL Server Management Studio (Express), open a new query window, and execute the following commands:
exec sp_fulltext_database 'enable'
CREATE FULLTEXT CATALOG ActiveUpdate AS DEFAULT
CREATE FULLTEXT INDEX ON [dbo].[DSC_Product] KEY INDEX [PK_DSC_Product] ON [ActiveUpdate]
GO
CREATE FULLTEXT INDEX ON [dbo].[DSC_Product_Attribute_Value] KEY INDEX [PK_DSC_Product_Attribute_Value] ON [ActiveUpdate]
GO
PRINT N'Adding full text indexing to columns'
GO
ALTER FULLTEXT INDEX ON [dbo].[DSC_Product] ADD (sku LANGUAGE 1033)
GO
ALTER FULLTEXT INDEX ON [dbo].[DSC_Product] ADD (productName LANGUAGE 1033)
GO
ALTER FULLTEXT INDEX ON [dbo].[DSC_Product] ADD (shortDescription LANGUAGE 1033)
GO
ALTER FULLTEXT INDEX ON [dbo].[DSC_Product] ADD (manufacturerSKU LANGUAGE 1033)
GO
ALTER FULLTEXT INDEX ON [dbo].[DSC_Product_Attribute_Value] ADD (value LANGUAGE 1033)
GO
ALTER FULLTEXT INDEX ON [dbo].[DSC_Product] ENABLE
GO
ALTER FULLTEXT INDEX ON [dbo].[DSC_Product_Attribute_Value] ENABLE
At this point you can try this search in the query window to see if all of the indexes are present:
exec DSC_Product_Search @keywords = 'some search value', @TotalProducts = 0
If you get an error, you might need to manually create some indexes; to create a full text index:
- Right click on the table, and choose Modify (you are now in table design mode)
- Right click on any row and choose "Fulltext Index..."
- Click the "Add" button to create a new index
- In the right pane, Under "General > Columns", click the button to select the columns you want to index
You will need to manually index the following tables (columns to index are in parenthesis):
- DSC_Attribute (name, description)
- DSC_Product_Descriptor (title, descriptor)
- DSC_Html (title, data)
Finally, you might need to manually create this stored procedure:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[DSC_Html_Search]
@keywords NVARCHAR(1024),
@ResultsPerPage INT = 24,
@rowIndex INT = 0,
@TotalResults INT OUTPUT
AS
BEGIN
CREATE TABLE #result (RowNumber INT, HtmlId INT)
INSERT INTO #result
SELECT ROW_NUMBER() OVER (ORDER BY r.RANK DESC) AS RowNumber, r.[KEY] AS HtmlId
FROM FREETEXTTABLE(dbo.DSC_Html, *, @keywords, LANGUAGE 'English', 100) AS r
INNER JOIN dbo.DSC_Html AS html
ON html.HtmlId = r.[KEY]
WHERE html.Searchable = 1
SELECT @TotalResults = COUNT(*) FROM #result
SELECT html.*
FROM dbo.DSC_Html AS html
INNER JOIN #result r
ON html.HtmlId = r.HtmlId
WHERE r.RowNumber BETWEEN @rowIndex + 1 AND @rowIndex + @ResultsPerPage
ORDER BY r.RowNumber
END
You should now be good to go.
Tips
- I kept running into performance issues, and after talking to support, I had to compile the solution locally, and publish the solution to the website. This seemed to improve performance and stability.
- I had to install the application into a subfolder, and set this folder as a web application in the WH4L control panel. Putting all of the files in the root did not work, as I could not set the root as its own application pool.
DISCLAIMER: Your mileage may vary, and follow at your own risk.
|