473,327 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

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.Reflection.ReflectionTypeLoadException: One or more of the
types in the assembly unable to load.

and this stack trace.

ReflectionTypeLoadException: One or more of the types in the assembly
unable to load.]
System.Runtime.Remoting.Proxies.RealProxy.HandleRe turnMessage(IMessage
reqMsg, IMessage retMsg) +264
System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData&
msgData, Int32 type) +877
System.EnterpriseServices.RegistrationHelperTx.Ins tallAssemblyFromConfig(RegistrationConfig&
regConfig, Object sync) +0

System.EnterpriseServices.RegistrationHelper.TryTr ansactedInstall(RegistrationConfig
regConfig) +215
System.EnterpriseServices.RegistrationHelper.Insta llAssemblyFromConfig(RegistrationConfig&
regConfig) +241
System.EnterpriseServices.RegistrationHelper.Insta llAssembly(String
assembly, String& application, String partition, String& tlb,
InstallationFlags installFlags) +116

System.EnterpriseServices.RegistrationHelper.Insta llAssembly(String
assembly, String& application, String& tlb, InstallationFlags
installFlags) +19

System.EnterpriseServices.RegistrationHelper.Syste m.EnterpriseServices.Thunk.IThunkInstallation.Defa ultInstall(String
asm) +43

System.EnterpriseServices.Thunk.Proxy.RegisterAsse mbly(Assembly
assembly) +95
System.EnterpriseServices.Thunk.Proxy.LazyRegister (Guid id, Type
serverType, Boolean checkCache) +188
System.EnterpriseServices.Thunk.Proxy.CoCreateObje ct(Type
serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String&
uri) +227

System.EnterpriseServices.ServicedComponentProxyAt tribute.CreateInstance(Type
serverType) +181
System.Runtime.Remoting.Activation.ActivationServi ces.IsCurrentContextOK(Type
serverType, Object[] props, Boolean bNewObj) +74

ExtendAg.Web.Utilities.LoginUtils._getContextXml(S tring userId,
String password, TraceLevel tracingLevel, String supportedCulture,
String sessionId) in
C:\Projects\EXTENDAG\SourceCode2\Web\ExtendAgWebCo mponents\src\LoginUtils.cs:55

ExtendAg.Web.Utilities.LoginUtils.GetContext(Strin g userId, String
password, TraceLevel tracingLevel, String supportedCulture, String
sessionId, Boolean& bAcceptedEula, Boolean& bPasswordReset, Boolean&
bIsExtendAgAccount) in
C:\Projects\EXTENDAG\SourceCode2\Web\ExtendAgWebCo mponents\src\LoginUtils.cs:78

ExtendAg.Web.Utilities.LoginUtils.Authenticate(Str ing userId,
String password, HttpSessionState s, String filePath, TraceLevel
tracingLevel, String supportedCulture) in
C:\Projects\EXTENDAG\SourceCode2\Web\ExtendAgWebCo mponents\src\LoginUtils.cs:113

ExtendAg.Web.Public.Controls.SignIn.SigninBtn_Clic k(Object sender,
EventArgs e) in C:\Projects\extendag\SourceCode2\Web\ExtendAgWeb\P ublic\Controls\SignIn.ascx.cs:142

System.Web.UI.WebControls.LinkButton.OnClick(Event Args e) +108
System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +57

System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
+138
System.Web.UI.Page.ProcessRequestMain() +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\ExtendAgWeb\bin\DataLayer.dll' into
'{03264527-2A73-49FE-BAEF-0EBAE663E01F}' failed with an exception:

System.Reflection.ReflectionTypeLoadException: One or more of the
types in the assembly unable to load.

Server stack trace:
at System.Reflection.Module.GetTypesInternal(StackCra wlMark&
stackMark)
at System.Reflection.Assembly.GetTypes()
at System.EnterpriseServices.RegistrationDriver.Check AssemblySCValidity(Assembly
asm)
at System.EnterpriseServices.RegistrationDriver.NewLo adAssembly(String
assembly)
at System.EnterpriseServices.RegistrationDriver.Insta llAssembly(RegistrationConfig
regConfig, Object obSync)
at System.EnterpriseServices.RegistrationHelperTx.Ins tallAssemblyFromConfig(RegistrationConfig&
regConfig, Object sync)

