Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » Production Upgrade to 9.6.4

Production Upgrade to 9.6.4

Kevin O'Driscoll
Reply

Any idea whats going on here? This a Live release of a DW9.6.4. This is working on local and staging. Production has exact setup of staging.
At this point Im logging in to admin for the first time to set up the licence:

Stack Trace: 
[NullReferenceException: Object reference not set to an instance of an object.]
   Dynamicweb.Core.SystemInformation.GetBasePath(String& relativePath) +228
   Dynamicweb.Core.SystemInformation.MapPath(String relativePath) +42
   Dynamicweb.Extensibility.AddIns.AddInLoader.Load() +47
   Dynamicweb.Extensibility.AddIns.AddInManager.GetAddInClasses(Type addInBaseType) +96
   Dynamicweb.Content.Social.Adapters.ExternalAuthentication.OwinStartup.Configuration(IAppBuilder app) +53

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +160
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +101
   Owin.Loader.<>c__DisplayClass12.<MakeDelegate>b__b(IAppBuilder builder) +66
   Owin.Loader.<>c__DisplayClass1.<LoadImplementation>b__0(IAppBuilder builder) +123
   Microsoft.Owin.Host.SystemWeb.<>c__DisplayClass2.<InitializeBlueprint>b__0(IAppBuilder builder) +71
   Microsoft.Owin.Host.SystemWeb.OwinAppContext.Initialize(Action`1 startup) +462
   Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build(Action`1 startup) +40
   Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint() +70
   System.Threading.LazyInitializer.EnsureInitializedCore(T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory) +115
   Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context) +106
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +536
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +173
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +218
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10075124
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +95
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

I'm up against it a bit, would be nice to get a quick comment?

Kev


Replies

 
Steffen Kruse Hansen Dynamicweb Employee
Steffen Kruse Hansen
Reply

Hi Kevin,

The SystemInformation.MapPath is used to convert a relative path inside the 'Files' folder to an absolute path, and it looks like it is this part which is failing.

Is there a difference between how the 'Files' folder is setup in IIS in local/staging and production?

Best regards,

Steffen

 
Kevin O'Driscoll
Reply

Hi Steffen thanks for this. I have a custom module setup in the standard way and Files folder is in virtual directory in IIS all seems to be the same as staging.
So we have the module application as the root in IIS, the /Admin folder and the /Files folder as virtual directories to the root. This is the exact same setup in the 8.9 version and staging 9.6.4 version.

I removed and reconfigured the /Files virtual directory again and reset IIS (stopped started it) Same problem.

 
Nicolai Pedersen
Reply

Can you provide some screendumps of your IIS setup?

 
Kevin O'Driscoll
Reply

Is this what you need Nicholai?

Attached>

 

Capture1.JPG
 
Nicolai Pedersen
Reply

Hard to tell... Sorry cannot help in an environment we do not control...

 
Nicolai Pedersen
Reply

What is the path of /Files? Show dump please.

 
Kevin O'Driscoll
Reply

Ask as many questions as you like Nicholai, what about this?

Capture2.JPG
 
Steffen Kruse Hansen Dynamicweb Employee
Steffen Kruse Hansen
Reply

Sorry for jumping in again.

I have just looked in the AddInLoader.Load(), which seems to instantiate the call to SystemInformation.MapPath, and I can see that it looks for the Bin-folder, so maybe there is something wrong with the path to the bin-folder.

 
Nicolai Pedersen
Reply

Yeah, maybe. Why is there a bin in the root of files? Also it looks like the application folder is not having subfolders. What is home directory of this IIS instance?

 
Kevin O'Driscoll
Reply

Hi, Path to Root (Home) is B:\XXX_Live_B\Application this is the application, it holds ajax middle tier interfaces and any ui affecting server side logic eg aspx ascx cs files and any Custom Modules code behind eg like "CustomCaseWork" module >> Frontend:ContentModule GetContent() overide >> template.Output(); The template will be in the /Files/Templates structure.
Admin virtual directory - Path B:\XXX_Live_B\Dynamicweb\Admin - vanilla install no customisation
Files virtual directory - B:\XXX_Live_B\Files. May have custom cshtml/html/js/css and custom module templates, but mostly standard DW templates this is a standard dw structure with all the unchanged vanilla folder names and heirarchy.

Files is setup as a web application in Visual Studio
Using this setup (which I used ok for other DW installations, some using dw data integration) I can do a number of things like
get full vs intellisense with dw intellisense, create C# proj librairies, web service clients etc and reference them,
add remote network virtual folders for networked file assets

so Files/bin is just a holder for the output of the Files build and gets deleted before release together with all the vs files after the system
is built in Release mode to optimise all code and minimise style and script files. Normally the resulting structure is copied to the final Live folder, but Ive set this up as it is because im having these problems

Meantime I have deleted the Files/bin folder restarted the website and still the error

 
Nicolai Pedersen
Reply

Sorry - I have no clue what it is... It is a really old IIS, maybe it is not in integrated mode?

Best option is to download debugging symbols and attach a debugger....

 
Kevin O'Driscoll
Reply

Well I installed a License using the structure with a little fanagling and uiju. We'll see tomorrow if the site holds up. Thanks Steffen and Nicholai.

 
Mikkel Belchuke
Mikkel Belchuke
Reply

I know this is an old topic, but we had the same problem after upgrading to 9.7.2. 

When we deployed the upgrade our build server did not include the Global.asax file, which gave us the same error as mentioned. 

So the fix was to add the Global.asax (which is included in the default DW version). 

 

You must be logged in to post in the forum