网站在我本机上运行正常,怎么发布到上海某空间就不正常呢?
Server Error in '/' Application.
--------------------------------------------------------------------------------Could not load file or assembly 'App_Licenses' or one of its dependencies. 拒绝访问。
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 'App_Licenses' or one of its dependencies. 拒绝访问。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 'App_Licenses' 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]. Stack Trace:
[FileLoadException: Could not load file or assembly 'App_Licenses' or one of its dependencies. 拒绝访问。][FileLoadException: Could not load file or assembly 'App_Licenses, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. 拒绝访问。]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Compilation.BuildManager.LoadLicensesAssemblyIfExists() +8902544
System.Web.Compilation.BuildManager.Initialize() +495
System.Web.Compilation.BuildManager.InitializeBuildManager() +267
System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags) +224[HttpException (0x80004005): Could not load file or assembly 'App_Licenses, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. 拒绝访问。]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8890735
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +259
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082
Server Error in '/' Application.
--------------------------------------------------------------------------------Could not load file or assembly 'App_Licenses' or one of its dependencies. 拒绝访问。
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 'App_Licenses' or one of its dependencies. 拒绝访问。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 'App_Licenses' 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]. Stack Trace:
[FileLoadException: Could not load file or assembly 'App_Licenses' or one of its dependencies. 拒绝访问。][FileLoadException: Could not load file or assembly 'App_Licenses, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. 拒绝访问。]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Compilation.BuildManager.LoadLicensesAssemblyIfExists() +8902544
System.Web.Compilation.BuildManager.Initialize() +495
System.Web.Compilation.BuildManager.InitializeBuildManager() +267
System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags) +224[HttpException (0x80004005): Could not load file or assembly 'App_Licenses, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. 拒绝访问。]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8890735
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +259
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082
权限问题
2.查看文件是否是只读,或者没有足够的权限。
3.右击其父目录,选择"安全"->高级,选中权限下"重置所有子对象的权限并允许传播可继承权限",点确定
联系空间的管理员,增加App_Licenses所在文件夹的访问权限