I am trying to upgrade the ASP.NET MVC 1.0 application to 2.0 preview 1. I am using the spark as view engine.
issue:
Spark used the System.Web.MVC 1.0.0.0 so I got the source code and recompiled using the 2.0.0.0 and used the new assembly. Now I am getting the different error as follows:
Could not load file or assembly 'Microsoft.Web.Mvc' or one of its dependencies. The system cannot find the file specified.
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.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Web.Mvc' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 163: return new ViewEngineResult(searchedLocations);
Line 164:
Line 165: entry = Engine.CreateEntry(descriptor);
Line 166: SetCacheValue(descriptorParams, entry);
Line 167: return BuildResult(entry);
Source File: C:\Data\Projects\Samples\spark 1.0 Src\src\Spark.Web.Mvc\SparkViewFactory.cs Line: 165
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Web.Mvc' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!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 [HKLM\Software\Microsoft\Fusion!EnableLog].
My experience:
Get Spark source from this link: Spark development builds
Replace the file bin\aspnetmvc\System.Web.Mvc.dll with the 2.0 version (from %ProgramFiles%\Microsoft ASP.NET\ASP.NET MVC 2\Assemblies)
Execute the build.cmd script
The updated Spark.dll & Spark.Web.Mvc.dll are available in the build folder
Notes:
on the time of writing, the available spark development version is 1.0.39961.0.
The build script fails while looking for a jsunit file (I believe) but the DLLs are generated properly before it breaks. Just cancel its execution by hitting Ctrl+C when the error is displayed otherwise it'll retry the operation.
Hope it helps.
Related
When I want to the access SharePoint 3.0 Central Administration, web page gives the following error:
An error occurred during the processing of . Could not load file or assembly 'Microsoft.SharePoint.ApplicationPages.Administration' or one of its dependencies. The system cannot find the file specified.
I put the Microsoft.SharePoint.ApplicationPages.Administration.dll and Microsoft.SharePoint.ApplicationPages.dll files to the GAC.
I also tried restarting the IIS and recycling the application pools but it did not work.
I am trying to check out MvcRazorToPdf. I'm installing it from Nuget Manager.
When I attempt to build the project I get this error message:
Error 5 Assembly 'MvcRazorToPdf, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' uses 'itextsharp, Version=5.5.3.0,
Culture=neutral, PublicKeyToken=8354ae6d2174ddca' which has a higher
version than referenced assembly 'itextsharp, Version=5.5.0.0,
Culture=neutral,
PublicKeyToken=8354ae6d2174ddca' d:\PROJECTS\Crowdiet\packages\MvcRazorToPdf.1.0.2\lib\40\MvcRazorToPdf.dll Crowdiet
In order to solve it I installed the latest version of iTextSharp from Nuget. Version 5.5.7
Now I'm building and so it runs.
However, when trying to execute MvcRazorToPdf code I get the following error message:
Could not load file or assembly 'itextsharp.xmlworker,
Version=5.5.3.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca' or
one of its dependencies. The located assembly's manifest definition
does not match the assembly reference. (Exception from HRESULT:
0x80131040)
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.IO.FileLoadException: Could not load file or
assembly 'itextsharp.xmlworker, Version=5.5.3.0, Culture=neutral,
PublicKeyToken=8354ae6d2174ddca' or one of its dependencies. The
located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)
Any ideas how to deal with this? Thanks.
DSB I've written this as theres too much to place in a comment.
This link should help address your azure query SO.
In regards to what I had said about updating your wkhtml files you need to click this link wkhtml download (this is a link for the site wkhtml page) as this will provide you with the 3 updated files you need for rotativa. There's 2 things that you can do when the download has finished in order to get these new files into your solution. This download will save a setup program to your computer which contains the 3 files. When you are saving the files make a note of where you are saving them to.
Download 7 zip found at 7zip or any file extracting tool if you don't already have one. Right click on your download and use the extraction tool to extract and save the 3 updated files.
If you can't download or don't have an extraction tool then run the setup of the downloaded file. This should save into your program files in your standard drive. Navigate through program files to the wkhtmltopdf folder, click on it, then click the bin folder and inside this you'll find the 3 updated wkhtml files.
When you've got these three files add these to your existing rotativa folder inside your solution. Do a rebuild of the soultion if necessary just to update it. Hope this helps!!
When using our MVC Web Application after it is updated, it takes several minutes to load the homepage for de first time. After the first load it loads pretty fast. Probably the MSIL code is compiled to Native Machine code and is cached. (Correct me if i'm wrong). This occures for every page.
Everytime a new version is copied over to the server it is very slow.
To solve this problem i was trying to get it pre-jit-compiled with ngen so we could save lots time for our users.
However when executing "ngen install mydll.dll" for every dll in it's project bin folder, it gives me several errors. This is the command
cd "C:\Windows\Microsoft.NET\Framework64\v4.0.30319"
for %%i in (C:\inetpub\wwwroot\myproject\bin\*.dll) do ngen install "%%i"
The first errors are:
Failed to load dependency System.Web.Mvc of assembly DotNetOpenAuth.Core,
Version=4.3.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246 because of the following error : The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Failed to load dependency log4net of assembly DotNetOpenAuth.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246 because of the following error : The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
The project just debugs and builds fine. What is the correct way to achieve this?
You would have to warm-up the initialization of your web application. This will speed-up the load of the homepage for the first time. To give you a brief conceptual overview:
1)The worker process is not spawned until the first request is made to the website . The Worker Process is associated with Application Pool. The spawning of the worker process can be time taking process, as the process initiates the web site. So the first step is to spawn the worker process in advance (w3wp.exe). This can be done at the application pool level
2)With the first request to the website; the worker process loads all the application DLL's to execute the request. This process of loading the dll's can be time taking. Also, when App Pool is recycled , the worker process has to again reload all the application dlls. So the second step is to pre-load the dll's by the worker process.. This can be done at the website level.
The application warm-up module is a built in feature in IIS 8.0.
Please follow below links to warm-up your web application in IIS:
http://technet.microsoft.com/en-us/video/microsoft-virtual-academy-ii8-application-initialization.aspx
http://blogs.msdn.com/b/amol/archive/2013/01/25/application-initialization-ui-for-iis-7-5.aspx
http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-application-initialization
http://weblog.west-wind.com/posts/2013/Oct/02/Use-IIS-Application-Initialization-for-keeping-ASPNET-Apps-alive
How do we deploy the application
Publish to local filesystem with Visual Studio.
Create an application on production server (IIS)
Copy the files to the app directory
There is an error in our production server.
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The disk structure is corrupted and unreadable.
Source Error:
Line 1: <div class="row-fluid">Line 2: <div id="graph" class="span24">Line 3: </div>
Source File: /Views/ProductionOrder/ProductionOrderFlow.cshtml Line: 1
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
I have checked the file system and no error found.
The template file can be successfully opened with notepad.
Any other possible reasons?
If you used a shared folder in order to copy the files, you may check this answer from super user: link. Your files might be blocked due to security reasons. Right click and properties for the root folder to check for this.
Second option might be replacing the hard disk drive of the server.
Third option might be different file encoding between your computer and live computer.
Hello I am trying to package and start up azure developement fabric on a windows 2008 server, I am so close yet still far. The steps I take are
1) run cspack.exe command /copyOnly to generate the .csx folder
2) run csrun.exe commmand /LaunchBrowser to start up the developement fabric and startup the browser
the error is as follows
System.BadImageFormatException: Could
not load file or assembly
'Interop.SSCE' or one of its
dependencies. An attempt was made to
load a program with an incorrect
format.
== Pre-bind state information === LOG: User = IP-0AE2B2DF\Administrator LOG:
DisplayName = Interop.SSCE (Partial)
LOG: Appbase =
file:///C:/Users/Administrator/Documents/Visual
Studio
2010/Projects/MyAzureProject/src/AzureCloudService/ServiceDefinition.csx/roles/MyAzureProject.Web/approot/
LOG: Initial PrivatePath =
C:\Users\Administrator\Documents\Visual
Studio
2010\Projects\MyAzureProject\src\AzureCloudService\ServiceDefinition.csx\roles\MyAzureProject.Web\approot\bin
Calling assembly : (Unknown).
=== LOG: This bind starts in default load context. LOG: Using application
configuration file:
C:\Users\Administrator\Documents\Visual
Studio
2010\Projects\MyAzureProject\src\AzureCloudService\ServiceDefinition.csx\roles\MyAzureProject.Web\approot\web.config
LOG: Using host configuration file:
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config
LOG: Using machine configuration file
from
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Policy not being applied to
reference at this time (private,
custom, partial, or location-based
assembly bind). LOG: Attempting
download of new URL
file:///C:/Users/Administrator/AppData/Local/dftmp/s0/deployment(98)/res/deployment(98).AzureCloudService.MyAzureProject.Web.0/aspNetTemp/aspNetTemp/root/dfbc079a/82bed8d5/Interop.SSCE.DLL.
LOG: Attempting download of new URL
file:///C:/Users/Administrator/AppData/Local/dftmp/s0/deployment(98)/res/deployment(98).AzureCloudService.MyAzureProject.Web.0/aspNetTemp/aspNetTemp/root/dfbc079a/82bed8d5/Interop.SSCE/Interop.SSCE.DLL.
LOG: Attempting download of new URL
file:///C:/Users/Administrator/Documents/Visual
Studio
2010/Projects/MyAzureProject/src/AzureCloudService/ServiceDefinition.csx/roles/MyAzureProject.Web/approot/bin/Interop.SSCE.DLL.
ERR: Failed to complete setup of
assembly (hr = 0x8007000b). Probing
terminated.
this error happens with 2 dlls Interop.SSCE.DLL and SqlLite.dll Ive replaced all references to SqLite dll with a 64bit version and I dont have any references anymore to Interop.SSCE.DLL since I am not using it. Manually deleting these assemblies from the location
"C:\Users\Administrator\Documents\Visual Studio
2010\Projects\MyAzureProject\src\AzureCloudService\ServiceDefinition.csx\roles\MyAzureProject.Web\approot\bin"
solves the issue, but I dont obviously want to manually delete these everytime as I trying to automate a build process. My question is then how is the .csx folder actually generated and will this give me clues as to where these dll's are bring copied from? This is really frustrating as with the exception of those dll errors, I =m able to package the solution and startup the developement fabric with no other problems. Please Help!!
I realize this is old, but I just ran across it while trying to solve the same problem. In my case, the issue was that some of my projects were set to build x86 assemblies, instead of Any CPU. The solution was:
Go to Build -> Configuration Manager
Make sure "Active solution platform" is set to "Any CPU"
Make sure each of the projects also has the "Platform" set to "Any CPU"
Rebuild
Go to:
Tools > Options > Projects and Solutions > Web Projects
Check the Use the 64 bit version of IIS Express for web sites and projects.
This will ensure that your web project runs in x64 mode and will thus be able to use Service Fabric files.
Hope it helps...