Archive for the ‘WCSF’ Category

h1

missing .svc and empty Web.config in http://localhost/FenixServices/ project .Nettiers

April 4, 2008

Jak k tomu doslo.
Projekt se servicama jsem mel uplne prazdny (prohledanim solution explorerem). V IIS manageru jsem videl to co v Solution Exploreru.

Chyba byla v tom ze:  

  • TFS mi nechtelo nahravat veci do workspacu.
  • Vytvoril jsem novy workspace a nahral do nej solutionu
  • Nejakym prapodivnym zpusobem jsem modifikoval Fenix.Wcf.Deploy, kde jsem nastavil absolutni cesty na novy workspace. 
  • Zacheckoval
  • Druhy den jsem prisel zpatky a po restartu jsem mohl nahrat data do puvodniho workspacu
  • Data obsahovala cesty na absolutni data stareho workspacu
  • Vygeneroval se Virtual directory na FenixServices na IIS
  • Byl uplne prazdny
  • Server vracel chybu Inernal error 500 -(*.svc tam nebyly)
  • Musel se opravit Fenix.Wcf.Deploy na relativni cesty
  • znovu stahnout solutiona
  • Pokud jsem zadal do prohlizece URL nove orchestrace, dostal jsem:http://localhost/FenixServices/Orchestrations/XXXXService.svc

    The type ‘Fenix.Services.Orchestrations.XXXXService’, provided as the Service attribute value in the ServiceHost directive could not be found.

  • Zkompiloval jsem a zkusil znovu, obdrzel jsem:Security settings for this service require Windows Authentication but it is not enabled for the IIS application that hosts this service.
  • IIS manager -> FenixServices virtual path -> properties -> directory security – > Edit -> check Integrated Windows auth..
  • HOTOVO :)
h1

WCSF links

March 31, 2008
h1

Lab2: Dependency injection

March 12, 2008

The Dependency Injection pattern promotes loose coupling between a class and the objects it depends on. With the Dependency Injection pattern, you do not instantiate the dependencies explicitly in your class. Instead, a class gets the objects it requires from an outside source. With the Web Client Software Factory, you express dependencies declaratively in your class definition. In the declaration, you specify an interface; you do not specify a concrete implementation. This means you can easily replace the implementation of an object that a class depends on, without changing the source code of the class. This is especially useful if you want to be able to test your classes in isolation. The Composite Web Application Block includes a dependency injection framework based on ObjectBuilder that you can use to implement the Dependency Injection pattern in your application; this framework is used frequently throughout the software factory.
For more information about the Dependency Injection pattern, see “Dependency Injection” in Web Client Software Factory Help.

Module services are services that can be consumed only by the module that registers it. Global services are services that are available to all the modules in the solution.
To register module services, you implement the AddModuleServices method of the module initialization class of your business module.

A module initialization class is a class that implements the IModuleInitializer interface. This class contains initialization code that runs when the Composite Web Application Block loads the module. This interface defines two methods, Load and Configure. You implement these methods to perform module initialization tasks, such as registering services or adding site map nodes to the site map. For more information about module loading and the IModuleInitializer interface, see “Modules” in Web Client Software Factory Help.

Note: moduleServices is a services collection. In this particular case, it is the collection of services of the EFT module. You use the AddNew method to have ObjectBuilder create a new instance of the service and add it to the services collection. By adding a service to the services collection of the EFT module, you register it as a module service, and it will always be available at run time to be injected by the ObjectBuilder in the current module.
(EFT = general module. JUST IN THIS CASE!!!)

The AddNew method allows you to specify the type that is used to register the service (this is the second generic parameter in the line of code you added in step 3). This is the type developers use to obtain a reference to the service when using the Dependency Injection pattern. By specifying the service’s interface as the registration type, you enable developers to write generic code that is not aware of the concrete service implementation being used. This is especially useful when testing your classes because you can easily replace dependencies with mock implementations to test your classes in isolation.

h1

Lab1 comments

March 11, 2008

commentaries from codeplex Hands on Labs documents:

Note: The required application block assemblies are signed and included with the Web Client Software Factory. The software factory installer installs them to the Microsoft Practices Library folder and records the location in a registry key (see HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\patterns and practices\Web Client Factory\MicrosoftPracticesLibraryBinaryPath). By default, the Create Web Client Solution recipe uses this location to search for the required assemblies.

  • Foundational modules. A foundational module exposes functionality that is shared across the application and does not contain Web pages. For example, a foundational module can contain code that provides instrumentation, such as logging.
  •          Business modules. A business module encapsulates a set of concerns of your application and contains Web pages. Typically, business modules are independent from one another and do not expose functionality to other modules.

