2009-01-30

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

Filmon, Regmon, and Security Issues are explained

Mark Russinovich's technical blog covering topics such as Windows troubleshooting, technologies and security.

Buffer Overflows in Regmon Traces

Buffer Overflows in Filemon

You receive an "HTTP Error 401.1 - Unauthorized: Access is denied due to invalid credentials" error message when you try to access a Web site that is part of an IIS 6.0 application pool

Configuring a Service Principle Name (SPN) for an SSRS application pool
http://blogs.msdn.com/rdoherty/archive/2006/07/26/678841.aspx

dump analysis and debugging pages

Crash Dump Analysis and Debugging Portal
http://www.dumpanalysis.org/
WinDbg Quick Links
http://windbg.dumpanalysis.org/
IIS State identifies performance problems
IIS State
IISTracer
http://iismonitor.motobit.com/
Key Performance Monitor Counters
http://www.windowsnetworking.com/articles_tutorials/Key-Performance-Monitor-Counters.html
CLR Profiler for the .NET Framework 2.0
http://www.microsoft.com/downloads/details.aspx?familyid=a362781c-3870-43be-8926-862b40aa0cd0&displaylang=en

How To: Use CLR Profiler To profile an ASP.NET application
http://msdn.microsoft.com/en-us/library/ms979205.aspx#scalenethowto13_topic5

A blog post about "Profilers for the CLR" by Brad Abrams
http://blogs.msdn.com/brada/archive/2005/03/17/398060.aspx
.NET Memory Profiler (available in 64-bit also!)
http://memprofiler.com/download.aspx

User Mode Process Dumper Version 8.1

2009-01-29

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

Advices from IIS Pros

Turkey's successfull Microsoft Support Engineer Cenk ISCAN's blog entry about IIS diagnostics. http://blogs.msdn.com/cenkiscan/default.aspx?p=2

Also check johan's blog for "Getting started with windbg"
http://blogs.msdn.com/johan/archive/2007/11/13/getting-started-with-windbg-part-i.aspx

Wonderful WinDbg explanations from Johan - Inspecting the cache
File containing sample commands for Cache Inspection

Finbar's Blog
http://blogs.msdn.com/finbar_ryan/archive/2008/07/23/new-to-debugging.aspx

Loading static content in ASP.NET pages from different domain for faster parallel download

IIS Performance MSDN articles
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/502ef631-3695-4616-b268-cbe7cf1351ce.mspx?mfr=true

Howto change your iis working mode to 32-bit or 64-bit

PurgeCommerceData.exe deletes your old CS data

Explanations of David Lott - MSFT
http://social.msdn.microsoft.com/Forums/en-US/commserver2007/thread/c4bc9dfe-e336-44ba-ba2c-e1d35a80bc36/

Notes on DPAPI and ProfileKeyManager

Profile Key Manager: A Swiss Knife...
How to Configure Encryption Keys for Profiles System Data
http://msdn.microsoft.com/en-us/library/aa544806.aspx
Profile Key Manager Command Line Utility Reference
http://msdn.microsoft.com/en-us/library/aa545396.aspx
Windows Data Protection
http://en.wikipedia.org/wiki/Data_protection_API
http://msdn.microsoft.com/en-us/library/ms995355.aspx

Web Farm Considerations
http://man.ddvip.com/web/bsaspnetapp/LiB0068.html

How To: Encrypt Configuration Sections in ASP.NET 2.0 Using DPAPI
http://msdn.microsoft.com/en-us/library/ms998280.aspx

2009-01-28

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

Commerce Server 2007 Service Pack 2 does not install successfully

This problem occurs because of a problem with the MSI Installer program when certain Microsoft Commerce Server 2007 Service Pack 1 (SP1) hotfixes have been previously installed.

http://support.microsoft.com/kb/954001

Also please CHECK LIST OF FIXES IN CS2007 SP1
List of the bugs that are fixed in Commerce Server 2007 Service Pack 1

