473,704 Members | 6,357 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unable to install .Net Assembly in Windows 2003 Web Edition.

I have a ASP.Net web application that has two assemblies that run
under com+. Under Windows 2000 the two assemblies are added to com+
automatically when instantiated from the web site. For this to happen
we had to change the context in which asp.net runs from machine to
SYSTEM by modifying the machine.config file. Under Windows 2003 no
matter how asp.net is set to run as either machine or system. I get
the following error:

System.Reflecti on.ReflectionTy peLoadException : One or more of the
types in the assembly unable to load.

and this stack trace.

ReflectionTypeL oadException: One or more of the types in the assembly
unable to load.]
System.Runtime. Remoting.Proxie s.RealProxy.Han dleReturnMessag e(IMessage
reqMsg, IMessage retMsg) +264
System.Runtime. Remoting.Proxie s.RealProxy.Pri vateInvoke(Mess ageData&
msgData, Int32 type) +877
System.Enterpri seServices.Regi strationHelperT x.InstallAssemb lyFromConfig(Re gistrationConfi g&
regConfig, Object sync) +0

System.Enterpri seServices.Regi strationHelper. TryTransactedIn stall(Registrat ionConfig
regConfig) +215
System.Enterpri seServices.Regi strationHelper. InstallAssembly FromConfig(Regi strationConfig&
regConfig) +241
System.Enterpri seServices.Regi strationHelper. InstallAssembly (String
assembly, String& application, String partition, String& tlb,
InstallationFla gs installFlags) +116

System.Enterpri seServices.Regi strationHelper. InstallAssembly (String
assembly, String& application, String& tlb, InstallationFla gs
installFlags) +19

System.Enterpri seServices.Regi strationHelper. System.Enterpri seServices.Thun k.IThunkInstall ation.DefaultIn stall(String
asm) +43

System.Enterpri seServices.Thun k.Proxy.Registe rAssembly(Assem bly
assembly) +95
System.Enterpri seServices.Thun k.Proxy.LazyReg ister(Guid id, Type
serverType, Boolean checkCache) +188
System.Enterpri seServices.Thun k.Proxy.CoCreat eObject(Type
serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProce ss, String&
uri) +227

System.Enterpri seServices.Serv icedComponentPr oxyAttribute.Cr eateInstance(Ty pe
serverType) +181
System.Runtime. Remoting.Activa tion.Activation Services.IsCurr entContextOK(Ty pe
serverType, Object[] props, Boolean bNewObj) +74

ExtendAg.Web.Ut ilities.LoginUt ils._getContext Xml(String userId,
String password, TraceLevel tracingLevel, String supportedCultur e,
String sessionId) in
C:\Projects\EXT ENDAG\SourceCod e2\Web\ExtendAg WebComponents\s rc\LoginUtils.c s:55

ExtendAg.Web.Ut ilities.LoginUt ils.GetContext( String userId, String
password, TraceLevel tracingLevel, String supportedCultur e, String
sessionId, Boolean& bAcceptedEula, Boolean& bPasswordReset, Boolean&
bIsExtendAgAcco unt) in
C:\Projects\EXT ENDAG\SourceCod e2\Web\ExtendAg WebComponents\s rc\LoginUtils.c s:78

ExtendAg.Web.Ut ilities.LoginUt ils.Authenticat e(String userId,
String password, HttpSessionStat e s, String filePath, TraceLevel
tracingLevel, String supportedCultur e) in
C:\Projects\EXT ENDAG\SourceCod e2\Web\ExtendAg WebComponents\s rc\LoginUtils.c s:113

ExtendAg.Web.Pu blic.Controls.S ignIn.SigninBtn _Click(Object sender,
EventArgs e) in C:\Projects\ext endag\SourceCod e2\Web\ExtendAg Web\Public\Cont rols\SignIn.asc x.cs:142

System.Web.UI.W ebControls.Link Button.OnClick( EventArgs e) +108
System.Web.UI.W ebControls.Link Button.System.W eb.UI.IPostBack EventHandler.Ra isePostBackEven t(String
eventArgument) +57

System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData)
+138
System.Web.UI.P age.ProcessRequ estMain() +1277

The next thing I tried to do was to add the assemblies to com+
manually. I did this two different ways. The first was to use the
com+ mmc and create a new application and then add the components.
One of the assemblies install just fine, but the second one which is
called datalayer.dll gives me this error:

An error occurred while processing the last operation.
Error code 80131602.
The event log may contain additional troubleshooting information.

Event log has the following message:

Installation of 'C:\Xag\ExtendA gWeb\bin\DataLa yer.dll' into
'{03264527-2A73-49FE-BAEF-0EBAE663E01F}' failed with an exception:

System.Reflecti on.ReflectionTy peLoadException : One or more of the
types in the assembly unable to load.

Server stack trace:
at System.Reflecti on.Module.GetTy pesInternal(Sta ckCrawlMark&
stackMark)
at System.Reflecti on.Assembly.Get Types()
at System.Enterpri seServices.Regi strationDriver. CheckAssemblySC Validity(Assemb ly
asm)
at System.Enterpri seServices.Regi strationDriver. NewLoadAssembly (String
assembly)
at System.Enterpri seServices.Regi strationDriver. InstallAssembly (RegistrationCo nfig
regConfig, Object obSync)
at System.Enterpri seServices.Regi strationHelperT x.InstallAssemb lyFromConfig(Re gistrationConfi g&
regConfig, Object sync)