at System.Runtime.Remoting.Messaging.Message.Dispatch (Object
target, Boolean fExecuteInContext)
at System.Runtime.Remoting.Messaging.StackBuilderSink .SyncProcessMessage(IMessage
msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleRe turnMessage(IMessage
reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData&
msgData, Int32 type)
at System.EnterpriseServices.RegistrationHelperTx.Ins tallAssemblyFromConfig(RegistrationConfig&
regConfig, Object sync)

at System.EnterpriseServices.RegistrationHelper.TryTr ansactedInstall(RegistrationConfig
regConfig)
at System.EnterpriseServices.RegistrationHelper.Insta llAssemblyFromConfig(RegistrationConfig&
regConfig)
at System.EnterpriseServices.RegistrationHelper.Insta llAssembly(String
assembly, String& application, String partition, String& tlb,
InstallationFlags installFlags)

at System.EnterpriseServices.Internal.ComManagedImpor tUtil.InstallAssembly(String
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:ExtendAg datalayer.dll.

Which returns the following error.

An unknown exception occurred during installation:
1: System.Runtime.Serialization.SerializationExceptio n - 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.Reflection.ReflectionTypeLoadException: One or more of the
types in the assembly unable to load.

If I hit F5 and repost the data I get

System.UnauthorizedAccessException: Access to the registry key
HKEY_CLASSES_ROOT\ExtendAg.Objects.HashtableRequir ed is denied.

with this stack trace.

UnauthorizedAccessException: Access to the registry key
HKEY_CLASSES_ROOT\ExtendAg.Objects.HashtableRequir ed is denied.]

Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
+74
Microsoft.Win32.RegistryKey.CreateSubKey(String subkey) +503
System.Runtime.InteropServices.RegistrationService s.RegisterManagedType(Type
type, String strAsmName, String strAsmVersion, String strAsmCodeBase,
String strRuntimeVersion) +213

System.Runtime.InteropServices.RegistrationService s.RegisterAssembly(Assembly
assembly, AssemblyRegistrationFlags flags) +261

System.EnterpriseServices.RegistrationDriver.Class icRegistration(Assembly
asm) +100

[RegistrationException: Failed to register assembly 'DataLayer,
Version=1.1.1402.28709, Culture=neutral,
PublicKeyToken=70025df6990ea3c3'.]

System.Runtime.Remoting.Proxies.RealProxy.HandleRe turnMessage(IMessage
reqMsg, IMessage retMsg) +264
System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData&
msgData, Int32 type) +877
System.EnterpriseServices.RegistrationHelperTx.Ins tallAssemblyFromConfig(RegistrationConfig&
regConfig, Object sync) +0

System.EnterpriseServices.RegistrationHelper.TryTr ansactedInstall(RegistrationConfig
regConfig) +215
System.EnterpriseServices.RegistrationHelper.Insta llAssemblyFromConfig(RegistrationConfig&
regConfig) +241
System.EnterpriseServices.RegistrationHelper.Insta llAssembly(String
assembly, String& application, String partition, String& tlb,
InstallationFlags installFlags) +116

System.EnterpriseServices.RegistrationHelper.Insta llAssembly(String
assembly, String& application, String& tlb, InstallationFlags
installFlags) +19

System.EnterpriseServices.RegistrationHelper.Syste m.EnterpriseServices.Thunk.IThunkInstallation.Defa ultInstall(String
asm) +43

System.EnterpriseServices.Thunk.Proxy.RegisterAsse mbly(Assembly
assembly) +95
System.EnterpriseServices.Thunk.Proxy.LazyRegister (Guid id, Type
serverType, Boolean checkCache) +188
System.EnterpriseServices.Thunk.Proxy.CoCreateObje ct(Type
serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String&
uri) +227

System.EnterpriseServices.ServicedComponentProxyAt tribute.CreateInstance(Type
serverType) +181
System.Runtime.Remoting.Activation.ActivationServi ces.IsCurrentContextOK(Type
serverType, Object[] props, Boolean bNewObj) +74

ExtendAg.Web.Utilities.LoginUtils._getContextXml(S tring userId,
String password, TraceLevel tracingLevel, String supportedCulture,
String sessionId) in
C:\Projects\EXTENDAG\SourceCode2\Web\ExtendAgWebCo mponents\src\LoginUtils.cs:55

ExtendAg.Web.Utilities.LoginUtils.GetContext(Strin g userId, String
password, TraceLevel tracingLevel, String supportedCulture, String
sessionId, Boolean& bAcceptedEula, Boolean& bPasswordReset, Boolean&
bIsExtendAgAccount) in
C:\Projects\EXTENDAG\SourceCode2\Web\ExtendAgWebCo mponents\src\LoginUtils.cs:78

ExtendAg.Web.Utilities.LoginUtils.Authenticate(Str ing userId,
String password, HttpSessionState s, String filePath, TraceLevel
tracingLevel, String supportedCulture) in
C:\Projects\EXTENDAG\SourceCode2\Web\ExtendAgWebCo mponents\src\LoginUtils.cs:113

ExtendAg.Web.Public.Controls.SignIn.SigninBtn_Clic k(Object sender,
EventArgs e) in C:\Projects\extendag\SourceCode2\Web\ExtendAgWeb\P ublic\Controls\SignIn.ascx.cs:142

System.Web.UI.WebControls.LinkButton.OnClick(Event Args e) +108
System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +58

System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
+138
System.Web.UI.Page.ProcessRequestMain() +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 6369
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********@hotmail.com> wrote in message
news:a1**************************@posting.google.c om...
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.Reflection.ReflectionTypeLoadException: One or more of the
types in the assembly unable to load.

and this stack trace.

ReflectionTypeLoadException: One or more of the types in the assembly
unable to load.]
System.Runtime.Remoting.Proxies.RealProxy.HandleRe turnMessage(IMessage
reqMsg, IMessage retMsg) +264
System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData&
msgData, Int32 type) +877
System.EnterpriseServices.RegistrationHelperTx.Ins tallAssemblyFromConfig(Reg
istrationConfig& regConfig, Object sync) +0

