Upgrade from 1.9 to 2.2 caused problems

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
I tried upgrading from 1.9 to 2.2 and the database upgrades worked properly and I completed the steps for the website files but after everything finished, I get this error when I go to my main page:

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Can anyone tell me how I can fix this problem?
12 years ago
You can see my website at www.ooples.com
12 years ago
Hmmm, seems that nopCommerce has an issue when running in medium trust. You need one of the following:
1. Run nopCommerce in full trust
2. Download source code version and apply changeset a1147f9c4dcb
12 years ago
https://www.nopcommerce.com/boards/t/12480/nopcommerce-220-medium-trust-critical-issue-fix.aspx
12 years ago
I replaced the files with the new files and I'm now getting this error:

Access to the path '\\fs1-n02\stor2wc1dfw1\404408\457711\www.ooples.com\web\content\Plugins\bin\Nop.Plugin.DiscountRules.BillingCountry.dll' is denied.
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.UnauthorizedAccessException: Access to the path '\\fs1-n02\stor2wc1dfw1\404408\457711\www.ooples.com\web\content\Plugins\bin\Nop.Plugin.DiscountRules.BillingCountry.dll' is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.


How can I fix this problem?
12 years ago
https://www.nopcommerce.com/boards/t/11511/access-error-nopplugindiscountrulesbillingcountrydll.aspx
12 years ago
I tried the fix that you suggested and I received the following error:

Could not load file or assembly 'Nop.Plugin.DiscountRules.BillingCountry, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The network name cannot be found.
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 'Nop.Plugin.DiscountRules.BillingCountry, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The network name cannot be found.

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 'Nop.Plugin.DiscountRules.BillingCountry, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' 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:

[FileNotFoundException: Could not load file or assembly 'Nop.Plugin.DiscountRules.BillingCountry, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The network name cannot be found.]
   System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
   System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +39
   System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +132
   System.Reflection.Assembly.Load(AssemblyName assemblyRef) +30
   Nop.Core.Plugins.PluginManager.PerformFileDeploy(FileInfo plug) in PluginManager.cs:301
   Nop.Core.Plugins.PluginManager.Initialize() in PluginManager.cs:114

[Exception: Could not load file or assembly 'Nop.Plugin.DiscountRules.BillingCountry, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The network name cannot be found.
]
   Nop.Core.Plugins.PluginManager.Initialize() in PluginManager.cs:163

[InvalidOperationException: The pre-application start initialization method Initialize on type Nop.Core.Plugins.PluginManager threw an exception with the following error message: Could not load file or assembly 'Nop.Plugin.DiscountRules.BillingCountry, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The network name cannot be found.
.]
   System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +423
   System.Web.Compilation.BuildManager.CallPreStartInitMethods() +306
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +591

[HttpException (0x80004005): The pre-application start initialization method Initialize on type Nop.Core.Plugins.PluginManager threw an exception with the following error message: Could not load file or assembly 'Nop.Plugin.DiscountRules.BillingCountry, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The network name cannot be found.
.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9013676
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
12 years ago
Andrei,

Can you please review my post (the one before this) and give me some feedback?  I'd really appreciate any assistance you can give me on my performance problems.

I'm kind of stuck here!

thanks!

Greg
12 years ago
a.m. wrote:
Hmmm, seems that nopCommerce has an issue when running in medium trust. You need one of the following:
1. Run nopCommerce in full trust
2. Download source code version and apply changeset a1147f9c4dcb


I tried running the changeset but it won't let me build the project because it says my version of Visual Studio 2010 Professional can't open the project for Nop.Web and Nop.Admin

Do I need an extra sdk or something similar to open these projects? What am I missing?
12 years ago
cheatcountry wrote:
It says my version of Visual Studio 2010 Professional can't open the project for Nop.Web and Nop.Admin

Do I need an extra sdk or something similar to open these projects? What am I missing?

Install ASP.NET MVC 3
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.