at System.Runtime. Remoting.Messag ing.Message.Dis patch(Object
target, Boolean fExecuteInConte xt)
at System.Runtime. Remoting.Messag ing.StackBuilde rSink.SyncProce ssMessage(IMess age
msg, Int32 methodPtr, Boolean fExecuteInConte xt)

Exception rethrown at [0]:
at System.Runtime. Remoting.Proxie s.RealProxy.Han dleReturnMessag e(IMessage
reqMsg, IMessage retMsg)
at System.Runtime. Remoting.Proxie s.RealProxy.Pri vateInvoke(Mess ageData&
msgData, Int32 type)
at System.Enterpri seServices.Regi strationHelperT x.InstallAssemb lyFromConfig(Re gistrationConfi g&
regConfig, Object sync)

at System.Enterpri seServices.Regi strationHelper. TryTransactedIn stall(Registrat ionConfig
regConfig)
at System.Enterpri seServices.Regi strationHelper. InstallAssembly FromConfig(Regi strationConfig&
regConfig)
at System.Enterpri seServices.Regi strationHelper. InstallAssembly (String
assembly, String& application, String partition, String& tlb,
InstallationFla gs installFlags)

at System.Enterpri seServices.Inte rnal.ComManaged ImportUtil.Inst allAssembly(Str ing
asmpath, String parname, String appname)

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

The second way I tried to add the components to com+ was by using
regsvcs.exe. I used the following command:

regsvcs /appname:ExtendA g datalayer.dll.

Which returns the following error.

An unknown exception occurred during installation:
1: System.Runtime. Serialization.S erializationExc eption - Insufficient
state to deserialize the object. More information is needed.

I installed Visual Studio .Net 2003 and I am able to build
datalayer.dll. I tried using this dll and got the same exact results
as above. The error messages purports that there is an assembly it
cannot find, I have gone through the dependencies for datalayer.dll
and all required assemblies are installed. I have also used ntfilemon
and ntregmon to monitor activity and see if there was something
missing or permission problem. I found nothing out of the ordinary.
However, when I try to access the app and get the error message:

System.Reflecti on.ReflectionTy peLoadException : One or more of the
types in the assembly unable to load.

If I hit F5 and repost the data I get

System.Unauthor izedAccessExcep tion: Access to the registry key
HKEY_CLASSES_RO OT\ExtendAg.Obj ects.HashtableR equired is denied.

with this stack trace.

UnauthorizedAcc essException: Access to the registry key
HKEY_CLASSES_RO OT\ExtendAg.Obj ects.HashtableR equired is denied.]

Microsoft.Win32 .RegistryKey.Wi n32Error(Int32 errorCode, String str)
+74
Microsoft.Win32 .RegistryKey.Cr eateSubKey(Stri ng subkey) +503
System.Runtime. InteropServices .RegistrationSe rvices.Register ManagedType(Typ e
type, String strAsmName, String strAsmVersion, String strAsmCodeBase,
String strRuntimeVersi on) +213

System.Runtime. InteropServices .RegistrationSe rvices.Register Assembly(Assemb ly
assembly, AssemblyRegistr ationFlags flags) +261

System.Enterpri seServices.Regi strationDriver. ClassicRegistra tion(Assembly
asm) +100

[RegistrationExc eption: Failed to register assembly 'DataLayer,
Version=1.1.140 2.28709, Culture=neutral ,
PublicKeyToken= 70025df6990ea3c 3'.]

System.Runtime. Remoting.Proxie s.RealProxy.Han dleReturnMessag e(IMessage
reqMsg, IMessage retMsg) +264
System.Runtime. Remoting.Proxie s.RealProxy.Pri vateInvoke(Mess ageData&
msgData, Int32 type) +877
System.Enterpri seServices.Regi strationHelperT x.InstallAssemb lyFromConfig(Re gistrationConfi g&
regConfig, Object sync) +0

System.Enterpri seServices.Regi strationHelper. TryTransactedIn stall(Registrat ionConfig
regConfig) +215
System.Enterpri seServices.Regi strationHelper. InstallAssembly FromConfig(Regi strationConfig&
regConfig) +241
System.Enterpri seServices.Regi strationHelper. InstallAssembly (String
assembly, String& application, String partition, String& tlb,
InstallationFla gs installFlags) +116

System.Enterpri seServices.Regi strationHelper. InstallAssembly (String
assembly, String& application, String& tlb, InstallationFla gs
installFlags) +19

System.Enterpri seServices.Regi strationHelper. System.Enterpri seServices.Thun k.IThunkInstall ation.DefaultIn stall(String
asm) +43

System.Enterpri seServices.Thun k.Proxy.Registe rAssembly(Assem bly
assembly) +95
System.Enterpri seServices.Thun k.Proxy.LazyReg ister(Guid id, Type
serverType, Boolean checkCache) +188
System.Enterpri seServices.Thun k.Proxy.CoCreat eObject(Type
serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProce ss, String&
uri) +227

System.Enterpri seServices.Serv icedComponentPr oxyAttribute.Cr eateInstance(Ty pe
serverType) +181
System.Runtime. Remoting.Activa tion.Activation Services.IsCurr entContextOK(Ty pe
serverType, Object[] props, Boolean bNewObj) +74

ExtendAg.Web.Ut ilities.LoginUt ils._getContext Xml(String userId,
String password, TraceLevel tracingLevel, String supportedCultur e,
String sessionId) in
C:\Projects\EXT ENDAG\SourceCod e2\Web\ExtendAg WebComponents\s rc\LoginUtils.c s:55

ExtendAg.Web.Ut ilities.LoginUt ils.GetContext( String userId, String
password, TraceLevel tracingLevel, String supportedCultur e, String
sessionId, Boolean& bAcceptedEula, Boolean& bPasswordReset, Boolean&
bIsExtendAgAcco unt) in
C:\Projects\EXT ENDAG\SourceCod e2\Web\ExtendAg WebComponents\s rc\LoginUtils.c s:78

ExtendAg.Web.Ut ilities.LoginUt ils.Authenticat e(String userId,
String password, HttpSessionStat e s, String filePath, TraceLevel
tracingLevel, String supportedCultur e) in
C:\Projects\EXT ENDAG\SourceCod e2\Web\ExtendAg WebComponents\s rc\LoginUtils.c s:113

ExtendAg.Web.Pu blic.Controls.S ignIn.SigninBtn _Click(Object sender,
EventArgs e) in C:\Projects\ext endag\SourceCod e2\Web\ExtendAg Web\Public\Cont rols\SignIn.asc x.cs:142

System.Web.UI.W ebControls.Link Button.OnClick( EventArgs e) +108
System.Web.UI.W ebControls.Link Button.System.W eb.UI.IPostBack EventHandler.Ra isePostBackEven t(String
eventArgument) +58

System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData)
+138
System.Web.UI.P age.ProcessRequ estMain() +1277

