all groups > visual studio .net enterprise tools > november 2004 >
You're in the

visual studio .net enterprise tools

group:

InstallUtil.exe Request for the permission of type System.Security.Permissions.StrongNameIdentityPermission


InstallUtil.exe Request for the permission of type System.Security.Permissions.StrongNameIdentityPermission dovernh NO[at]SPAM gmail.com
11/17/2004 6:57:34 AM
visual studio .net enterprise tools:
I am trying to InstallUtil.exe an assembly I have created. I cannot
resolve this issue (excerpt from log):

Creating an EnterpriseInstrumentation configuration file for this
assembly and its referenced assemblies...
Scanning HGFulfillment...
Scanning Microsoft.EnterpriseInstrumentation...
Microsoft.EnterpriseInstrumentation.EventSource.applicationEventSource
Microsoft.EnterpriseInstrumentation.EventSource.Application
Scanning System.Management...
Scanning System.Configuration.Install...
Scanning System.Runtime.Serialization.Formatters.Soap...
Scanning Microsoft.JScript...
Scanning Microsoft.Vsa...
Scanning System.EnterpriseServices...
Scanning Microsoft.VisualC...
Scanning System.DirectoryServices...
Scanning C2.Web.Commerce.Profiles...
Scanning Microsoft.CommerceServer.Runtime...
Scanning Microsoft.CommerceServer.Shared...
Scanning System.Web...
Scanning System.Drawing...
Scanning System.Web.RegularExpressions...
Scanning MSCSCoreLib...
Scanning MSCSAspHelpLib...
Scanning Microsoft.CommerceServer.Interop.Configuration.MSCSCfg...
Scanning Microsoft.VisualBasic...
Scanning Accessibility...
Scanning System.Design...
Scanning System.Drawing.Design...
Scanning System.Messaging...
Scanning System.Security...
Scanning System.ServiceProcess...
Scanning System.Web.Services...
Scanning Microsoft.VisualBasic.Compatibility...
Scanning stdole...
Scanning ActiveDSLib...
Scanning Stdole2...
Scanning ADODB...
Scanning AdminLib...
Scanning Microsoft.CommerceServer.Messages...
Scanning MSCSAUTHLib...
Scanning CacheCompLib...
Scanning PipeCompLib...
Scanning CATALOGLib...
Scanning Microsoft.CommerceServer.Interop.Orders.Requisition...
Scanning GENIDLib...
Scanning PIPELINELib...
Scanning COMMERCELib...
Scanning MSCSUPSLib...
Scanning EXPRARCHLib...
Scanning CS_CtlgSets...
Scanning Microsoft.CommerceServer.Runtime.ShipMgr...
Scanning Microsoft.CommerceServer.Interop.Profiles.BizDataAdmin...
Scanning MSXMLLib...
Scanning MSDATASRC...
Scanning BDSECURITYLib...
Scanning Microsoft.CommerceServer.WebServicesCommon...
Request for the permission of type
System.Security.Permissions.StrongNameIdentityPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed.
Rolling back assembly 'c:\documents and settings\harrimanp.c2.001\my
documents\visual studio
projects\hgfulfillment\bin\debug\hgfulfillment.dll'.

RE: InstallUtil.exe Request for the permission of type System.Security.Permissions.StrongNameIdentityPermission mikehayt_ NO[at]SPAM online.microsoft.com
11/17/2004 6:10:03 PM
Hmmm - when EIF's ProjectInstaller runs it scans the assembly you pass in
and then starts following the referenced assemblies.
In this case it seems to end up scanning
Microsoft.CommerceServer.WebServicesCommon which contains a security demand
that "it can only be loaded by an assembly with the identity of mscorlib"

The EIF ProjectInstaller does two things
1. creates an EI.config (instead of you having to type it by hand)
2. registers EventLog sources with the Windows Event Log (this requires
powerUser permissions and while the logEventSink will try to create these
if missing, we try now as the person running installutil usually is a
powerUser).

As a workaround you should be able to use the
caspol -s off
to turn off this problem while you construct an EI.config file. Then revert
the change with
caspol -s on


In deployment, you shouldnt need to re-installutil your dll unless you want
to use the logEventSink and the process using hgfulfillment.dll doesnt have
permissions create the EventLog sources in the event log. Even if the last
two things are true, you could create your own little program using the
System.Diagnostics.EventLog class to create the eventLog entries instead of
the EIF project installer.


I hope this helps - I'll paste to the bottom of this a description of the
installers in EIF that also might be of interest

Cheers

Mike

Here's a bigger explaination of all the EIF installers from the thread
in this newsgroup "EIF - InstallUtil what exactly does it do?"
-----------