System.EnterpriseServices.RegistrationHelper.TryTr ansactedInstall(Registrati
onConfig regConfig) +215
System.EnterpriseServices.RegistrationHelper.Insta llAssemblyFromConfig(Regis
trationConfig& regConfig) +241
System.EnterpriseServices.RegistrationHelper.Insta llAssembly(String
assembly, String& application, String partition, String& tlb,
InstallationFlags installFlags) +116

System.EnterpriseServices.RegistrationHelper.Insta llAssembly(String
assembly, String& application, String& tlb, InstallationFlags
installFlags) +19

System.EnterpriseServices.RegistrationHelper.Syste m.EnterpriseServices.Thunk
..IThunkInstallation.DefaultInstall(String asm) +43

System.EnterpriseServices.Thunk.Proxy.RegisterAsse mbly(Assembly
assembly) +95
System.EnterpriseServices.Thunk.Proxy.LazyRegister (Guid id, Type
serverType, Boolean checkCache) +188
System.EnterpriseServices.Thunk.Proxy.CoCreateObje ct(Type
serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String&
uri) +227

System.EnterpriseServices.ServicedComponentProxyAt tribute.CreateInstance(Typ
e serverType) +181
System.Runtime.Remoting.Activation.ActivationServi ces.IsCurrentContextOK(Typ
e serverType, Object[] props, Boolean bNewObj) +74

ExtendAg.Web.Utilities.LoginUtils._getContextXml(S tring userId,
String password, TraceLevel tracingLevel, String supportedCulture,
String sessionId) in
C:\Projects\EXTENDAG\SourceCode2\Web\ExtendAgWebCo mponents\src\LoginUtils.cs
:55
ExtendAg.Web.Utilities.LoginUtils.GetContext(Strin g userId, String
password, TraceLevel tracingLevel, String supportedCulture, String
sessionId, Boolean& bAcceptedEula, Boolean& bPasswordReset, Boolean&
bIsExtendAgAccount) in
C:\Projects\EXTENDAG\SourceCode2\Web\ExtendAgWebCo mponents\src\LoginUtils.cs
:78
ExtendAg.Web.Utilities.LoginUtils.Authenticate(Str ing userId,
String password, HttpSessionState s, String filePath, TraceLevel
tracingLevel, String supportedCulture) in
C:\Projects\EXTENDAG\SourceCode2\Web\ExtendAgWebCo mponents\src\LoginUtils.cs
:113
ExtendAg.Web.Public.Controls.SignIn.SigninBtn_Clic k(Object sender,
EventArgs e) in C:\Projects\extendag\SourceCode2\Web\ExtendAgWeb\P ublic\Controls\SignIn.ascx
..cs:142
System.Web.UI.WebControls.LinkButton.OnClick(Event Args e) +108
System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.Rai
sePostBackEvent(String eventArgument) +57

