Community
cancel
Showing results for 
Search instead for 
Did you mean: 
cjdouglas
Beginner
27 Views

AMT DTK Development in a web page

Hi,

I hope it's not too silly a question. I have for some time been using the AMT DTK libraries within windows forms (created in Visual Basic .Net 2005/2008) to do simple things like return the power state of a PC. I would very much like to move to a web based application again using VB.Net to create an ASPX web page. All seems well in my development environment, but when I move to a real IIS6 web server I get errors! It appears that when the IAMT dll's are registered it all goes horribly wrong, am I missing something? Has anyone else managed to do this?

Thanks

Craig

0 Kudos
11 Replies
Ylian_S_Intel
Employee
27 Views

Hi there. I have never used the DTK libraries as part of an ASP.net project, so, I don't have a clear answer. First, none of the DTK dll's must be registered, if you try it will fail. They don't include any COM objects, they are just .NET dll's. If you can manage to run full .NET code within ASP.net, you should be able to use IntelAmtStack.dll, but since I don't know ASP.net at all, I am not sure how to help. Can you send over the errors you are gettins?

Ylian (Intel AMT Blog)
cjdouglas
Beginner
27 Views

Hi,

Thanks for the reply, below is the debug text as observed on the server (which is 2003R2 x64 by-the-way). Any help would be terrific.smiley [:-)]

Craig

Server Error in '/Desk3' Application.

Could not load file or assembly 'IntelAmtControls' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.BadImageFormatException: Could not load file or assembly 'IntelAmtControls' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'IntelAmtControls' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLMSoftwareMicrosoftFusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLMSoftwareMicrosoftFusion!EnableLog].

Stack Trace:

[BadImageFormatException: Could not load file or assembly 'IntelAmtControls' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
   System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +465
   System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +181
   System.Reflection.Assembly.Load(String assemblyString) +42
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +190

[ConfigurationErrorsException: Could not load file or assembly 'IntelAmtControls' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +3642024
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +402
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +155
   System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +36
   System.Web.Compilation.BuildM
anager.GetReferencedAssemblies(CompilationSection compConfig) +235
   System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +214
   System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +57
   System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +259
   System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +406
   System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +125
   System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +203
   System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +52
   System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +50
   System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +514
   System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +142
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +274


Version Information:Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

27 Views

Hi,

We are working on this. Will get back to you soon.

Thanks,

Sree

cjdouglas
Beginner
27 Views

Hi,

That would be terrific. :-)

Any and all help gratefully received.

Thanks

Craig

Ylian_S_Intel
Employee
27 Views

Oh dear, this is not good. I have no idea how to get started with this one since I am not familiar with ASP.net at all. First, performing a LoadModule on IntelAmtControl.dll should work. One thing you have to make sure to do is take IntelAmtStack.dll and IntelAmtControl.dll from the same DTK distribution. If you take files from two different distributions, it may cause this to happen. Also note that IntelAmtControls.dll does make use of IntelAmtStack.dll, so make sure both files are in the same directory. You may also need IMRSDK.dll if your going to do SOL/IDER and you may need OpenSSL folder if you perform certificate operations, etc. The only immidiate dependency should be IntelAmtStack.dll.

Otherwise, I am stumpted.
Ylian (Intel AMT Blog)
cjdouglas
Beginner
27 Views

Hi,

I'm actually not doing anything complicated, don't even anticipate getting into the realms of SOL/IDER. What happen is, I create a Web Site in Visual Studio (ASP.Net - Visual Basic), it can be just a simple as text on the page (Hello World sort of thing). When I up load to the web server everything is ok (as you would expect). However, as soon as I add references to the IntelAmtControls.dll and IntelAMTStack.dll it runs fine on my machine (running the ASP.Net Development Server) but when I upload to the IIS server it errors as prviously described. I don't even have to add code which calls the dlls, just their presence seems enough to upset it.

Does this help clarify anything?

Regards

Craig

27 Views

Hi,

As Ylian suggested, did you confirm that you are taking both the dlls from the same distribution?

Thanks,

Sree

cjdouglas
Beginner
27 Views

Hi,

They are bothe coming from the same DTK version, is that what you mean. I initially started with an older one (can't rememver the version number now), but when it didn't work I updated to the latest from the Intel site (0.35?). Still no joy Sad smiley [:(]. But in both instances the dll's in use came from the same source.

Regards

Craig

27 Views

Hi,

We have a later version of DTK (v0.52) at http://software.intel.com/en-us/articles/download-the-latest-version-of-manageability-developer-tool.... Could you please try that?

Thanks,

Sree

cjdouglas
Beginner
27 Views

Hi,

I have just checked this morning ant it is indeed the 0.52 version I'm using, sorry my mistake. The installation package I used was Intel_AMT_Developer_Tool_Kit_v0.52x.msi.

Regards

Craig

Ylian_S_Intel
Employee
27 Views

I don't think the DTK version would help much in this case. I am stumped on this one since I never used ASP.net and don't have the setup of time to dive into this one. Of course, the full source is available and you could grab all the Intel AMT Stack classes you need and add them to a DLL you know works correctly. Otherwise, we need an ASP.net genious to fix this.

Ylian (Intel AMT Blog)