This is the error message we got under windows 2000 and the asp.net
was set to run as machine instead of system. However, as I've stated
before changing this in windows 2003 makes no difference.

If someone out there has come across this or can help me figure it out
I would be much obliged. Thanks.
Jul 21 '05 #1
2 6402
The stack trace indicates the app is trying to auto-register your COM+ app.
This requires admin rights on the machine which ASP.NET does not (should
not) have, regardless whether you run as machine or system.
You should manually install the COM+ app (serviced component), probably
using regsvcs.exe .

Auto-registration of serviced components into COM+ is primarily a
convenience feature for devevelopment time.
For more on this, check out
http://msdn.microsoft.com/library/en...ml/entserv.asp
particularly the section on Deployment.

-Dino
"Carlos G Benevides" <tr********@hot mail.com> wrote in message
news:a1******** *************** ***@posting.goo gle.com...
I have a ASP.Net web application that has two assemblies that run
under com+. Under Windows 2000 the two assemblies are added to com+
automatically when instantiated from the web site. For this to happen
we had to change the context in which asp.net runs from machine to
SYSTEM by modifying the machine.config file. Under Windows 2003 no
matter how asp.net is set to run as either machine or system. I get
the following error:

System.Reflecti on.ReflectionTy peLoadException : One or more of the
types in the assembly unable to load.

and this stack trace.

ReflectionTypeL oadException: One or more of the types in the assembly
unable to load.]
System.Runtime. Remoting.Proxie s.RealProxy.Han dleReturnMessag e(IMessage
reqMsg, IMessage retMsg) +264
System.Runtime. Remoting.Proxie s.RealProxy.Pri vateInvoke(Mess ageData&
msgData, Int32 type) +877
System.Enterpri seServices.Regi strationHelperT x.InstallAssemb lyFromConfig(Re g
istrationConfig & regConfig, Object sync) +0

System.Enterpri seServices.Regi strationHelper. TryTransactedIn stall(Registrat i
onConfig regConfig) +215
System.Enterpri seServices.Regi strationHelper. InstallAssembly FromConfig(Regi s
trationConfig& regConfig) +241
System.Enterpri seServices.Regi strationHelper. InstallAssembly (String
assembly, String& application, String partition, String& tlb,
InstallationFla gs installFlags) +116

System.Enterpri seServices.Regi strationHelper. InstallAssembly (String
assembly, String& application, String& tlb, InstallationFla gs
installFlags) +19

System.Enterpri seServices.Regi strationHelper. System.Enterpri seServices.Thun k
..IThunkInstall ation.DefaultIn stall(String asm) +43

System.Enterpri seServices.Thun k.Proxy.Registe rAssembly(Assem bly
assembly) +95
System.Enterpri seServices.Thun k.Proxy.LazyReg ister(Guid id, Type
serverType, Boolean checkCache) +188
System.Enterpri seServices.Thun k.Proxy.CoCreat eObject(Type
serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProce ss, String&
uri) +227

System.Enterpri seServices.Serv icedComponentPr oxyAttribute.Cr eateInstance(Ty p
e serverType) +181
System.Runtime. Remoting.Activa tion.Activation Services.IsCurr entContextOK(Ty p
e serverType, Object[] props, Boolean bNewObj) +74

ExtendAg.Web.Ut ilities.LoginUt ils._getContext Xml(String userId,
String password, TraceLevel tracingLevel, String supportedCultur e,
String sessionId) in
C:\Projects\EXT ENDAG\SourceCod e2\Web\ExtendAg WebComponents\s rc\LoginUtils.c s
:55
ExtendAg.Web.Ut ilities.LoginUt ils.GetContext( String userId, String
password, TraceLevel tracingLevel, String supportedCultur e, String
sessionId, Boolean& bAcceptedEula, Boolean& bPasswordReset, Boolean&
bIsExtendAgAcco unt) in
C:\Projects\EXT ENDAG\SourceCod e2\Web\ExtendAg WebComponents\s rc\LoginUtils.c s
:78
ExtendAg.Web.Ut ilities.LoginUt ils.Authenticat e(String userId,
String password, HttpSessionStat e s, String filePath, TraceLevel
tracingLevel, String supportedCultur e) in
C:\Projects\EXT ENDAG\SourceCod e2\Web\ExtendAg WebComponents\s rc\LoginUtils.c s
:113
ExtendAg.Web.Pu blic.Controls.S ignIn.SigninBtn _Click(Object sender,
EventArgs e) in C:\Projects\ext endag\SourceCod e2\Web\ExtendAg Web\Public\Cont rols\SignIn.asc x
..cs:142
System.Web.UI.W ebControls.Link Button.OnClick( EventArgs e) +108
System.Web.UI.W ebControls.Link Button.System.W eb.UI.IPostBack EventHandler.Ra i
sePostBackEvent (String eventArgument) +57