Also please CHECK LIST OF FIXES IN CS2007 SP2
List of the bugs that are fixed in Commerce Server 2007 Service Pack 2

Also check following articles about Sql Server Recovery modes.
FullTextCatalog' cannot be reused until after the next BACKUP LOG operation
SQL SERVER - Recovery Models and Selection

Useful utilities and Snippets

nice directory sizer: TreeSize Free

Amazon Web Services: Storage Service

javascript may include multiple HTML files:

Custom DW Class Creation Internals

When you create custom Datawarehouse classes, Commerce Server OleDb provider works on your DW database, and it creates atable, a SP, and inserts records to ClsDef, and MemDef tables.

Below script is provided just to inform you 'internal events' when you create a new custom DW class in Commerce Server 2007.
-----------------------------------------------------------------------------------
-- DROP SCRIPT: If you want to drop your newly created custom class

declare @CustomDwClassName nvarchar(256)
SET @CustomDwClassName = 'CustomerChurnInfo'
select * from sys.procedures where [name] like '%'+@CustomDwClassName +'%'
select * from sys.tables where [name] like '%'+@CustomDwClassName +'%'
select * from dbo.ClsDef where ClassDefName=@CustomDwClassName
select * from dbo.memdef where ClassDefName=@CustomDwClassName
EXEC('select * from '+@CustomDwClassName)

-----------------------------------------------------------------------------------
-- Inspection Script

select * from sys.procedures where [name] like '%Corporate%'
select * from sys.tables where [name] like '%Corporate%'
select * from CustomerChurnInfo
select * from dbo.ClsDef where ClassDefID=5442 -- displayName='CustomerChurnInfo'
select * from dbo.memdef where ClassDefID=5442
-----------------------------------------------------------------------------------

2009-01-27

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

Unable to open shim database version registry key - v2.0.50727.00000.

From MS CLR Forum
http://social.msdn.microsoft.com/Forums/en-US/clr/thread/57855a4c-64ed-4084-a3ba-36b70efeed0a/#page:2

FIX: A .NET Framework 2.0-based application may require read/write permissions to a registry key even though the application only has to read the registry key
http://support.microsoft.com/kb/918642

From ITexperience.NET
http://www.itexperience.net/2008/04/14/unable-to-open-shim-database-version-registry-key-v205072700000/

2009-01-26

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

If you change your CS2007 MachineName, Beware of these

Fix Commerce Server 2007 After Renaming Machine Name, by Max AKBAR

Change your BizDeskHostname if you see "Bad Request (Invalid Hostname)" when you try to open your siteTerms, or profiles in Commerce Server Manager. SAMPLE SCREENSHOT
Reference.

Other things to consider about CS2007 when you change your machineName:
http://social.msdn.microsoft.com/Forums/en-US/commserver2007/thread/616f5519-585a-4d28-8d24-49f1053e3e42/

Identity requires "DOMAINNAME\Username" format

ReportingServices produces the folloging error if the ApplicationPool's identity is not well formed as in "DOMAINNAME\Username" format:
"The report server is not responding. Verify that the report server is running and can be accessed from this computer"

PS: You may find which permission issue causes the error using FileMon or ProcessMonitor utility.

Also i strongly recommend using SysInternals Suite.

2009-01-25

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

By InstallShield's "/V /a" install Xp Powertoys on Win2003Srv

Quote from: http://blog.netnerds.net/2006/08/how-to-install-xp-powertoys-on-windows-server-2003/
"Recently, when trying to extract MacBook drivers, I learned about InstallShield's "/V /a" switch and I decided to try it on ImageResizerPowertoySetup.exe. I downloaded the file from the Microsoft PowerToys for Windows XP webpage and saved it to my D: drive. I then ran D:\ImageResizerPowertoySetup.exe /V /a and extracted the contents to D:\temp. I saw that a folder called "system32" was created. I then moved the file phototoys.dll to C:\windows\system32 then went to Start -> Run -> regsvr32 phototoys.dll. Voila! "Resize Pictures" appeared in my right-click menu"