System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
+138
System.Web.UI.Page.ProcessRequestMain() +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\ExtendAgWeb\bin\DataLayer.dll' into
'{03264527-2A73-49FE-BAEF-0EBAE663E01F}' failed with an exception:

System.Reflection.ReflectionTypeLoadException: One or more of the
types in the assembly unable to load.

Server stack trace:
at System.Reflection.Module.GetTypesInternal(StackCra wlMark&
stackMark)
at System.Reflection.Assembly.GetTypes()
at System.EnterpriseServices.RegistrationDriver.Check AssemblySCValidity(Assembl
y asm)
at System.EnterpriseServices.RegistrationDriver.NewLo adAssembly(String
assembly)
at System.EnterpriseServices.RegistrationDriver.Insta llAssembly(RegistrationCon
fig regConfig, Object obSync)
at System.EnterpriseServices.RegistrationHelperTx.Ins tallAssemblyFromConfig(Reg
istrationConfig& regConfig, Object sync)

at System.Runtime.Remoting.Messaging.Message.Dispatch (Object
target, Boolean fExecuteInContext)
at System.Runtime.Remoting.Messaging.StackBuilderSink .SyncProcessMessage(IMessa
ge msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleRe turnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData&
msgData, Int32 type)
at System.EnterpriseServices.RegistrationHelperTx.Ins tallAssemblyFromConfig(Reg
istrationConfig& regConfig, Object sync)

at System.EnterpriseServices.RegistrationHelper.TryTr ansactedInstall(Registrati
onConfig regConfig)
at System.EnterpriseServices.RegistrationHelper.Insta llAssemblyFromConfig(Regis
trationConfig& regConfig)
at System.EnterpriseServices.RegistrationHelper.Insta llAssembly(String
assembly, String& application, String partition, String& tlb,
InstallationFlags installFlags)

at System.EnterpriseServices.Internal.ComManagedImpor tUtil.InstallAssembly(Stri
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:ExtendAg datalayer.dll.

Which returns the following error.

An unknown exception occurred during installation:
1: System.Runtime.Serialization.SerializationExceptio n - 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.Reflection.ReflectionTypeLoadException: One or more of the
types in the assembly unable to load.

If I hit F5 and repost the data I get

System.UnauthorizedAccessException: Access to the registry key
HKEY_CLASSES_ROOT\ExtendAg.Objects.HashtableRequir ed is denied.

with this stack trace.

UnauthorizedAccessException: Access to the registry key
HKEY_CLASSES_ROOT\ExtendAg.Objects.HashtableRequir ed is denied.]

Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
+74
Microsoft.Win32.RegistryKey.CreateSubKey(String subkey) +503
System.Runtime.InteropServices.RegistrationService s.RegisterManagedType(Type type, String strAsmName, String strAsmVersion, String strAsmCodeBase,
String strRuntimeVersion) +213

System.Runtime.InteropServices.RegistrationService s.RegisterAssembly(Assembl
y assembly, AssemblyRegistrationFlags flags) +261

System.EnterpriseServices.RegistrationDriver.Class icRegistration(Assembly asm) +100

[RegistrationException: Failed to register assembly 'DataLayer,
Version=1.1.1402.28709, Culture=neutral,
PublicKeyToken=70025df6990ea3c3'.]

System.Runtime.Remoting.Proxies.RealProxy.HandleRe turnMessage(IMessage
reqMsg, IMessage retMsg) +264
System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData&
msgData, Int32 type) +877
System.EnterpriseServices.RegistrationHelperTx.Ins tallAssemblyFromConfig(Reg
istrationConfig& regConfig, Object sync) +0

System.EnterpriseServices.RegistrationHelper.TryTr ansactedInstall(Registrati
onConfig regConfig) +215
System.EnterpriseServices.RegistrationHelper.Insta llAssemblyFromConfig(Regis
trationConfig& regConfig) +241
System.EnterpriseServices.RegistrationHelper.Insta llAssembly(String
assembly, String& application, String partition, String& tlb,
InstallationFlags installFlags) +116