System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData)
+138
System.Web.UI.P age.ProcessRequ estMain() +1277

The next thing I tried to do was to add the assemblies to com+
manually. I did this two different ways. The first was to use the
com+ mmc and create a new application and then add the components.
One of the assemblies install just fine, but the second one which is
called datalayer.dll gives me this error:

An error occurred while processing the last operation.
Error code 80131602.
The event log may contain additional troubleshooting information.

Event log has the following message:

Installation of 'C:\Xag\ExtendA gWeb\bin\DataLa yer.dll' into
'{03264527-2A73-49FE-BAEF-0EBAE663E01F}' failed with an exception:

System.Reflecti on.ReflectionTy peLoadException : One or more of the
types in the assembly unable to load.

Server stack trace:
at System.Reflecti on.Module.GetTy pesInternal(Sta ckCrawlMark&
stackMark)
at System.Reflecti on.Assembly.Get Types()
at System.Enterpri seServices.Regi strationDriver. CheckAssemblySC Validity(Assemb l
y asm)
at System.Enterpri seServices.Regi strationDriver. NewLoadAssembly (String
assembly)
at System.Enterpri seServices.Regi strationDriver. InstallAssembly (RegistrationCo n
fig regConfig, Object obSync)
at System.Enterpri seServices.Regi strationHelperT x.InstallAssemb lyFromConfig(Re g
istrationConfig & regConfig, Object sync)

at System.Runtime. Remoting.Messag ing.Message.Dis patch(Object
target, Boolean fExecuteInConte xt)
at System.Runtime. Remoting.Messag ing.StackBuilde rSink.SyncProce ssMessage(IMess a
ge msg, Int32 methodPtr, Boolean fExecuteInConte xt)

Exception rethrown at [0]:
at System.Runtime. Remoting.Proxie s.RealProxy.Han dleReturnMessag e(IMessage reqMsg, IMessage retMsg)
at System.Runtime. Remoting.Proxie s.RealProxy.Pri vateInvoke(Mess ageData&
msgData, Int32 type)
at System.Enterpri seServices.Regi strationHelperT x.InstallAssemb lyFromConfig(Re g
istrationConfig & regConfig, Object sync)

at System.Enterpri seServices.Regi strationHelper. TryTransactedIn stall(Registrat i
onConfig regConfig)
at System.Enterpri seServices.Regi strationHelper. InstallAssembly FromConfig(Regi s
trationConfig& regConfig)
at System.Enterpri seServices.Regi strationHelper. InstallAssembly (String
assembly, String& application, String partition, String& tlb,
InstallationFla gs installFlags)

at System.Enterpri seServices.Inte rnal.ComManaged ImportUtil.Inst allAssembly(Str i
ng asmpath, String parname, String appname)

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

The second way I tried to add the components to com+ was by using
regsvcs.exe. I used the following command:

regsvcs /appname:ExtendA g datalayer.dll.

Which returns the following error.

An unknown exception occurred during installation:
1: System.Runtime. Serialization.S erializationExc eption - Insufficient
state to deserialize the object. More information is needed.

I installed Visual Studio .Net 2003 and I am able to build
datalayer.dll. I tried using this dll and got the same exact results
as above. The error messages purports that there is an assembly it
cannot find, I have gone through the dependencies for datalayer.dll
and all required assemblies are installed. I have also used ntfilemon
and ntregmon to monitor activity and see if there was something
missing or permission problem. I found nothing out of the ordinary.
However, when I try to access the app and get the error message:

System.Reflecti on.ReflectionTy peLoadException : One or more of the
types in the assembly unable to load.

If I hit F5 and repost the data I get

System.Unauthor izedAccessExcep tion: Access to the registry key
HKEY_CLASSES_RO OT\ExtendAg.Obj ects.HashtableR equired is denied.

with this stack trace.

UnauthorizedAcc essException: Access to the registry key
HKEY_CLASSES_RO OT\ExtendAg.Obj ects.HashtableR equired is denied.]

Microsoft.Win32 .RegistryKey.Wi n32Error(Int32 errorCode, String str)
+74
Microsoft.Win32 .RegistryKey.Cr eateSubKey(Stri ng subkey) +503
System.Runtime. InteropServices .RegistrationSe rvices.Register ManagedType(Typ e type, String strAsmName, String strAsmVersion, String strAsmCodeBase,
String strRuntimeVersi on) +213

System.Runtime. InteropServices .RegistrationSe rvices.Register Assembly(Assemb l
y assembly, AssemblyRegistr ationFlags flags) +261

System.Enterpri seServices.Regi strationDriver. ClassicRegistra tion(Assembly asm) +100