2009-01-24

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

Query for Resources and Versions in MSCS_Admin

This query shows the resources and versions from the MSCS_Admin db.

USE [MSCS_Admin];
SELECT r.[s_DisplayName], r.[s_Description], r.[s_Type], rp.[s_Value]
-- SELECT r.*, rp.*
FROM [Resources] r, [ResourceProps] rp
WHERE rp.[s_PropertyName]='s_ResourceVersion' AND rp.i_ResourceId=r.[i_ResourceID]
ORDER BY r.[s_DisplayName]

Also here is a script to create FullTextIndexes for a database:
ReGenFTIndexesForAllCatalogs


Also Check the following thread in order to change your connectionStrings directly from db (BE CAREFUL, UNSUPPORTED BY MS)
ChangeProductcatalogConStrs

2009-01-23

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

ShowSampleData stored procedure

This sp shows top 10 sample rows as sample data from first 100 tables of the db.
ShowSampleData

Note that sql server has a 100 dataset return limitation for a single sp.

While working with CS DataWarehouse remember these

Datawarehouse and named instances
http://social.msdn.microsoft.com/Forums/en-US/commserver2007/thread/52e0fae1-3649-492a-8633-92b7dbf58ef7/

Web Analytics concepts in Wiki
http://en.wikipedia.org/wiki/Web_analytics

Fix for "BadImageFormatException was unhandled" on x64 platforms

How to Install the Data Warehouse Reports

Configuring the Data Warehouse and Analysis Server

How to install a 32-bit version of SQL Server 2005 Reporting Services on a computer that is running a 64-bit version of Windows

How to switch between the 32-bit versions of ASP.NET 1.1 and the 64-bit version of ASP.NET 2.0 on a 64-bit version of Windows

FIX: The Commerce Server cache cannot refresh successfully when you invoke the SiteCacheRefresh method to refresh the cache in Commerce Server 2007

How to Create a Custom Data Warehouse Event

2009-01-22

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

ContentListHelper.dll problem in 64 bit installation of Commerce Server 2007

When using 64 bit Commerce Server 2007, you may experience problems after deploying your code. That may be caused by the 32 bit version of the Microsoft.CommerceServer.Internal.ContentListHelper.dll placed in your application's bin folder.

Application tries to load libarary, finds in the bin directory, then it tries to load the 32 bit dll on the 64 bit windows operatiing system. You may delete the dll from the bin directory, and thus application tries to load it from the Global Assembly Cache.

As Max AKBAR's post in the CS Forum:
http://social.msdn.microsoft.com/Forums/en-US/commserver2007/thread/526f70f8-35bb-4221-b9cd-73406d202aa2/

2009-01-21

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

Deep dive to Sql Server 2005 system tables!

WARNING: These kind of system table modification activities are NOT SUPPORTED by Microsoft! So if you try these activities that means you accept not to get support for your Sql Server 2005 installation from Microsoft. You are left alone with the circumstances of your activities. Use at your own risk!

Here is a great trick explained to update system tables in Sql Server 2005!
SQL Server 2005 - Ad hoc updates to system catalogs are "allowed"

also You may check the following thread:
MSDN Forum Thread Link

USE SampleSite_productcatalog

-- Execute below statements and then restart the server in singleuser mode
sp_configure 'allow updates', 1
reconfigure with override


-- To start a named instance of SQL Server in single-user mode from a command prompt
-- From a command prompt, enter the following command:
-- sqlservr.exe -m -s INSTANCENAME
MSDN Reference

-- Connect to the server using Dedicated Admin Connection - DAC
-- OPEN Management Studio and connect to "ADMIN:SERVERNAME\INSTANCENAME" in your query window

-- below queries shows a sample scnerio for updating system tables.