Typical components of a business module are a combination of related Web pages, page flows, business logic, and services. The following are examples of business modules:

  • A module that contains a specific application feature area, such as reports
  • A module that contains use cases around a specific back-end system, such as loan processing

By default, solutions created with the Web Client Solution template include a Web site with a business module named Shell. This module is associated with the root folder of the Web site. This means that all pages in the root Web site folder belong to the Shell module.

After you run the Add Business Module recipe, you will have the following elements in your solution:

·         A C# class library project. This is the module class library. It contains a default view interface with a presenter, an empty folder named Services, a module initialization class, and a module controller. You will store services, view interfaces, presenters, and controllers in this project.

·         A folder in the Web site that has a default view implementation and a Web.config file. The Composite Web Application Block uses the module information in the Web.config file to load the module when the application starts. You will store view implementations in this folder.

·         A test project for the module. This project includes unit tests for the module initialization class and the presenter class of the default view. It also includes a mock module controller you can use to test your presenters.

clip_image002 

h1

WCSF Labs documentation is in DocX format (Word 2007). I have word 2003

March 10, 2008

Background: The DOCX files, which are now the default file extension in Word 2007, are essentially a bunch of zipped XML documents – [you can even rename the extension from .docx to .zip and extract the contents using Winzip]

To convert .docx documents to .doc format, just download the free Microsoft Office compatibility Pack here. This will help you open, print edit, and save .docx files in Office 2000, Office XP, or Office 2003 [much like an advanced Word 2007 File Viewer].
Than just open with MS Word ;)

If you are on Mac, you can get the Microsoft Office Open XML File Format Converter for Mac here – this converts .docx to rtf (rich text format) files which can be viewed in Office for Mac and other Mac word processors.

Alternatively, you can convert .docx to .doc or extract text from .docx files online using the free Zamzar.com or docxtodoc.com service. Unlike the Microsoft compatibility pack, these docx to doc conversion services do not require copy of Microsoft Office.

It is also possible to open and edit a .docx file in OpenOffice or StarOffice using the free Open XML Translator from SourceForge which converts .docx Word documents to .odf and vice versa.

Related: Microsoft Office 2007 FAQ, Office 2007 Fonts Free

The Word 2007 docx format is currently not supported by GMail Word viewer or Google Docs & Spreadsheets.

h1

WCSF Install DB

March 10, 2008
h1

Failed to access IIS metabase

March 10, 2008

I just installed the CTP June 2007 and created my first “Web Client Solution”. I then ran the web site (default.aspx) and received an error: “Failed to access IIS metabase”.

Server Error in ‘/DevelopmentWebsite’ Application.
——————————————————————————–

Failed to access IIS metabase.
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.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.

The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC). For information on modifying metabase permissions, please see http://support.microsoft.com/?kbid=267904.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

HostingEnvironmentException: Failed to access IIS metabase.
System.Web.Configuration.ProcessHostConfigUtils.MapPathActual(IProcessHostSupportFunctions functions, String siteID, VirtualPath path) +465
System.Web.Configuration.ProcessHostMapPath.MapPathCaching(String siteID, VirtualPath path) +585
System.Web.Configuration.ProcessHostMapPath.GetPathConfigFilenameWorker(String siteID, VirtualPath path, String& directory, String& baseName) +13
System.Web.Configuration.ProcessHostMapPath.System.Web.Configuration.IConfigMapPath.GetPathConfigFilename(String siteID, String path, String& directory, String& baseName) +37
System.Web.Configuration.HostingPreferredMapPath.GetPathConfigFilename(String siteID, String path, String& directory, String& baseName) +77
System.Web.Configuration.WebConfigurationHost.GetStreamName(String configPath) +166
System.Configuration.Internal.DelegatingConfigHost.GetStreamName(String configPath) +10
System.Configuration.BaseConfigurationRecord.InitConfigFromFile() +253