System.EnterpriseServices.RegistrationHelper.Insta llAssembly(String
assembly, String& application, String& tlb, InstallationFlags
installFlags) +19

System.EnterpriseServices.RegistrationHelper.Syste m.EnterpriseServices.Thunk
..IThunkInstallation.DefaultInstall(String asm) +43

System.EnterpriseServices.Thunk.Proxy.RegisterAsse mbly(Assembly
assembly) +95
System.EnterpriseServices.Thunk.Proxy.LazyRegister (Guid id, Type
serverType, Boolean checkCache) +188
System.EnterpriseServices.Thunk.Proxy.CoCreateObje ct(Type
serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String&
uri) +227

System.EnterpriseServices.ServicedComponentProxyAt tribute.CreateInstance(Typ
e serverType) +181
System.Runtime.Remoting.Activation.ActivationServi ces.IsCurrentContextOK(Typ
e serverType, Object[] props, Boolean bNewObj) +74

ExtendAg.Web.Utilities.LoginUtils._getContextXml(S tring userId,
String password, TraceLevel tracingLevel, String supportedCulture,
String sessionId) in
C:\Projects\EXTENDAG\SourceCode2\Web\ExtendAgWebCo mponents\src\LoginUtils.cs
:55
ExtendAg.Web.Utilities.LoginUtils.GetContext(Strin g userId, String
password, TraceLevel tracingLevel, String supportedCulture, String
sessionId, Boolean& bAcceptedEula, Boolean& bPasswordReset, Boolean&
bIsExtendAgAccount) in
C:\Projects\EXTENDAG\SourceCode2\Web\ExtendAgWebCo mponents\src\LoginUtils.cs
:78
ExtendAg.Web.Utilities.LoginUtils.Authenticate(Str ing userId,
String password, HttpSessionState s, String filePath, TraceLevel
tracingLevel, String supportedCulture) in
C:\Projects\EXTENDAG\SourceCode2\Web\ExtendAgWebCo mponents\src\LoginUtils.cs
:113
ExtendAg.Web.Public.Controls.SignIn.SigninBtn_Clic k(Object sender,
EventArgs e) in C:\Projects\extendag\SourceCode2\Web\ExtendAgWeb\P ublic\Controls\SignIn.ascx
..cs:142
System.Web.UI.WebControls.LinkButton.OnClick(Event Args e) +108
System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.Rai
sePostBackEvent(String eventArgument) +58

System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
+138
System.Web.UI.Page.ProcessRequestMain() +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**************@TK2MSFTNGP10.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********@hotmail.com> wrote in message
news:a1**************************@posting.google.c om...
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.Reflection.ReflectionTypeLoadException: One or more of the
types in the assembly unable to load.

and this stack trace.

ReflectionTypeLoadException: One or more of the types in the assembly
unable to load.]
System.Runtime.Remoting.Proxies.RealProxy.HandleRe turnMessage(IMessage
reqMsg, IMessage retMsg) +264
System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData&
msgData, Int32 type) +877

System.EnterpriseServices.RegistrationHelperTx.Ins tallAssemblyFromConfig(Reg
istrationConfig&
regConfig, Object sync) +0

System.EnterpriseServices.RegistrationHelper.TryTr ansactedInstall(Registrati
onConfig
regConfig) +215

System.EnterpriseServices.RegistrationHelper.Insta llAssemblyFromConfig(Regis
trationConfig&
regConfig) +241
System.EnterpriseServices.RegistrationHelper.Insta llAssembly(String
assembly, String& application, String partition, String& tlb,
InstallationFlags installFlags) +116

System.EnterpriseServices.RegistrationHelper.Insta llAssembly(String
assembly, String& application, String& tlb, InstallationFlags
installFlags) +19

System.EnterpriseServices.RegistrationHelper.Syste m.EnterpriseServices.Thunk
.IThunkInstallation.DefaultInstall(String
asm) +43

System.EnterpriseServices.Thunk.Proxy.RegisterAsse mbly(Assembly
assembly) +95
System.EnterpriseServices.Thunk.Proxy.LazyRegister (Guid id, Type
serverType, Boolean checkCache) +188
System.EnterpriseServices.Thunk.Proxy.CoCreateObje ct(Type
serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String&
uri) +227