There's actually three installutils in EIF:
1) installutil-ing the instrumented app
2) installutil-ing the schema dll.
3) some installutil-ing goes on when you first install EIF.



1) installutil-ing the instrumented app
---------------------------------------------------

Yes, you can hand craft the EI.config file and not perform the installutil
on the instrumented application. The only action missing would be the
registration of the EventSources in the Windows Event Log (specifically no
calls to System.Diagnostics.EventLog.CreateEventSource() are made).

It should be noted that the LogEventSink will automatically call
EventLog.CreateEventSource() if needed when the instrumented application is
executed. The only problem is that sometimes apps (e.g. ASP.NET Web Apps)
dont have sufficient permissions to make this call. In this case, the
logEventSink fails to load for this EventSource, an error is output the
Windows Event Log (notifiying of the error) and events that would have been
output to the logEventSink are dropped.


2) installutil-ing the schema dll.
---------------------------------------------------

This second one performs the following actions:
a) checks that all the event Types are of valid structure (e.g. EIF doesnt
allow self reference cycles - such as a typical node in a linked list
structure)
b) delegates through to WMI.NET's
System.Management.Instrumentation.ManagementInstaller - This Installer
registers the structure of the events in WMI's CIM Repoisitory and allows
the events to be output through WMI.NET


3) some installutil-ing goes on when you install EIF.
---------------------------------------------------

I wont go into much detail here, but a quick summary:
a) The perf counter categories and counter names are setup.
b) The Windows Trace Session Manager (TSM) service is installed.
c) The TraceRequestStart/EndEvent (or something like that name) are
registered with WMI's repository.

Cheers

Mike


--

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
--------------------
|
| I am trying to InstallUtil.exe an assembly I have created. I cannot
| resolve this issue (excerpt from log):
|
| Creating an EnterpriseInstrumentation configuration file for this
| assembly and its referenced assemblies...
| Scanning HGFulfillment...
| Scanning Microsoft.EnterpriseInstrumentation...
| Microsoft.EnterpriseInstrumentation.EventSource.applicationEventSource
| Microsoft.EnterpriseInstrumentation.EventSource.Application
| Scanning System.Management...
| Scanning System.Configuration.Install...
| Scanning System.Runtime.Serialization.Formatters.Soap...
| Scanning Microsoft.JScript...
| Scanning Microsoft.Vsa...
| Scanning System.EnterpriseServices...
| Scanning Microsoft.VisualC...
| Scanning System.DirectoryServices...
| Scanning C2.Web.Commerce.Profiles...
| Scanning Microsoft.CommerceServer.Runtime...
| Scanning Microsoft.CommerceServer.Shared...
| Scanning System.Web...
| Scanning System.Drawing...
| Scanning System.Web.RegularExpressions...
| Scanning MSCSCoreLib...
| Scanning MSCSAspHelpLib...
| Scanning Microsoft.CommerceServer.Interop.Configuration.MSCSCfg...
| Scanning Microsoft.VisualBasic...
| Scanning Accessibility...
| Scanning System.Design...
| Scanning System.Drawing.Design...
| Scanning System.Messaging...
| Scanning System.Security...
| Scanning System.ServiceProcess...
| Scanning System.Web.Services...
| Scanning Microsoft.VisualBasic.Compatibility...
| Scanning stdole...
| Scanning ActiveDSLib...
| Scanning Stdole2...
| Scanning ADODB...
| Scanning AdminLib...
| Scanning Microsoft.CommerceServer.Messages...
| Scanning MSCSAUTHLib...
| Scanning CacheCompLib...
| Scanning PipeCompLib...
| Scanning CATALOGLib...
| Scanning Microsoft.CommerceServer.Interop.Orders.Requisition...
| Scanning GENIDLib...
| Scanning PIPELINELib...
| Scanning COMMERCELib...
| Scanning MSCSUPSLib...
| Scanning EXPRARCHLib...
| Scanning CS_CtlgSets...
| Scanning Microsoft.CommerceServer.Runtime.ShipMgr...
| Scanning Microsoft.CommerceServer.Interop.Profiles.BizDataAdmin...
| Scanning MSXMLLib...
| Scanning MSDATASRC...
| Scanning BDSECURITYLib...
| Scanning Microsoft.CommerceServer.WebServicesCommon...
| Request for the permission of type
| System.Security.Permissions.StrongNameIdentityPermission, mscorlib,
| Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
| failed.
| Rolling back assembly 'c:\documents and settings\harrimanp.c2.001\my
| documents\visual studio
| projects\hgfulfillment\bin\debug\hgfulfillment.dll'.
|
| I am using VS.Net 2003 on Win 2003.
|
AddThis Social Bookmark Button