Last post Jan 12, 2010 03:31 PM by Meridius
Dec 31, 2009 08:09 AM|DaveSemm|LINK
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.
I suspect I've missed a step in configuring something, but I can't figure out what. I'd appreciate some suggestions.
Dec 31, 2009 09:37 AM|Careed|LINK
Are you able to run the application through IIS on your Windows 7 machine?
Dec 31, 2009 10:03 AM|DaveSemm|LINK
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.
Dec 31, 2009 04:14 PM|Careed|LINK
If IIS is not installed, then there's a chance that ASP.NET is completely configured to run as well.
Jan 04, 2010 02:24 AM|DaveSemm|LINK
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.
Jan 04, 2010 03:57 AM|DaveSemm|LINK
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?
Jan 04, 2010 10:53 PM|Thomas Sun – MSFT|LINK
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.
Jan 05, 2010 02:33 AM|DaveSemm|LINK
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
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:
but it made no difference.
There is probably something simple I'm overlooking, but I just can't see it.
Jan 05, 2010 04:53 AM|Thomas Sun – MSFT|LINK
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.
Jan 05, 2010 05:37 AM|DaveSemm|LINK
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.
Jan 05, 2010 09:54 PM|Thomas Sun – MSFT|LINK
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.
Jan 06, 2010 04:36 AM|DaveSemm|LINK
I am using a few DotNet 3.5 assemblies:
<add assembly="System.Core, Version=126.96.36.199, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=188.8.131.52, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq, Version=184.108.40.206, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions, Version=220.127.116.11, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
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
The specified module could not be found. (Exception from HRESULT: 0x8007007E)
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.
Jan 06, 2010 08:19 AM|DaveSemm|LINK
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.
Jan 12, 2010 03:31 PM|Meridius|LINK
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.