-- shows the path of the ftCatalog
sp_help_fulltext_catalogs [ @fulltext_catalog_name = ] 'fulltext_catalog_name'


-- show the quesy for the view
SELECT * FROM sys.fulltext_catalogs
DELETE FROM sys.fulltext_catalogs WHERE fulltext_catalog_id=6 --View or function 'sys.fulltext_catalogs' is not updatable because the modification affects multiple base tables.
sp_helptext 'sys.fulltext_catalogs' -- shows the query about following tables: sys.sysclsobjs , sys.sysobjvalues , sys.syssingleobjrefs
SELECT * FROM sys.database_files
sp_helptext 'sys.database_files'
SELECT * FROM sys.database_files WHERE FILE_ID=65537
SELECT * FROM sys.sysclsobjs WHERE class=32 AND id=6
SELECT * FROM sys.sysobjvalues WHERE valclass=41 AND objid=6 AND subobjid = 0 and valnum = 0 --SVC_FTCATPATH
SELECT * FROM sys.syssingleobjrefs WHERE depid = 6 -- SRC_FTCATOWNER
DELETE FROM sys.syssingleobjrefs WHERE depid = 6 -- Warning: System table ID 74 has been updated directly in database ID 17 and cache coherence may not have been maintained. SQL Server should be restarted.
SELECT * FROM sys.sysobjvalues WHERE valclass=41 AND objid=6 -- AND subobjid = 0 and valnum = 0 --SVC_FTCATPATH
DELETE FROM sys.sysobjvalues WHERE valclass=41 AND objid=6 -- AND subobjid = 0 and valnum = 0 --SVC_FTCATPATH -- Warning: System table ID 60 has been updated directly in database ID 17 and cache coherence may not have been maintained. SQL Server should be restarted.
DELETE FROM sys.sysclsobjs WHERE class=32 AND id=6 -- Warning: System table ID 64 has been updated directly in database ID 17 and cache coherence may not have been maintained. SQL Server should be restarted.
SELECT * FROM sys.sysdbfiles WHERE fileid=65537
DELETE FROM sys.sysdbfiles WHERE fileid=65537 -- Warning: System table ID 76 has been updated directly in database ID 17 and cache coherence may not have been maintained. SQL Server should be restarted.

SELECT * FROM sys.database_files

Brief Summary of the operations below:
-------------------------------------------------------------------------------------
1 Attach SampleSite_ProductCatalog db
2 Delete all the FullTextCatalogs you can...
3 Delete all the users except the ones that are crucial such as: dbo
4 Switch to SingleUserMode and establish Direct Admin Connection
5 Using below queries you may delete the "cannot be deleted" fulltextCatalogs.
-- SCRIPT BEGIN
USE [YemekSepeti_productcatalog];
DELETE FROM sys.fulltext_catalogs WHERE fulltext_catalog_id=6 -- ERROR: View or function 'sys.fulltext_catalogs' is not updatable because the modification affects multiple base tables.
-- SELECT * FROM sys.sysclsobjs WHERE class = 32
DELETE FROM sys.sysclsobjs WHERE class = 32 AND ID=6 -- OK: Warning: System table ID 64 has been updated directly in database ID 17 and cache coherence may not have been maintained. SQL Server should be restarted.
DELETE FROM sys.sysobjvalues WHERE valclass = 41 AND objid=6 AND subobjid=0 AND VALNUM=0 -- OK: Warning: System table ID 60 has been updated directly in database ID 17 and cache coherence may not have been maintained. SQL Server should be restarted.
-- SKIPPED: SELECT * FROM sys.sysobjvalues v WHERE v.valclass = 41 AND v.objid = 6 AND v.subobjid = 0 and v.valnum = 0 --SVC_FTCATPATH
DELETE FROM sys.syssingleobjrefs WHERE depid = 6 AND class = 45 AND depsubid = 0 -- OK: Warning: System table ID 74 has been updated directly in database ID 17 and cache coherence may not have been maintained. SQL Server should be restarted.
DELETE FROM sys.syssingleobjrefs WHERE depid = 6 AND class = 46 AND depsubid = 0 -- OK: Warning: System table ID 74 has been updated directly in database ID 17 and cache coherence may not have been maintained. SQL Server should be restarted.
DELETE FROM sys.syssingleobjrefs WHERE depid = 6 AND class = 16 AND depsubid = 0 -- OK: Warning: System table ID 74 has been updated directly in database ID 17 and cache coherence may not have been maintained. SQL Server should be restarted.
-- All FULLTEXT CATALOGs are being DELETED!
-- select * from sys.sysdbfiles where filetype=4
DELETE FROM sys.sysdbfiles where filetype=4 -- OK: (12 row(s) affected) Warning: System table ID 76 has been updated directly in database ID 17 and cache coherence may not have been maintained. SQL Server should be restarted.
-- Thus MySampleCatalog_FullTextCatalog has been deleted.
-- SCRIPT END
6 SWITCH to MULTI_USER Mode. Delete the remaining user that was the owner of the deleted catalog.
7 DB detach
8 DB attach
9 DBCC CHECKDB
10 DBCC CHECKCATALOG
-------------------------------------------------------------------------------------