[RegistrationExc eption: Failed to register assembly 'DataLayer,
Version=1.1.140 2.28709, Culture=neutral ,
PublicKeyToken= 70025df6990ea3c 3'.]

System.Runtime. Remoting.Proxie s.RealProxy.Han dleReturnMessag e(IMessage
reqMsg, IMessage retMsg) +264
System.Runtime. Remoting.Proxie s.RealProxy.Pri vateInvoke(Mess ageData&
msgData, Int32 type) +877
System.Enterpri seServices.Regi strationHelperT x.InstallAssemb lyFromConfig(Re g
istrationConfig & regConfig, Object sync) +0

System.Enterpri seServices.Regi strationHelper. TryTransactedIn stall(Registrat i
onConfig regConfig) +215
System.Enterpri seServices.Regi strationHelper. InstallAssembly FromConfig(Regi s
trationConfig& regConfig) +241
System.Enterpri seServices.Regi strationHelper. InstallAssembly (String
assembly, String& application, String partition, String& tlb,
InstallationFla gs installFlags) +116

System.Enterpri seServices.Regi strationHelper. InstallAssembly (String
assembly, String& application, String& tlb, InstallationFla gs
installFlags) +19

System.Enterpri seServices.Regi strationHelper. System.Enterpri seServices.Thun k
..IThunkInstall ation.DefaultIn stall(String asm) +43

System.Enterpri seServices.Thun k.Proxy.Registe rAssembly(Assem bly
assembly) +95
System.Enterpri seServices.Thun k.Proxy.LazyReg ister(Guid id, Type
serverType, Boolean checkCache) +188
System.Enterpri seServices.Thun k.Proxy.CoCreat eObject(Type
serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProce ss, String&
uri) +227

System.Enterpri seServices.Serv icedComponentPr oxyAttribute.Cr eateInstance(Ty p
e serverType) +181
System.Runtime. Remoting.Activa tion.Activation Services.IsCurr entContextOK(Ty p
e serverType, Object[] props, Boolean bNewObj) +74

ExtendAg.Web.Ut ilities.LoginUt ils._getContext Xml(String userId,
String password, TraceLevel tracingLevel, String supportedCultur e,
String sessionId) in
C:\Projects\EXT ENDAG\SourceCod e2\Web\ExtendAg WebComponents\s rc\LoginUtils.c s
:55
ExtendAg.Web.Ut ilities.LoginUt ils.GetContext( String userId, String
password, TraceLevel tracingLevel, String supportedCultur e, String
sessionId, Boolean& bAcceptedEula, Boolean& bPasswordReset, Boolean&
bIsExtendAgAcco unt) in
C:\Projects\EXT ENDAG\SourceCod e2\Web\ExtendAg WebComponents\s rc\LoginUtils.c s
:78
ExtendAg.Web.Ut ilities.LoginUt ils.Authenticat e(String userId,
String password, HttpSessionStat e s, String filePath, TraceLevel
tracingLevel, String supportedCultur e) in
C:\Projects\EXT ENDAG\SourceCod e2\Web\ExtendAg WebComponents\s rc\LoginUtils.c s
:113
ExtendAg.Web.Pu blic.Controls.S ignIn.SigninBtn _Click(Object sender,
EventArgs e) in C:\Projects\ext endag\SourceCod e2\Web\ExtendAg Web\Public\Cont rols\SignIn.asc x
..cs:142
System.Web.UI.W ebControls.Link Button.OnClick( EventArgs e) +108
System.Web.UI.W ebControls.Link Button.System.W eb.UI.IPostBack EventHandler.Ra i
sePostBackEvent (String eventArgument) +58

System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData)
+138
System.Web.UI.P age.ProcessRequ estMain() +1277

This is the error message we got under windows 2000 and the asp.net
was set to run as machine instead of system. However, as I've stated
before changing this in windows 2003 makes no difference.

If someone out there has come across this or can help me figure it out
I would be much obliged. Thanks.

Jul 21 '05 #2
Dino, if you keep reading my post you'll see that I have tried to
register the component manually using regsvcs and the com+ mmc.
However, it also does not work. I posted the stack trace from the web
application to explain how I got around this issue on Windows 2000. I
posted the stack trace from the command line regsvcs as well as the
mmc error message. You'll see that the message posted in eventviewer
is identical to the one output by the web app when trying to auto
register the component. The error messaged output by the regsvcs tool
is more ambiguous, and I am not sure it it's displaying the correct
error message.

If this is a permissions issue I would like to know how exactly I need
to register the component. Because I have tried all the means I know
how. Thanks.

"Dino Chiesa [Microsoft]" <di****@online. microsoft.com> wrote in message news:<eG******* *******@TK2MSFT NGP10.phx.gbl>. ..
The stack trace indicates the app is trying to auto-register your COM+ app.
This requires admin rights on the machine which ASP.NET does not (should
not) have, regardless whether you run as machine or system.
You should manually install the COM+ app (serviced component), probably
using regsvcs.exe .

Auto-registration of serviced components into COM+ is primarily a
convenience feature for devevelopment time.
For more on this, check out
http://msdn.microsoft.com/library/en...ml/entserv.asp
particularly the section on Deployment.

-Dino
"Carlos G Benevides" <tr********@hot mail.com> wrote in message
news:a1******** *************** ***@posting.goo gle.com...
I have a ASP.Net web application that has two assemblies that run
under com+. Under Windows 2000 the two assemblies are added to com+
automatically when instantiated from the web site. For this to happen
we had to change the context in which asp.net runs from machine to
SYSTEM by modifying the machine.config file. Under Windows 2003 no
matter how asp.net is set to run as either machine or system. I get
the following error:

System.Reflecti on.ReflectionTy peLoadException : One or more of the
types in the assembly unable to load.

and this stack trace.

ReflectionTypeL oadException: One or more of the types in the assembly
unable to load.]
System.Runtime. Remoting.Proxie s.RealProxy.Han dleReturnMessag e(IMessage
reqMsg, IMessage retMsg) +264
System.Runtime. Remoting.Proxie s.RealProxy.Pri vateInvoke(Mess ageData&
msgData, Int32 type) +877

System.Enterpri seServices.Regi strationHelperT x.InstallAssemb lyFromConfig(Re g
istrationConfig &
regConfig, Object sync) +0

System.Enterpri seServices.Regi strationHelper. TryTransactedIn stall(Registrat i
onConfig
regConfig) +215

System.Enterpri seServices.Regi strationHelper. InstallAssembly FromConfig(Regi s
trationConfig&
regConfig) +241
System.Enterpri seServices.Regi strationHelper. InstallAssembly (String
assembly, String& application, String partition, String& tlb,
InstallationFla gs installFlags) +116

System.Enterpri seServices.Regi strationHelper. InstallAssembly (String
assembly, String& application, String& tlb, InstallationFla gs
installFlags) +19

System.Enterpri seServices.Regi strationHelper. System.Enterpri seServices.Thun k
.IThunkInstalla tion.DefaultIns tall(String
asm) +43

System.Enterpri seServices.Thun k.Proxy.Registe rAssembly(Assem bly
assembly) +95
System.Enterpri seServices.Thun k.Proxy.LazyReg ister(Guid id, Type
serverType, Boolean checkCache) +188
System.Enterpri seServices.Thun k.Proxy.CoCreat eObject(Type
serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProce ss, String&
uri) +227

System.Enterpri seServices.Serv icedComponentPr oxyAttribute.Cr eateInstance(Ty p
e
serverType) +181

System.Runtime. Remoting.Activa tion.Activation Services.IsCurr entContextOK(Ty p
e
serverType, Object[] props, Boolean bNewObj) +74

ExtendAg.Web.Ut ilities.LoginUt ils._getContext Xml(String userId,
String password, TraceLevel tracingLevel, String supportedCultur e,
String sessionId) in

C:\Projects\EXT ENDAG\SourceCod e2\Web\ExtendAg WebComponents\s rc\LoginUtils.c s
:55

ExtendAg.Web.Ut ilities.LoginUt ils.GetContext( String userId, String
password, TraceLevel tracingLevel, String supportedCultur e, String
sessionId, Boolean& bAcceptedEula, Boolean& bPasswordReset, Boolean&
bIsExtendAgAcco unt) in

C:\Projects\EXT ENDAG\SourceCod e2\Web\ExtendAg WebComponents\s rc\LoginUtils.c s
:78

ExtendAg.Web.Ut ilities.LoginUt ils.Authenticat e(String userId,
String password, HttpSessionStat e s, String filePath, TraceLevel
tracingLevel, String supportedCultur e) in

C:\Projects\EXT ENDAG\SourceCod e2\Web\ExtendAg WebComponents\s rc\LoginUtils.c s
:113

ExtendAg.Web.Pu blic.Controls.S ignIn.SigninBtn _Click(Object sender,
EventArgs e) in

C:\Projects\ext endag\SourceCod e2\Web\ExtendAg Web\Public\Cont rols\SignIn.asc x
.cs:142

System.Web.UI.W ebControls.Link Button.OnClick( EventArgs e) +108

System.Web.UI.W ebControls.Link Button.System.W eb.UI.IPostBack EventHandler.Ra i
sePostBackEvent (String
eventArgument) +57

System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData)
+138
System.Web.UI.P age.ProcessRequ estMain() +1277

The next thing I tried to do was to add the assemblies to com+
manually. I did this two different ways. The first was to use the
com+ mmc and create a new application and then add the components.
One of the assemblies install just fine, but the second one which is
called datalayer.dll gives me this error:

An error occurred while processing the last operation.
Error code 80131602.
The event log may contain additional troubleshooting information.

Event log has the following message:

Installation of 'C:\Xag\ExtendA gWeb\bin\DataLa yer.dll' into
'{03264527-2A73-49FE-BAEF-0EBAE663E01F}' failed with an exception:

System.Reflecti on.ReflectionTy peLoadException : One or more of the
types in the assembly unable to load.

Server stack trace:
at System.Reflecti on.Module.GetTy pesInternal(Sta ckCrawlMark&
stackMark)
at System.Reflecti on.Assembly.Get Types()
at

System.Enterpri seServices.Regi strationDriver. CheckAssemblySC Validity(Assemb l
y
asm)
at System.Enterpri seServices.Regi strationDriver. NewLoadAssembly (String
assembly)
at

System.Enterpri seServices.Regi strationDriver. InstallAssembly (RegistrationCo n
fig
regConfig, Object obSync)
at

System.Enterpri seServices.Regi strationHelperT x.InstallAssemb lyFromConfig(Re g
istrationConfig &
regConfig, Object sync)

at System.Runtime. Remoting.Messag ing.Message.Dis patch(Object
target, Boolean fExecuteInConte xt)
at

System.Runtime. Remoting.Messag ing.StackBuilde rSink.SyncProce ssMessage(IMess a
ge
msg, Int32 methodPtr, Boolean fExecuteInConte xt)

