IIS7 – post #31 – Adrotator on IIS7 / Vista / BC32400: Class ‘CLSID_CorSymWriter’ could not be created: Access is denied.

I was working with the Adrotator component included in .NET 2.0 on Vista and IIS7.  I was getting this error; BC32400: Class ‘CLSID_CorSymWriter’ could not be created: Access is denied.    It worked on my other vista machine, so I knew it was specific to my machine.  I ran Process Monitor (aka Filemon) and found two registry keys that were getting denied.  After adding Network Service with READ permissions, this started working.    PS: It was fun to actually use Filemon to track down a problem of my own, I mention this tool in many newsgroup posting. 

Here is a picture of the output.

Here is the raw output of the error

Server Error in ‘/’ Application.
——————————————————————————-

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC32400: Class ‘CLSID_CorSymWriter’ could not be created: Access is denied.

Source Error:

 

[No relevant source lines]
 

Source File: vbc :    Line: 0

 

Show Detailed Compiler Output:

c:windowssystem32inetsrv> "C:WindowsMicrosoft.NETFrameworkv2.0.50727vbc.exe" /t:library /utf8output /R:"C:WindowsassemblyGAC_32System.Web2.0.0.0__b03f5f7f11d50a3aSystem.Web.dll" /R:"C:WindowsassemblyGAC_MSILSystem.ServiceModel3.0.0.0__b77a5c561934e089System.ServiceModel.dll" /R:"C:WindowsassemblyGAC_32System.Data2.0.0.0__b77a5c561934e089System.Data.dll" /R:"C:WindowsassemblyGAC_MSILSystem.Web.Mobile2.0.0.0__b03f5f7f11d50a3aSystem.Web.Mobile.dll" /R:"C:WindowsassemblyGAC_32System.EnterpriseServices2.0.0.0__b03f5f7f11d50a3aSystem.EnterpriseServices.dll" /R:"C:WindowsassemblyGAC_MSILSystem.Xml2.0.0.0__b77a5c561934e089System.Xml.dll" /R:"C:WindowsassemblyGAC_MSILSystem.Runtime.Serialization3.0.0.0__b77a5c561934e089System.Runtime.Serialization.dll" /R:"C:WindowsassemblyGAC_MSILSystem.Configuration2.0.0.0__b03f5f7f11d50a3aSystem.Configuration.dll" /R:"C:WindowsassemblyGAC_MSILSystem.IdentityModel3.0.0.0__b77a5c561934e089System.IdentityModel.dll" /R:"C:WindowsassemblyGAC_MSILSystem2.0.0.0__b77a5c561934e089System.dll" /R:"C:WindowsassemblyGAC_MSILSystem.Web.Services2.0.0.0__b03f5f7f11d50a3aSystem.Web.Services.dll" /R:"C:WindowsassemblyGAC_MSILSystem.Drawing2.0.0.0__b03f5f7f11d50a3aSystem.Drawing.dll" /out:"C:WindowsMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesroot26676eb792c7e946App_Web_ads.aspx.cdcab7d2.p_oyg97i.dll" /D:DEBUG=1 /debug+ /define:_MYTYPE="Web" /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Specialized,System.Configuration,System.Text,System.Text.RegularExpressions,System.Web,System.Web.Caching,System.Web.SessionState,System.Web.Security,System.Web.Profile,System.Web.UI,System.Web.UI.WebControls,System.Web.UI.WebControls.WebParts,System.Web.UI.HtmlControls  "C:WindowsMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesroot26676eb792c7e946App_Web_ads.aspx.cdcab7d2.p_oyg97i.0.vb" "C:WindowsMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesroot26676eb792c7e946App_Web_ads.aspx.cdcab7d2.p_oyg97i.1.vb"

Microsoft (R) Visual Basic Compiler version 8.0.50727.312
for Microsoft (R) .NET Framework version 2.0.50727.312
Copyright (c) Microsoft Corporation.  All rights reserved.

vbc : error BC32400: Class ‘CLSID_CorSymWriter’ could not be created: Access is denied.
vbc : error BC31019: Unable to write to output file ‘C:WindowsMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesroot26676eb792c7e946App_Web_ads.aspx.cdcab7d2.p_oyg97i.pdb’: Access is denied.

 

 

——————————————————————————-
Version Information: Microsoft .NET Framework Version:2.0.50727.312; ASP.NET Version:2.0.50727.312

 

Steve Schofield
Microsoft MVP – IIS

Intellisense / get-member in Powershell

One of the neat tricks is write out what Methods, Properties get-member cmdlet.  Here are a couple of replies I recently from my question in the Powershell newsgroup.  

Example 1
————-
It works well for static methods (note the parenthesis and square brackets
around the class name):

PS> get-member -in ([system.math]) -static

Example 2
————-
You don’t need to assign to a variable. You can pipe the new object into the get-member call:

new-object text.stringBuilder | get-member -memberType methods

If you don’t want to create an instance at all, you can use reflection:

[text.stringBuilder].getMethods() | % { $_.name } | sort -unique

IIS7 – post #30 – Vista developer story articles by Microsoft.

These are MUST read articles if you are involved with IIS7 development or administration.

The Windows Vista Developer Story: Internet Information Services
http://msdn2.microsoft.com/en-us/library/aa480184.aspx

The Windows Vista Developer Story: Run-Time Status and Control (RSCA) API
http://msdn2.microsoft.com/en-us/library/aa480205.aspx

The Windows Vista Developer Story: IIS Manager
http://msdn2.microsoft.com/en-us/library/aa480180.aspx

The Windows Vista Developer Story: IIS Modules
http://msdn2.microsoft.com/en-us/library/aa480181.aspx

Steve Schofield
Microsoft MVP – IIS