locked
Windows 7 - ASP.Net runtime error: The Specified module could not be found. RRS feed

  • Question

  • User-2055519059 posted

    I have transfered a VS2008 Web application project from a Vista PC to a Windows 7 PC (both 32 bit) by getting it from VSS - I do this frequently beftween XP and Vista PC's for all my VS projects. The application compiles on the Win7 PC, and I can publish it to a server (running Windows 2003) and then run it on that server, but I can't run it in the development environment on the Win7 PC. The web site displays "The Specified module could not be found.", but doesn't say what module.

    In the development environment, intellisense shows the same error on every aspx file in the @ Page line, i.e. 

    @ Page Language="vb" AutoEventWireup="true" CodeBehind="Login.aspx.vb" Inherits="MyWebApp.Login"

    I suspect I've missed a step in configuring something, but I can't figure out what. I'd appreciate some suggestions.

     

    Thursday, December 31, 2009 8:09 AM

Answers

  • User-2055519059 posted

    Hi,

    Ok, I solved the problem. I created a new web app project, made sure it ran, then copied my default.aspx page into it, and added all the required references to class library projects and some 3rd party assemblies, ran it, and it gave the same problem. I then removed references one by one, replacing them with stub functions, until it ran: the problem was AKSHasp.dll, the Aladdin Knowledge Systems HASP support assembly, which is written for the dot net framework 1.0 or 1.1. I put everything back in and it still works. Aladdin say they are not going to make a dot net 2.0 version, so I stripped out all the Aladdin code and will replace it with custom code to do the same thing (without a HASP).

    So the reason it works on Vista and XP is that the dot net framework 1.0 and 1.1 are installed. (I might have installed it on the Vista PC's and forgot; I set them up long ago.)

    I don't understand why it couldn't tell me that the problem was with AKSHasp.dll; I spent days on this.

    BTW, I put the unmanaged code back, and it works.

    Thanks for your help.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 6, 2010 8:19 AM

All replies

  • User1759999623 posted

    Are you able to run the application through IIS on your Windows 7 machine?

    Thursday, December 31, 2009 9:37 AM
  • User-2055519059 posted

    IIS isn't installed on the PC. Most of our development PC's do not have IIS installed (since VS2005). I will set it up and and try it and let you know on Monday.

    Thursday, December 31, 2009 10:03 AM
  • User1759999623 posted

    If IIS is not installed, then there's a chance that ASP.NET is completely configured to run as well.

    Thursday, December 31, 2009 4:14 PM
  • User-2055519059 posted

    I installed IIS on the Win7 PC, and published the site from VS2008 to the same PC, and got the same problem. The first time I published it it said I needed to install the IIS 6 Metabase and IIS 6 Configuration Compatibility, ASP.NET and Windows Authentication components of IIS. I did this and was then able to publish, but I get the same problem. Is it possible that Win7 is missing components needed by VS2008? Does it need the dot net framework 1.0 or 1.1 installed? The web application has some assemblies that might need 1.1, but these aren't used when the app starts.

    The web app uses forms authentication. The startup page is default.aspx, and this forces it to load the login.aspx page first. Neither of these pages has any 3rd party components or anything special that I can think of.

    Monday, January 4, 2010 2:24 AM
  • User-2055519059 posted

    I didn't notice this before: I am getting errors on some unmanaged (c++) modules:

    Error 208 Unable to load referenced library 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\9d14922d\_shadow\f8f95988\3316044598\30032737\CVS Mac.dll': System Error &H8007000b& C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\9d14922d\_shadow\f8f95988\3316044598\30032737\CVS Mac.dll 

    This dll is part of the project, and is in the bin folder. Does Win7 prevent the app from using unmanged code?

    Monday, January 4, 2010 3:57 AM
  • User372121194 posted

    Hi,

    Did this dll have any dependence that was not copied from your old machine? ASP.NET cannot load the library without its dependences.

    I look forward to hearing from you.

     

    Monday, January 4, 2010 10:53 PM
  • User-2055519059 posted

    Hi,

    I removed the unmanaged code, but I still have the original problem: I can compile the web application with no errors, and I can publish it to a Windows 2003 server, and it runs on the server, but not on the local Win7 PC, even after installing IIS (which isn't necessary on XP or Vista). I suspect that the problem could be that a component requires the dotnet 1.1 framework. Is it safe to load this on Win7? Will I need to repair ASP.Net after loading it? Or am I on the wrong track, and the problem is something else?

    Why do I get the same error message in Intellisense when I put the mouse over the @Page line in the aspx file? It says the specified module can't be found. The codebehind file is there and the class is defined, and there are no compiler errors with the module, so I can't understand why it says it can't find it.

    I created a simple web app, and this does run. The only difference I noticed in the test app is that the @ Page line didn't include the "MyWebApp." prefix in the Inherits part. I tried this - I changed:

    @ Page Language="vb" AutoEventWireup="true" CodeBehind="Login.aspx.vb" Inherits="MyWebApp.Login"

    to

    @ Page Language="vb" AutoEventWireup="true" CodeBehind="Login.aspx.vb" Inherits="Login"

    but it made no difference.

    There is probably something simple I'm overlooking, but I just can't see it.

     

    Tuesday, January 5, 2010 2:33 AM
  • User372121194 posted

    Hi,

    Thanks for your response.

    "MyWebApp" is the root Namespace of your ASP.NET web application.

    Please try to rebuild your ASP.NET web application and make sure the application dll is in your ASP.NET web application's Bin folder. 

     

    Thanks.

    Tuesday, January 5, 2010 4:53 AM
  • User-2055519059 posted

    Hi,

    I do a Rebuild Solution every time I make a change. It creates MyWebApp.dll in the bin folder each time. If I publish to IIS on the local PC, this assembly gets copied to the bin folder in inetpub\wwwroot\mywebapp\bin. Whether I run it in Visual studio (e.g. http://localhost:64120/Default.aspx) or from IIS (http://localhost/MyWebApp/Default.aspx), I get the same error.

    If I publish from the Win7 PC to a different PC, i.e. a server running Windows 2003 (http://TestServer/MyWebApp/Default.aspx), it works. Windows 7 is missing something that Windows XP, Vista and Windows 2003 all have. I am guessing Framework 1.0 or 1.1, but I don't want to install it unless I know that is the case, and I can do this without corrupting the .Net configuration on this PC.

     

    Tuesday, January 5, 2010 5:37 AM
  • User372121194 posted

    Hi,

    Did this project need any special dependence? You can check your web.config Assemblies element.

    You also can check Window Event Viewer which records the exception of application in Application section.

     

    Thanks.

    Tuesday, January 5, 2010 9:54 PM
  • User-2055519059 posted

    Hi,

    I am using a few DotNet 3.5 assemblies: 

    <assemblies>
      <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
      <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
      <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
     </assemblies>

    The event log has one Application event that is similar to the message displayed in the web app - it still does not say what module is missing, but I am guessing that it is the main application assembly that it for some reason can't access, i.e. the default.aspx codebehind class:

    HttpException

         

    The specified module could not be found. (Exception from HRESULT: 0x8007007E)

         

    http://localhost:64120/Default.aspx

         

    /Default.aspx

         

    127.0.0.1

           

     

         

    False

           

     

         

    Travis-PC-W7\Dave

         

    6

         

    Travis-PC-W7\Dave

         

    False

         

    at System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters)

     

     

    I am going to have to create a new empty web app project and slowly add the forms and class libraries to it until I find what is breaking it.

    Wednesday, January 6, 2010 4:36 AM
  • User-2055519059 posted

    Hi,

    Ok, I solved the problem. I created a new web app project, made sure it ran, then copied my default.aspx page into it, and added all the required references to class library projects and some 3rd party assemblies, ran it, and it gave the same problem. I then removed references one by one, replacing them with stub functions, until it ran: the problem was AKSHasp.dll, the Aladdin Knowledge Systems HASP support assembly, which is written for the dot net framework 1.0 or 1.1. I put everything back in and it still works. Aladdin say they are not going to make a dot net 2.0 version, so I stripped out all the Aladdin code and will replace it with custom code to do the same thing (without a HASP).

    So the reason it works on Vista and XP is that the dot net framework 1.0 and 1.1 are installed. (I might have installed it on the Vista PC's and forgot; I set them up long ago.)

    I don't understand why it couldn't tell me that the problem was with AKSHasp.dll; I spent days on this.

    BTW, I put the unmanaged code back, and it works.

    Thanks for your help.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 6, 2010 8:19 AM
  • User1255426408 posted

    Just to help you out  - if you haven't already written your custom code.

    We had a similar problem with the AKSHasp.dll and Win7, and solved the crash by including the msvcr71.dll in our application directory. Our app is a desktop app, so this may not work for you, but you never know.

    Cheers!


    Tuesday, January 12, 2010 3:31 PM