System.EnterpriseServices.ServicedComponentProxyAt tribute.CreateInstance(Typ
e
serverType) +181

System.Runtime.Remoting.Activation.ActivationServi ces.IsCurrentContextOK(Typ
e
serverType, Object[] props, Boolean bNewObj) +74

ExtendAg.Web.Utilities.LoginUtils._getContextXml(S tring userId,
String password, TraceLevel tracingLevel, String supportedCulture,
String sessionId) in

C:\Projects\EXTENDAG\SourceCode2\Web\ExtendAgWebCo mponents\src\LoginUtils.cs
:55

ExtendAg.Web.Utilities.LoginUtils.GetContext(Strin g userId, String
password, TraceLevel tracingLevel, String supportedCulture, String
sessionId, Boolean& bAcceptedEula, Boolean& bPasswordReset, Boolean&
bIsExtendAgAccount) in

C:\Projects\EXTENDAG\SourceCode2\Web\ExtendAgWebCo mponents\src\LoginUtils.cs
:78

ExtendAg.Web.Utilities.LoginUtils.Authenticate(Str ing userId,
String password, HttpSessionState s, String filePath, TraceLevel
tracingLevel, String supportedCulture) in

C:\Projects\EXTENDAG\SourceCode2\Web\ExtendAgWebCo mponents\src\LoginUtils.cs
:113

ExtendAg.Web.Public.Controls.SignIn.SigninBtn_Clic k(Object sender,
EventArgs e) in

C:\Projects\extendag\SourceCode2\Web\ExtendAgWeb\P ublic\Controls\SignIn.ascx
.cs:142

System.Web.UI.WebControls.LinkButton.OnClick(Event Args e) +108

System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.Rai
sePostBackEvent(String
eventArgument) +57

System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
+138
System.Web.UI.Page.ProcessRequestMain() +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\ExtendAgWeb\bin\DataLayer.dll' into
'{03264527-2A73-49FE-BAEF-0EBAE663E01F}' failed with an exception:

System.Reflection.ReflectionTypeLoadException: One or more of the
types in the assembly unable to load.

Server stack trace:
at System.Reflection.Module.GetTypesInternal(StackCra wlMark&
stackMark)
at System.Reflection.Assembly.GetTypes()
at

System.EnterpriseServices.RegistrationDriver.Check AssemblySCValidity(Assembl
y
asm)
at System.EnterpriseServices.RegistrationDriver.NewLo adAssembly(String
assembly)
at

System.EnterpriseServices.RegistrationDriver.Insta llAssembly(RegistrationCon
fig
regConfig, Object obSync)
at

System.EnterpriseServices.RegistrationHelperTx.Ins tallAssemblyFromConfig(Reg
istrationConfig&
regConfig, Object sync)

at System.Runtime.Remoting.Messaging.Message.Dispatch (Object
target, Boolean fExecuteInContext)
at