2009-01-20

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

Backup Database fails because of Offline FullText Catalog

Error message when you perform a full backup of a database in SQL Server 2005: "Backup failed for Server 'ComputerName\SQLInstanceName' " or "The backup of the file or filegroup 'sysft_FullTextCatalog' is not permitted because it is not online"
http://support.microsoft.com/kb/923355/en-us

Below you will find the stored procedure that i wrote to regenerate the CS productCatalog fulltext indexes:

/*
-- USAGE
EXEC [dbo.ReGenFTIndexesForAllCatalogs] @ProductCatalogDbName='StarterSite_productcatalog'
*/

CREATE PROC [dbo.ReGenFTIndexesForAllCatalogs]
@ProductCatalogDbName NVARCHAR(MAX)
AS

declare @sqlQuery nvarchar(MAX)
SET @sqlQuery = 'BACKUP LOG '+@ProductCatalogDbName+' WITH truncate_only'
PRINT 'Executing: '+@sqlQuery
EXEC @sqlQuery

DECLARE cur_Catalog CURSOR FOR
SELECT Catalogname, [DisplayName_tr-TR], [CatalogType] FROM catalogglobal ORDER BY Catalogname

OPEN cur_Catalog

DECLARE @CatName nvarchar(256), @DisplayName_TR NVARCHAR(256), @CatalogType NVARCHAR(256)

FETCH NEXT FROM cur_Catalog INTO @CatName, @DisplayName_TR, @CatalogType

WHILE @@FETCH_STATUS = 0
BEGIN
SET @sqlQuery = 'Working for DisplayName: '+@DisplayName_TR +', CatalogName: '+@CatName+', CatalogType: '+@CatalogType
PRINT @sqlQuery
exec dbo.ctlg_CreateFullTextCatalog
@CatalogName=@CatName, @NumFullTextCatalogs=10,
@UseExistingFTCatalog=1, @NewCatalog=0, @SqlServerVersion=9

FETCH NEXT FROM cur_Catalog INTO @CatName, @DisplayName_TR, @CatalogType
END

CLOSE cur_Catalog
DEALLOCATE cur_Catalog

2009-01-19

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

Webbrowser control deep dive

Blocking images similar to Outlook in .NET 2.0

Also check this

Per assembly configuration files

http://www.koders.com/csharp/fidAD657BD6BAD7B5996A0577D1961430638310A76F.aspx

Determining and solving memory leaks in IIS

How to solve memory leak in IIS w3p.exe

mirror

2009-01-18

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

What are all of these?

What is "*.vshost.exe"?
What is AppDomain?
What is Design-Time Expression Evaluation

2009-01-16

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

MultiThread WebBrowser Controls on WinForm, and Reflection Library

