c# - Could not load file or assembly 'System.Web' or one of its dependencies on Windows 8 IIS -


i got problem when deploying on localhost iis. haven't experience error when building system , publish correctly. when browse on localhost got error. research , suggestion on google nothing works me. can me on this:

 not load file or assembly 'system.web' or 1 of dependencies. system cannot find file specified.     description: unhandled exception occurred during execution of current web request. please review stack trace more information error , originated in code.  exception details: system.io.filenotfoundexception: not load file or assembly 'system.web' or 1 of dependencies. system cannot find file specified. 

source error:

an unhandled exception generated during execution of current web request. information regarding origin , location of exception can identified using exception stack trace below. 

assembly load trace: following information can helpful determine why assembly 'system.web' not loaded.

wrn: assembly binding logging turned off. enable assembly bind failure logging, set registry value [hklm\software\microsoft\fusion!enablelog] (dword) 1. note: there performance penalty associated assembly bind failure logging. turn feature off, remove registry value [hklm\software\microsoft\fusion!enablelog]. 

stack trace:

[filenotfoundexception: not load file or assembly 'system.web' or 1 of dependencies. system cannot find file specified.]    system.reflection.runtimeassembly._nload(assemblyname filename, string codebase, evidence assemblysecurity, runtimeassembly locationhint, stackcrawlmark& stackmark, intptr pprivhostbinder, boolean throwonfilenotfound, boolean forintrospection, boolean suppresssecuritychecks) +0    system.reflection.runtimeassembly.internalloadassemblyname(assemblyname assemblyref, evidence assemblysecurity, runtimeassembly reqassembly, stackcrawlmark& stackmark, intptr pprivhostbinder, boolean throwonfilenotfound, boolean forintrospection, boolean suppresssecuritychecks) +210    system.reflection.runtimeassembly.internalload(string assemblystring, evidence assemblysecurity, stackcrawlmark& stackmark, intptr pprivhostbinder, boolean forintrospection) +242    system.reflection.runtimeassembly.internalload(string assemblystring, evidence assemblysecurity, stackcrawlmark& stackmark, boolean forintrospection) +17    system.reflection.assembly.load(string assemblystring) +35    ajaxcontroltoolkit.toolkitscriptmanagerhelper.getassembly(string name) +88    ajaxcontroltoolkit.toolkitscriptmanagercombiner.isscriptcombinable(scriptentry scriptentry, boolean enablecdn) +48    ajaxcontroltoolkit.toolkitscriptmanager.onresolvescriptreference(scriptreferenceeventargs e) +266    system.web.ui.scriptmanager.registerscripts() +349    system.web.ui.scriptmanager.onpageprerendercomplete(object sender, eventargs e) +281    system.web.ui.page.processrequestmain(boolean includestagesbeforeasyncpoint, boolean includestagesafterasyncpoint) +4628 

i think need register .net freamework 4.0 iis above issue. here steps..

  • open command prompt administrator
  • navigate "c:\windows\microsoft.net\framework\v4.0.30319" directory in command prompt [use command cd c:\windows\microsoft.net\framework\v4.0.30319]
  • register .net framework iis [use command aspnet_regiis.exe -i]
  • restart iis [use command iisreset].
  • done.

or this

in vs2010, right click project in solution explorer , select 'add deployable dependencies'. check mvc related check boxes in following dialog.

this creates '_bin_deployableassemblies' folder in project contains .dll files mentioned in other answers. believe these copied bin folder when creating deployment package.

or try this: http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx/


Comments