ServiceStack / Issues

Issue Tracker for the commercial versions of ServiceStack
11 stars 6 forks source link

Error on MvcApplication.Application_Start() #708

Closed labilbe closed 4 years ago

labilbe commented 4 years ago

Project runs OK on my dev machine (VS2015, WIN10, ServiceStack 5.8). If I build the project on same machine and deploy on my dev IIS it runs OK too.

When I commit changes and run a staging build the build is successfull (VS2015, WIN7, ServiceStack 5.8). When I test the staging website an error is thrown (Cannot load file or assembly'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51').

I tried to find the origin and it "seems to be" that line in LicenseUtils.cs: if (int.TryParse(subId, out var subIdInt) && revokedSubs.Contains(subIdInt))

sshot-1

The project is compiled using the target Microsoft.NET Framework v4.6 since the production server is a Windows 2008 SP2.

Here is the package.config file of my web project `<?xml version="1.0" encoding="utf-8"?>

`
labilbe commented 4 years ago

The project is working on the production environment (no error). So the only environment where the bug occurs is the staging one.

mythz commented 4 years ago

These issues are runtime binding issues. They're unique to each project. You'd need to upload a repro on GitHub (and post the link here) in order for us to be able to try to resolve the issue.

The best thing you can try is upgrading the .NET Framework version to see if that resolves it.

labilbe commented 4 years ago

In the docs, it says Windows 2008 SP2 is limited to framework 4.6. I don't know how it handles a .NET Framework superior.

Thank you for your link. I will try different things and post the solution when I'm done.

mythz commented 4 years ago

Closing Issue as it's a per project issue and nothing actionable can be done.