Sample project may be downloaded from the link below:
MultiThread WebBrowser Controls
Thus we see, we may download multiple website at the same time.
TODO: Generating thread objects in runtime, and executing them using reflection code.

Dynamic Reflection Library may be used when writing reflection code.

A colleague suggested to use ThreadPool to que work for threads, thus thread creation and start / stop / dispose operations will not be handled in a method, it will be handled in ThreadPool automatically. For more info:
Starting threads with parameters in C#
ThreadPool Class

Cryptography Application Block in Enterprise Library 2.0 - Part I

Cryptography Application Block in Enterprise Library 2.0 - Part I
by David Hayden ( Florida .NET Developer )

Encryption Basics Using RC4
by Security Freak

2009-01-13

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

If you cannot see Turkish characters in your source code...

RegionalOptions
Advanced
If you cannot see Turkish characters in your source code which you have got from your TFS, that is because your regional settings are incorrect. If you chenge your regional settings as in the screenshots, you will STILL EXPERIENCE the problem, until you reboot your Windows XP Pro (even in SP3). Steps:
1) Change your regional settings as shown in pictures
2) Reboot your system

2009-01-12

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

Scent of Code Access Security

"Configuring .NET Code Access Security"
http://www.15seconds.com/issue/040121.htm


"How do you change the trust level for an ASP.NET application?"
http://www.velocityreviews.com/forums/t118529-how-do-you-change-the-trust-level-for-an-apsnet-application.html

2009-01-10

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

Sql Server 2005 Performance Articles

Tips for Using SQL Server Performance Monitor Counters

Measuring Database Performance by Using Microsoft® SQL Server™ 2005

The .Net Developer And SQL Server: Working On Locks

2009-01-08

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

Beneficial articles on Sql Server Indexes

SQL Performance Tuning using Indexes
An Introduction to Clustered and Non-Clustered Index Data Structures

Partitioned Tables and Indexes in SQL Server 2005

2009-01-01

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

Commerce Server 2009 (aka Mojave) Dec CTP was announced!

Reference: http://blogs.msdn.com/commerce/archive/2008/12/22/december-community-technology-preview-ctp-is-now-available-for-download.aspx

What’s New in Commerce Server 2009 December CTP Release?

Commerce Server 2009 delivers the ability to increase your business reach by making it possible to sell via multiple channels using an out-of-the-box shopping site, SharePoint Commerce Services, and the Multi-Channel Commerce Foundation.

The new out-of-the-box shopping site leverages SharePoint Commerce Services, which provides a gallery of ASP.NET 3.5 Web Parts, a comprehensive e-commerce shopping feature-set, and technology integration between Commerce Server and SharePoint technologies. The Multi-Channel Commerce Foundation provides a new unified, extensible run-time programming model for Commerce Server, including new run-time e-commerce capabilities. 

The December CTP adds the following capabilities over previous Commerce Server 2007 code name “Mojave” releases:

  • Update package from Commerce Server 2007, allowing for seamless in-place upgrade of existing deployments. 
  • Complete out-of-the-box e-commerce shopping site in SharePoint with new search functionality, new shopping features, and what-you-see-is-what-you-get (WYSIWYG) content management and design experiences. This helps to facilitate rapid assembly and maintenance of e-commerce Web sites by business users and creative professionals.

December CTP ISO
To download the December CTP ISO, go to the Download Center

Commerce Server 2009 Installation Guide and Readme
To download the Commerce Server 2009 Installation Guide and the Microsoft Commerce Server 2009 December 2008 CTP Readme, click this link.  

Note: Before you install the pre-release of Commerce Server 2009, you must install the prerequisite software which includes the installation of Commerce Server 2007. Also, you must register with the Microsoft Connect site before you can download the latest readme, additional documentation, or samples. Register on the Microsoft Connect site (
http://go.microsoft.com/fwlink/?LinkID=129508 ) with your Windows Live ID account.