Exception rethrown at [0]:
at

System.Runtime. Remoting.Proxie s.RealProxy.Han dleReturnMessag e(IMessage
reqMsg, IMessage retMsg)
at System.Runtime. Remoting.Proxie s.RealProxy.Pri vateInvoke(Mess ageData&
msgData, Int32 type)
at

System.Enterpri seServices.Regi strationHelperT x.InstallAssemb lyFromConfig(Re g
istrationConfig &
regConfig, Object sync)

at

System.Enterpri seServices.Regi strationHelper. TryTransactedIn stall(Registrat i
onConfig
regConfig)
at

System.Enterpri seServices.Regi strationHelper. InstallAssembly FromConfig(Regi s
trationConfig&
regConfig)
at System.Enterpri seServices.Regi strationHelper. InstallAssembly (String
assembly, String& application, String partition, String& tlb,
InstallationFla gs installFlags)

at

System.Enterpri seServices.Inte rnal.ComManaged ImportUtil.Inst allAssembly(Str i
ng
asmpath, String parname, String appname)

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

The second way I tried to add the components to com+ was by using
regsvcs.exe. I used the following command:

regsvcs /appname:ExtendA g datalayer.dll.

Which returns the following error.

An unknown exception occurred during installation:
1: System.Runtime. Serialization.S erializationExc eption - Insufficient
state to deserialize the object. More information is needed.

I installed Visual Studio .Net 2003 and I am able to build
datalayer.dll. I tried using this dll and got the same exact results
as above. The error messages purports that there is an assembly it
cannot find, I have gone through the dependencies for datalayer.dll
and all required assemblies are installed. I have also used ntfilemon
and ntregmon to monitor activity and see if there was something
missing or permission problem. I found nothing out of the ordinary.
However, when I try to access the app and get the error message:

System.Reflecti on.ReflectionTy peLoadException : One or more of the
types in the assembly unable to load.

If I hit F5 and repost the data I get

System.Unauthor izedAccessExcep tion: Access to the registry key
HKEY_CLASSES_RO OT\ExtendAg.Obj ects.HashtableR equired is denied.

with this stack trace.

UnauthorizedAcc essException: Access to the registry key
HKEY_CLASSES_RO OT\ExtendAg.Obj ects.HashtableR equired is denied.]

Microsoft.Win32 .RegistryKey.Wi n32Error(Int32 errorCode, String str)
+74
Microsoft.Win32 .RegistryKey.Cr eateSubKey(Stri ng subkey) +503

System.Runtime. InteropServices .RegistrationSe rvices.Register ManagedType(Typ e
type, String strAsmName, String strAsmVersion, String strAsmCodeBase,
String strRuntimeVersi on) +213

System.Runtime. InteropServices .RegistrationSe rvices.Register Assembly(Assemb l
y
assembly, AssemblyRegistr ationFlags flags) +261

System.Enterpri seServices.Regi strationDriver. ClassicRegistra tion(Assembly
asm) +100

[RegistrationExc eption: Failed to register assembly 'DataLayer,
Version=1.1.140 2.28709, Culture=neutral ,
PublicKeyToken= 70025df6990ea3c 3'.]

System.Runtime. Remoting.Proxie s.RealProxy.Han dleReturnMessag e(IMessage
reqMsg, IMessage retMsg) +264
System.Runtime. Remoting.Proxie s.RealProxy.Pri vateInvoke(Mess ageData&
msgData, Int32 type) +877

System.Enterpri seServices.Regi strationHelperT x.InstallAssemb lyFromConfig(Re g
istrationConfig &
regConfig, Object sync) +0

System.Enterpri seServices.Regi strationHelper. TryTransactedIn stall(Registrat i
onConfig
regConfig) +215

System.Enterpri seServices.Regi strationHelper. InstallAssembly FromConfig(Regi s
trationConfig&
regConfig) +241
System.Enterpri seServices.Regi strationHelper. InstallAssembly (String
assembly, String& application, String partition, String& tlb,
InstallationFla gs installFlags) +116

System.Enterpri seServices.Regi strationHelper. InstallAssembly (String
assembly, String& application, String& tlb, InstallationFla gs
installFlags) +19

System.Enterpri seServices.Regi strationHelper. System.Enterpri seServices.Thun k
.IThunkInstalla tion.DefaultIns tall(String
asm) +43

System.Enterpri seServices.Thun k.Proxy.Registe rAssembly(Assem bly
assembly) +95
System.Enterpri seServices.Thun k.Proxy.LazyReg ister(Guid id, Type
serverType, Boolean checkCache) +188
System.Enterpri seServices.Thun k.Proxy.CoCreat eObject(Type
serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProce ss, String&
uri) +227

System.Enterpri seServices.Serv icedComponentPr oxyAttribute.Cr eateInstance(Ty p
e
serverType) +181

System.Runtime. Remoting.Activa tion.Activation Services.IsCurr entContextOK(Ty p
e
serverType, Object[] props, Boolean bNewObj) +74

ExtendAg.Web.Ut ilities.LoginUt ils._getContext Xml(String userId,
String password, TraceLevel tracingLevel, String supportedCultur e,
String sessionId) in

C:\Projects\EXT ENDAG\SourceCod e2\Web\ExtendAg WebComponents\s rc\LoginUtils.c s
:55

ExtendAg.Web.Ut ilities.LoginUt ils.GetContext( String userId, String
password, TraceLevel tracingLevel, String supportedCultur e, String
sessionId, Boolean& bAcceptedEula, Boolean& bPasswordReset, Boolean&
bIsExtendAgAcco unt) in

C:\Projects\EXT ENDAG\SourceCod e2\Web\ExtendAg WebComponents\s rc\LoginUtils.c s
:78

ExtendAg.Web.Ut ilities.LoginUt ils.Authenticat e(String userId,
String password, HttpSessionStat e s, String filePath, TraceLevel
tracingLevel, String supportedCultur e) in

C:\Projects\EXT ENDAG\SourceCod e2\Web\ExtendAg WebComponents\s rc\LoginUtils.c s
:113

ExtendAg.Web.Pu blic.Controls.S ignIn.SigninBtn _Click(Object sender,
EventArgs e) in

C:\Projects\ext endag\SourceCod e2\Web\ExtendAg Web\Public\Cont rols\SignIn.asc x
.cs:142

System.Web.UI.W ebControls.Link Button.OnClick( EventArgs e) +108

System.Web.UI.W ebControls.Link Button.System.W eb.UI.IPostBack EventHandler.Ra i
sePostBackEvent (String
eventArgument) +58

System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData)
+138
System.Web.UI.P age.ProcessRequ estMain() +1277

