Monday, March 29, 2010

Debug wcf service with IIS on Vista

The IIS service on the vista pc needs to be set up to host WCF services:

run command prompt as administrator, and run the following command -

"%windir%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -r -y

credit goes to this guy

Tuesday, March 23, 2010

Debug in VS2008 with local IIS server on Vista pc

For one of my projects I have to use a Vista pc with VS2008 to develop a website and webservices. I want to use the local IIS server instead of the Visual Studio Development Server to debug my project.
Steps to be taken:
  1. In visual studio, go to the properties of your website project. From the diffferent tabs (Application, compile,...) choose Web.
  2. Under 'Servers', select 'Use local IIS server'.
  3. the default project url is http://localhost/myproject . Click the 'Create virtual directory' button.
  4. This message pops up : you need to install the "IIS Metabase and IIS6 Configuration Compatibility" feature under Internet Information Services-Web Management Tools-IIS 6 Management Capability to get the IIS6 ADSI provider installed.It means that IIS is not installed or not fully configured on this pc.
  5. Close Visual Studio
  6. Open Configuration panel , select Add/Remove programs. On the left you have a link to 'Turn Windows features on or off'. Click this link.
  7. In the dialog box scroll to 'Internet Information services' / 'Web management and enable 'IIS Metabase and IIS6 Configuration Compatibility'.
  8. Next you need to enable ASP.NET under the same 'Internet Information services' select Developer functions and check ASP.NET.
  9. Click OK. this will take some minutes.
  10. Open the visula studio project again and in the Web properties, click on the Create Virtual Directory. this should work now.

Wednesday, March 03, 2010

SQL 2008 - enable database for full text search

My customer wanted a search screen to find product information by key words. Up to now I have been using standard SQL server transact-sql. It became clear to me that we needed to look into the full text search because he wanted to find data by relevance.
The database needs to be readied to use full text search.
Set the database to compatibility level server 2008.
Here is the transact SQL:
-- enable full text search on a sql 2008 server - database was restored from sql 2000
USE [master]
-- examine the current compatibility level
EXEC sp_dbcmptlevel 'MyDatabase'
-- change the compatibility level
Create a stoplist

In case the system stoplist does not contain a stopword that you require

USE MyDatabase
-- find out if a specific stopword is in use
select * from sys.fulltext_stopwords where stopword = 'de'
-- in case the system stoplist is not sufficient, create your own

Using MVVM with WPF

WPF Apps With The Model-View-ViewModel Design Pattern