[ConfigurationErrorsException: An error occurred loading a configuration file: Failed to access IIS metabase.]
System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal) +247103
System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors) +40
System.Configuration.Configuration..ctor(String locationSubPath, Type typeConfigHost, Object[] hostInitConfigurationParams) +412
System.Configuration.Internal.InternalConfigConfigurationFactory.System.Configuration.Internal.IInternalConfigConfigurationFactory.Create(Type typeConfigHost, Object[] hostInitConfigurationParams) +29
System.Web.Configuration.WebConfigurationHost.OpenConfiguration(WebLevel webLevel, ConfigurationFileMap fileMap, VirtualPath path, String site, String locationSubPath, String server, String userName, String password, IntPtr tokenHandle) +961
System.Web.Configuration.WebConfigurationManager.OpenWebConfigurationImpl(WebLevel webLevel, ConfigurationFileMap fileMap, String path, String site, String locationSubPath, String server, String userName, String password, IntPtr userToken) +84
System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(String path) +36
Microsoft.Practices.CompositeWeb.Services.WebConfigModuleInfoStore.GetConfiguration(String configFilePath) +88
Microsoft.Practices.CompositeWeb.Services.WebConfigModuleInfoStore.PopulateSection(ModulesConfigurationSection section, String rootDirectory) +98
Microsoft.Practices.CompositeWeb.Services.WebConfigModuleInfoStore.GetModuleConfigurationSection() +35
Microsoft.Practices.CompositeWeb.Services.WebModuleEnumerator.EnumerateModules() +87
Microsoft.Practices.CompositeWeb.WebClientApplication.LoadModules() +125
Microsoft.Practices.CompositeWeb.WebClientApplication.Application_Start(Object sender, EventArgs e) +98

solution :

In normal case you solve this complication from command line (runned as Administrator)

image 

My problem is, that I wanted compile and execute new project from WCSF, and this solution didn’t help me.

Right solution is:

  RUN VISUAL STUDIO AS ADMINISTRATOR
or
  as a developer, turn off UAC!
h1

Missing Visual Basic when SCSF/WCSF used

March 9, 2008

Problem is, that we have to have installed VB support in Visual Studio. In other case we couldn’t generate project with WCSF /SCSF.

You should have always choice to create new proj in C# or VB. If you will not have this choice, than you obtain exception missing VB bla bla bla…

Solutions : install VB to your VS2005 or use codeplex tutorial, that solves this  situation.

official solution:

http://www.codeplex.com/smartclient/Wiki/View.aspx?title=Known%20Issues%20with%20the%20Smart%20Client%20Software%20Factory

my solution

I don’t know exception message. I lost it. But solution was, that I uninstall WCSF (by Clean Up Utility),  installed VB to my VS2005 and restarted computer. Than reinstalled WCSF as Administrator.

and this is result:

 image

h1

WHERE IS WCSF???

March 9, 2008

After reinstalling WCSF I obtained next complication. Missing Web client development In Guidance Packages When new Project has been created.

 wpfja88v

Installing the Web Client Software Factory – February 2008

If you want to use all the assets in the Web Client Software Factory, you need to install the prerequisites, which include Microsoft Visual Studio 2008 (C# and Web Developer), .NET Framework 3.5 and Guidance Automation Extensions February 2008. You may also decide to install the optional components, which include Guidance Automation Toolkit for Visual Studio 2008 and Enterprise Library.

Completive links :

http://www.codeplex.com/websf/Wiki/View.aspx?title=Installing_the_Web_Client_Software_Factory_February_2008_Release&referringTitle=Getting_Started_Feb_2008
 

 

h1

WCSF Installation under Vista

March 8, 2008

 My problem was, that I had old version of SCSF and old verison of GAX. I want to develop under newest version of WCSF. When Installation of WCSF demanded newest version of GAX.
I could not uninstall my old GAX becouse of
2769  error during uninstalling.

  • I unininstalled GAT without any problems.

  • First at all, I could not uninstall Guidance Automation Extension (GAX). I obtained error 2769 during uninstalling GAX.
    I downloaded Windows Installer CleanUp Utility ( http://support.microsoft.com/kb/290301 ) and try to uninstall it. But CleanUp Utility  application  didn’t install. Than You must install it under Administrator (Run as admin, when install  CleanUp Utility). After installing Start->Programs->Windows CleanUp . (When I didn’t use Administrator, nothing installed).  Than GAX disappears from Control Panels -> Programs and features.
    Than I can finally uninstall it. Aaaaaahhhhh.:

 

WWFTut7