This is the error message we got under windows 2000 and the asp.net
was set to run as machine instead of system. However, as I've stated
before changing this in windows 2003 makes no difference.

If someone out there has come across this or can help me figure it out
I would be much obliged. Thanks.

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
20659
by: Peter Gomis | last post by:
I have encountered a situation where I am unable to remove a .NET assembly from the GAC. The message I receive is "Assembly 'assemblyname' could not be uninstalled because it is required by other applications." Although I have seen this before when trying to remove .NET assemblies that have been installed via an MSI package, I now get this message while trying to remove any assembly I've added to the GAC. Using gacutil does not work...
1
3100
by: Varad | last post by:
Hi, Am trying to install SQL Server Express CTP on my machine (Windows XP with SP1). I have downloaded the windows installer and .net framewrok specified in the readme file(ReadmeSQLEXP2005.htm) and also followed the steps given. but could not install express. I tried installing both June and april edition. When I tried to install april edition the below error window is popped up when the setup is in progress during configuring "SQL...
22
3297
by: EP | last post by:
When running my asp.net hosting service (asp.net without IIS), on server 2003 with IIS not installed, I get the following when trying to process a request. "System.DllNotFoundException: Unable to load DLL (aspnet_isapi.dll)." Of course the dll is able to be found, it's still in the framework directory and for grins I even put it in my service's local directory. This is apparantly server 2003 not allowing asp.net to be run if IIS was not...
0
2846
by: Michael R. Pierotti | last post by:
Has anyone seen this error before when trying to make the install on a program. ------ Starting pre-build validation for project 'HafaSMPPInstall' ------ WARNING: Unable to find dependency 'mscorlib' (Signature='B77A5C561934E089' Version='1.0.5000.0') of assembly 'Devshock.Protocol.SmppClient.DLL' WARNING: Unable to find dependency 'mscorlib' (Signature='B77A5C561934E089' Version='1.0.5000.0') of assembly 'System.dll' WARNING: Unable to...
3
7214
by: DJTN | last post by:
I'm getting the following error when I try to compile my setup project in VS 2002. I have re-installed the .net framework 1.1 and it didnt solve the problem. WARNING: Unable to find dependency 'mscorlib' (Signature='B77A5C561934E089' Version='1.0.5000.0') of assembly 'System.dll' WARNING: Unable to find dependency 'mscorlib' (Signature='B77A5C561934E089' Version='1.0.5000.0') of assembly 'System.Windows.Forms.dll' WARNING: Unable to...
2
382
by: Carlos G Benevides | last post by:
I have a ASP.Net web application that has two assemblies that run under com+. Under Windows 2000 the two assemblies are added to com+ automatically when instantiated from the web site. For this to happen we had to change the context in which asp.net runs from machine to SYSTEM by modifying the machine.config file. Under Windows 2003 no matter how asp.net is set to run as either machine or system. I get the following error: ...
0
1245
by: mart_nl | last post by:
Hi, I'm using Visual Studio 2005 (VB.Net) and want to program towards Outlook 2003. I've installed Office 2003 Professional edition including Outlook and installed Outlook Primary Interop Assembly (PIA) for 2003 (O2003pia.exe package). During install a progressbar goes with a message saying something about configuring office (goes by real quickly) and exits silently. After installation I'd expect to find something like
2
12838
by: ashishjainism | last post by:
I am unable to install my windows service and the installutil is throwing the following error: Running a transacted installation. Beginning the Install phase of the installation. See the contents of the log file for the d:\practice in .net\mywindowsservice\mywindowsservice\mywindowsservice\bin\practiceservice.exe assembly's progress. The file is located at d:\practice in...
3
5236
by: =?Utf-8?B?S2VuIExlbWlldXg=?= | last post by:
My clickonce app fails when the install button on the publish.htm page is clicked. User is prompted with a "Cannot Start Application" dialog. Details provided from the dialog are: PLATFORM VERSION INFO Windows : 5.1.2600.196608 (Win32NT) Common Language Runtime : 2.0.50727.3053 System.Deployment.dll : 2.0.50727.3053 (netfxsp.050727-3000) mscorwks.dll : 2.0.50727.3053 (netfxsp.050727-3000)
0
8763
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
8676
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9266
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9127
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9020
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5926
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3128
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2467
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.