System.Runtime.Remoting.Messaging.StackBuilderSink .SyncProcessMessage(IMessa
ge
msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [0]:
at

System.Runtime.Remoting.Proxies.RealProxy.HandleRe turnMessage(IMessage
reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData&
msgData, Int32 type)
at

System.EnterpriseServices.RegistrationHelperTx.Ins tallAssemblyFromConfig(Reg
istrationConfig&
regConfig, Object sync)

at

System.EnterpriseServices.RegistrationHelper.TryTr ansactedInstall(Registrati
onConfig
regConfig)
at

System.EnterpriseServices.RegistrationHelper.Insta llAssemblyFromConfig(Regis
trationConfig&
regConfig)
at System.EnterpriseServices.RegistrationHelper.Insta llAssembly(String
assembly, String& application, String partition, String& tlb,
InstallationFlags installFlags)

at

System.EnterpriseServices.Internal.ComManagedImpor tUtil.InstallAssembly(Stri
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:ExtendAg datalayer.dll.

Which returns the following error.

An unknown exception occurred during installation:
1: System.Runtime.Serialization.SerializationExceptio n - 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.Reflection.ReflectionTypeLoadException: One or more of the
types in the assembly unable to load.

If I hit F5 and repost the data I get

System.UnauthorizedAccessException: Access to the registry key
HKEY_CLASSES_ROOT\ExtendAg.Objects.HashtableRequir ed is denied.

with this stack trace.

UnauthorizedAccessException: Access to the registry key
HKEY_CLASSES_ROOT\ExtendAg.Objects.HashtableRequir ed is denied.]

Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
+74
Microsoft.Win32.RegistryKey.CreateSubKey(String subkey) +503

System.Runtime.InteropServices.RegistrationService s.RegisterManagedType(Type
type, String strAsmName, String strAsmVersion, String strAsmCodeBase,
String strRuntimeVersion) +213

System.Runtime.InteropServices.RegistrationService s.RegisterAssembly(Assembl
y
assembly, AssemblyRegistrationFlags flags) +261

System.EnterpriseServices.RegistrationDriver.Class icRegistration(Assembly
asm) +100

[RegistrationException: Failed to register assembly 'DataLayer,
Version=1.1.1402.28709, Culture=neutral,
PublicKeyToken=70025df6990ea3c3'.]

System.Runtime.Remoting.Proxies.RealProxy.HandleRe turnMessage(IMessage
reqMsg, IMessage retMsg) +264
System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData&
msgData, Int32 type) +877

System.EnterpriseServices.RegistrationHelperTx.Ins tallAssemblyFromConfig(Reg
istrationConfig&
regConfig, Object sync) +0

System.EnterpriseServices.RegistrationHelper.TryTr ansactedInstall(Registrati
onConfig
regConfig) +215

System.EnterpriseServices.RegistrationHelper.Insta llAssemblyFromConfig(Regis
trationConfig&
regConfig) +241
System.EnterpriseServices.RegistrationHelper.Insta llAssembly(String
assembly, String& application, String partition, String& tlb,
InstallationFlags installFlags) +116

System.EnterpriseServices.RegistrationHelper.Insta llAssembly(String
assembly, String& application, String& tlb, InstallationFlags
installFlags) +19

System.EnterpriseServices.RegistrationHelper.Syste m.EnterpriseServices.Thunk
.IThunkInstallation.DefaultInstall(String
asm) +43

System.EnterpriseServices.Thunk.Proxy.RegisterAsse mbly(Assembly
assembly) +95
System.EnterpriseServices.Thunk.Proxy.LazyRegister (Guid id, Type
serverType, Boolean checkCache) +188
System.EnterpriseServices.Thunk.Proxy.CoCreateObje ct(Type
serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String&
uri) +227

System.EnterpriseServices.ServicedComponentProxyAt tribute.CreateInstance(Typ
e
serverType) +181

System.Runtime.Remoting.Activation.ActivationServi ces.IsCurrentContextOK(Typ
e
serverType, Object[] props, Boolean bNewObj) +74

ExtendAg.Web.Utilities.LoginUtils._getContextXml(S tring userId,
String password, TraceLevel tracingLevel, String supportedCulture,
String sessionId) in

C:\Projects\EXTENDAG\SourceCode2\Web\ExtendAgWebCo mponents\src\LoginUtils.cs
:55

ExtendAg.Web.Utilities.LoginUtils.GetContext(Strin g userId, String
password, TraceLevel tracingLevel, String supportedCulture, String
sessionId, Boolean& bAcceptedEula, Boolean& bPasswordReset, Boolean&
bIsExtendAgAccount) in

C:\Projects\EXTENDAG\SourceCode2\Web\ExtendAgWebCo mponents\src\LoginUtils.cs
:78

ExtendAg.Web.Utilities.LoginUtils.Authenticate(Str ing userId,
String password, HttpSessionState s, String filePath, TraceLevel
tracingLevel, String supportedCulture) in

C:\Projects\EXTENDAG\SourceCode2\Web\ExtendAgWebCo mponents\src\LoginUtils.cs
:113

ExtendAg.Web.Public.Controls.SignIn.SigninBtn_Clic k(Object sender,
EventArgs e) in

C:\Projects\extendag\SourceCode2\Web\ExtendAgWeb\P ublic\Controls\SignIn.ascx
.cs:142

System.Web.UI.WebControls.LinkButton.OnClick(Event Args e) +108

System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.Rai
sePostBackEvent(String
eventArgument) +58

System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
+138
System.Web.UI.Page.ProcessRequestMain() +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
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...
1
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)...
22
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...
0
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...
3
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...
2
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...
0
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...
2
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...
3
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.