Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Getting "Object reference not set to an instance of an object" after moving siteGetting "Object reference not set to an instance of an object" after moving site
Previous
 
Next
New Post
9/12/2014 6:09 PM
 

Hello,

My DNN installation on my dev computer got hosed somehow so I am trying to copy my site back from PowerDNN. I will make a separate post with those symptoms in case it can get fixed.

I cannot find any good tutorials for how to move a site - the links all seem to be broken now - so here is what I did:

I FTP'd everything from the server into a new folder and created an application in IIS.

I changed permissions on the folder.

I backed up the database on PowerDNN and re-stored it to SQLExpress (not as a file.)

I changed the connection string in web.config to "Data Source=BRAHMA\SQLEXPRESS;Initial Catalog=hylandstudio;Integrated Security=True;MultipleActiveResultSets=True"

When I try to go to the site I get "Object reference not set to an instance of an object" error. Below is the full stack trace.

Now, I deleted the application for the old install in IIS so the re-directs of the aliases would not mess up the new install (not really sure if that was the right thing to do.)

My DNN version is 06.01.05 (142)

Any clues as to what is happening?

- Brad

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   DotNetNuke.Common.Utilities.Config.GetConnectionString(String name) +55
   DotNetNuke.Data.SqlDataProvider..ctor(Boolean useConfig) +152

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +146
   System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +298
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +79
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +10371979
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +28
   System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) +816
   DotNetNuke.Framework.Reflection.CreateInstance(Type Type) +95
   DotNetNuke.ComponentModel.SingletonComponentBuilder.BuildComponent() +30
   DotNetNuke.ComponentModel.SimpleContainer.GetComponent(Type contractType) +162
   DotNetNuke.ComponentModel.AbstractContainer.GetComponent() +45
   DotNetNuke.ComponentModel.ComponentFactory.GetComponent() +93
   DotNetNuke.Security.Permissions.PermissionProvider..ctor() +23
   DotNetNuke.Security.Permissions.CorePermissionProvider..ctor() +9

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +146
   System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +298
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +79
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +10371979
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +28
   System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) +816
   DotNetNuke.Framework.Reflection.CreateInstance(Type Type) +95
   DotNetNuke.ComponentModel.SingletonComponentBuilder.BuildComponent() +30
   DotNetNuke.ComponentModel.SimpleContainer.GetComponent(Type contractType) +162
   DotNetNuke.ComponentModel.AbstractContainer.GetComponent() +45
   DotNetNuke.ComponentModel.ComponentFactory.GetComponent() +93
   DotNetNuke.Common.DotNetNukeHttpApplication.RegisterIfNotAlreadyRegistered(String name) +62
   DotNetNuke.Common.DotNetNukeHttpApplication.RegisterIfNotAlreadyRegistered() +67
   DotNetNuke.Common.DotNetNukeHttpApplication.Application_Start(Object Sender, EventArgs E) +1675

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +4233393
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +205
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +336
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +350
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +382

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

 

 
New Post
9/13/2014 8:37 AM
 
I would not restore in an application directory, instead created a new website folder inside /inetpub (e.g. "wwwdnn") and unzip your files into it.
Create a new IIS website (name wwwdnn and alias wwwdnn) pointing to it
Make sure, default.aspx is default document
Make sure, you enabled anonymous and forms authentications, none else.
Enter application pool (created with same name) advanced settings and switch ASP.Net user to "Network Service"
Using Windows Explorer, grant modify permission to "Network Service" for /inetpub/wwwdnn
Open Windows/System32/drivers/etc/hosts file with a text editor (run as administrator) and add a line " 127.0.0.1 wwwdnn" ( no # in front), save file.
Open SQL Server Management Studio, restore the database. In security node of the server (not the database) create windows login for LocalSystem\Networkservice.
Enter details of the login (right click) and select tab user mapping. Assign the user to your database (schema dbo) and grant dbowner role.
Enter the database, edit top200 rows of portalalias table and add wwwdnn or replace existing name.
Edit web.config to use local server, proper database name and integratedSecurity=true
Browse your site.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
9/15/2014 5:50 PM
 
Sebastian,

I followed the steps but now I am getting the dreaded "Domain Name Does Not Exist In The Database" error. I had to use a different port when creating the web site so I used 81. The exact url I used was "localhost:81". I also tried the other aliases like "localhost/hylandstudiodnn:81"

Your instructions were pretty clear and I was able to follow them except this one: "Enter the database, edit top200 rows of portalalias table and add wwwdnn or replace existing name."

What I did was change one of the unneeded records, changing the HTTPAlias column to "wwwdnn" (without quotes of course). I also tried "localhost".

I assume I did something wrong in this step as the error directly relates. Here is a dump of my PortalAlias table:

 

1 0 localhost -1 2012-05-03 22:31:14.273 -1 2012-05-03 22:31:14.273
5 4 localhost/hylandstudiodnn 1 2012-05-22 21:24:26.100 1 2012-05-22 21:24:26.100
8 4 www.hylandstudio.com 1 2012-07-26 09:07:08.770 1 2012-07-26 09:07:08.770
9 4 localhost/wwwdnn 1 2012-07-26 09:07:16.970 1 2012-07-26 09:07:16.970
10 4 hylandstudio.com 1 2012-07-26 09:07:38.430 1 2012-07-26 09:07:38.430
13 4 hylandstudios.com 1 2012-08-21 16:14:25.703 1 2012-08-21 16:14:25.703
14 4 www.hylandstudios.com 1 2012-08-21 16:14:38.997 1 2012-08-21 16:14:38.997
15 4 manufacturersglass.com 1 2012-08-23 17:30:30.953 1 2012-08-23 17:30:30.953
16 4 www.manufacturersglass.com 1 2012-08-23 17:30:46.250 1 2012-08-23 17:30:46.250
18 4 localhost/hyland NULL NULL NULL NULL

 

- Brad


 
New Post
9/16/2014 3:18 AM
 
if you are using hostheaders, you don't need to choose a different port (unless there is another webserver residing on the same machine.
You might need to adopt firewall rules, if using a different port.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
9/16/2014 1:21 PM
 

Sebastian,

This is my dev machine, everything happens on localhost with only one web server. So I don't think hostheaders (I had to look that up) or firewall settings apply in this context. Please let me know if I am wrong about that.

When I added the new wwwdnn web site, IIS complained that the IP address was already being used (by wwwroot). I was using the default "All Unassigned" IP setting for wwwroot.

That got me thinking so I changed my IP to static added a second IP and assigned each IP to wwwroot and wwwdnn. I assigned localhost hostname to wwwroot and localhostdnn to wwwdnn. I then changed the PortalAlias table to reflect the new IP address:

19 0
    192.168.0.10      1    
2012-08-23 17:30:46.250 1 2012-08-23 17:30:46.250
21    
4      192.168.0.10/hyland      1 2012-08-23 17:30:46.250 1 2012-08-23 17:30:46.250

That did not work. I got 404 error again even on wwwroot sites, but this time they were the generic ones, not the .net versions of 404. I tried using hostname rather than IPs in the binding and reverting back to All Unassigned. Still no joy.

What else I can do, or further investigate?

Thanks,

- Brad

 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Getting "Object reference not set to an instance of an object" after moving siteGetting "Object reference not set to an instance of an object" after moving site


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out