e.magination Dev Corner Blog |
|
|
7/15/2009
Recently a little known issue was discovered when I was attempting to install and configure Microsoft Commerce Server 2007. I was able to install fine but experienced issues when going through the Configuration Wizard. The error (see highlighted section from Configuration Wizard's log file below) had to deal with registering assemblies needed by Commerce Server.
I contacted Microsoft Support and found that there is an issue with Commerce Server on virtual servers created from images. This was exactly what I was dealing with because the server was a VMware virtual server created from an image.
To resolve this issue, a new virtual server was created and the operating system was installed manually.
PROBLEM:
Commerce Server 2007 fails to be configured properly on a virtual server created from an image.
RESOLUTION:
Create new virtual server and manually install the operating system.
DETAILS:
The following is the log from the Configuration Wizard :
[09:48:15 INFO] Database 'MSCS_Admin' exists on server 'G4SQL' [09:48:15 INFO] The ComparisonStyle for Database 'MSCS_Admin' is 196609 [09:48:16 INFO] Creating Library COM+ Application 'Commerce Server Config (32 bit)' [09:48:16 INFO] Installing components from 'C:\Program Files (x86)\Microsoft Commerce Server 2007\MSCSCfg.dll' into COM+ Application 'Commerce Server Config (32 bit)' [09:48:18 INFO] Registering serviced components from assembly 'C:\Program Files (x86)\Microsoft Commerce Server 2007\Assemblies\Microsoft.CommerceServer.Interop.Configuration.MSCSCfg.dll' under application 'Commerce Server Config' [09:48:20 ERROR] CSConfig failed during configuration of feature Administration Database (Feature.MS.CS.Admin). [09:48:20 ERROR] Exception occured during feature configuration: Microsoft.CommerceServer.Internal.Config.ConfigurationException: Failed to generate type library 'C:\Program Files (x86)\Microsoft Commerce Server 2007\Assemblies\Microsoft.CommerceServer.Interop.Configuration.MSCSCfg.tlb' for 'Microsoft.CommerceServer.Interop.Configuration.MSCSCfg, Version=6.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. ---> System.EnterpriseServices.RegistrationException: Failed to generate type library 'C:\Program Files (x86)\Microsoft Commerce Server 2007\Assemblies\Microsoft.CommerceServer.Interop.Configuration.MSCSCfg.tlb' for 'Microsoft.CommerceServer.Interop.Configuration.MSCSCfg, Version=6.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. ---> System.Runtime.InteropServices.COMException (0x80131163): Type library exporter encountered an error while processing 'Microsoft.CommerceServer.Interop.Configuration.IGlobalConfig.get_Fields(#0), Microsoft.CommerceServer.Interop.Configuration.MSCSCfg'. Error: Referenced type is defined in managed component, which is imported from a type library that could not be loaded (type: 'ADODB.Fields'; component: 'C:\WINDOWS\assembly\GAC\ADODB\7.0.3300.0__b03f5f7f11d50a3a\ADODB.dll'). at System.Runtime.InteropServices.TypeLibConverter.nConvertAssemblyToTypeLib(Assembly assembly, String strTypeLibName, TypeLibExporterFlags flags, ITypeLibExporterNotifySink notifySink) at System.Runtime.InteropServices.TypeLibConverter.ConvertAssemblyToTypeLib(Assembly assembly, String strTypeLibName, TypeLibExporterFlags flags, ITypeLibExporterNotifySink notifySink) at System.EnterpriseServices.RegistrationDriver.GenerateTypeLibrary(Assembly asm, String tlb, Report report) --- End of inner exception stack trace --- at System.EnterpriseServices.RegistrationThreadWrapper.PropInstallResult() at System.EnterpriseServices.RegistrationHelper.InstallAssemblyFromConfig(RegistrationConfig& regConfig) at Microsoft.CommerceServer.Internal.Config.NativeComPlusApplication.CreateApplicationForAssembly(String applicationName, Guid assemblyComponentGuid) --- End of inner exception stack trace --- at Microsoft.CommerceServer.Internal.Config.NativeComPlusApplication.CreateApplicationForAssembly(String applicationName, Guid assemblyComponentGuid) at Microsoft.CommerceServer.Internal.Config.AdminConfig.ConfigureDotNetSiteConfig() at Microsoft.CommerceServer.Internal.Config.AdminConfig.Configure() at Microsoft.CommerceServer.Internal.Config.ConfigurationDriver.ConfigureHelper(List`1 orderedListOfFeatures). [09:48:20 INFO] Exception was non-fatal. Beginning rollback. [09:49:23 INFO] Beginning unconfiguration of feature Administration Database (Feature.MS.CS.Admin). [09:49:23 INFO] Deleting existing COM+ Application 'Commerce Server Config (32 bit)' [09:49:24 INFO] Completed unconfiguration of feature Administration Database (Feature.MS.CS.Admin). 6/16/2009
In this recent brownbag presentation, ‘Introduction to the Entity Framework’, Dan Bedassa covered a brief description of what the EF is and why we want to use it as opposed to using Linq to SQL. Dan also covered a demo showing what we need to work with the EF including:
- The Entity Data Model (EDM) and its components.
- Querying the EDM using Linq and Entity SQL syntax.
- The use of Stored Procedures in the EF.
- Inheritance in the EF.
- Command line EDM generation tool (EDMGen.exe)
Supplimental Materials: Entity Framework Brownbag.zip
5/8/2009
In a recent brownbag lunch presentation given by Eugene Kosnyrev, we discussed the goal of a new Microsoft initiative – Parallel Programming. Since right now technology has advanced to where nearly all new machines have multi-core CPU's, the software we build for the future should take advantage of these hardware improvements.
In this brownbag, we examined different approaches for how to implement “parallel aware” software – the classic multithreaded application, and application that uses new TPL (Task Parallel Library), which operates with Tasks object. Also, we reviewed how to use PLINQ (Parallel LINQ) with minimal efforts from developer to make software “parallel aware”.
Supplimental Materials: ParallelProgrammingBrownBag.zip 4/22/2009Have you been thinking about getting a MS certification or taking a software course, but don't think you have the money to afford it? Well as a regular, full-time employee of e.magination you have the opportunity to take advantage of our Training and Development Reimbursement Incentive.
e.magination will provide (subject to budgetary constraints) a benefit of up to $3,000 in reimbursement for professional training, certifications and educational classes (with a grade of A or B).
In order to take advantage of this benefit, you need to do the following:
-
Go to the HR teamsite
-
Print out the "Training and Development Request Form 4-09" located at the bottom of the HR teamsite homepage
-
Fill out the form and submit to your supervisor 1/19/2009After my last post, I had a discussion with Steve Michelotti about documentation. Steve informed me that:
There is a way to get the build to break if proper documentation is not put into the code (in fact, this is what I did at Ad.com because I wanted developers documenting their code). First you turn on the XML Comments file in the project's properties. This will cause a compile warning if a public method does not have a comment. Then you turn on the switch to "Treat Warnings as Errors" and your build will break if the public method doesn't have a comment. Treating errors as warning is a strict switch but I think it's generally good practice *any way* because you don't want code littered with other things like unused local variables, etc. The documentation check is extra gravy.
Keep this in mind when setting up any new projects. 1/16/2009To document, or not to document?
That's not really the question. Of course you should document! You know the saying, "What would happen if Joe Schmoe got hit by a bus tomorrow and someone had to pick up on his project where he left off?" Without proper documentation on Joe's project, the new developer would be left spending unwanted time getting up to speed which is neither time efficient nor cost effective. So obviously as developers it is our responsibility to document our work (i.e. setup, configuration, requirements, changes, etc...) so that project transition can go over as smoothly as possible. And let's not forget that you are going to forget, so documenting as you go can help yourself down the road when the client says "You know that thing you did 5 months ago...".
No, the real question is how much to document! Some developers go over board and document every single line of code (is this really necessary?):
// Increment counter by 1
myCounter++;
Some developers don't even bother to write a single comment. This is a dangerous practice and I wish FxCop or unit testing would break the build if this were the case.
Documentation should be concise, thorough, and informative while not taking up all of your time. Just as it is wise to use the 10% rule when starting a task to determine if you can accomplish your goals in the given amount of time, you might consider using something similar in allowing time to document your work. 1/15/2009
FxCop is a great tool for enforcing style rules and best practices. When run as part of an automated build process, these rules are enforced every time the project is compiled. Sometimes it is necessary to break the rules temporarily, such as the case with the rule AvoidNamespacesWithFewTypes which can come up when a developer has begun work in a new namespace, wants to check the code in, but there are very few types contained within because they have not finished adding classes. Rather than turn off the rule, you can create a suppress message and embed it in the code. FxCop will do this for you automatically. When you run FxCop locally, right click on the error message and select "Copy As --> SupressMessage" which will put a piece of code on your clipboard to suppress this message. You will need to define a conditional compilation symbol in the project in order to make the compiler recognize this. To do this, right click on the project and select properties. In the properties tab, select the build tab. In the general section, type CODE_ANALYSIS in the conditional compilation symbols text box. You will also need to import the code analysis namespace, in C# this would be done with "using System.Diagnostics.CodeAnalysis". Then paste in the appropriate piece of code, rebuild, and you are good to go! This is beneficial over suppressing it in the project because it is actually part of the code, and thus not tied to the specific FxCop project. When the rule has been satisfied by further development, this suppress message should be removed. This can be verified during code review by doing a "find in files" and evaluating each suppress message. 10/28/2008
e.magination recently launched the Dev Corner website to post the latest news, events, code sharing and blog entries from our developers.
Check out the Blogs page to see a feed of our developers' individual blogs as well as this group blog.
| Edit in Browser | /_layouts/images/icxddoc.gif | /blogs/DevCorner/_layouts/formserver.aspx?XsnLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | FileType | xsn | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /blogs/DevCorner/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /blogs/DevCorner/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.2 | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /blogs/DevCorner/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.3 | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /blogs/DevCorner/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.4 | 255 | | View in Web Browser | /_layouts/images/ichtmxls.gif | /blogs/DevCorner/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=1 | 0x0 | 0x1 | FileType | xlsx | 255 | | View in Web Browser | /_layouts/images/ichtmxls.gif | /blogs/DevCorner/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=1 | 0x0 | 0x1 | FileType | xlsb | 255 | | Snapshot in Excel | /_layouts/images/ewr134.gif | /blogs/DevCorner/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=1 | 0x0 | 0x1 | FileType | xlsx | 256 | | Snapshot in Excel | /_layouts/images/ewr134.gif | /blogs/DevCorner/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=1 | 0x0 | 0x1 | FileType | xlsb | 256 |
|
|
|
|
|