views:

81

answers:

3

Ok, so this may seem an elementary question. Maybe it is. But for the life of me I don't know the answer. I'm looking for the simple answer(s).

I've attempted both of the following:

1) I have a site I've created locally. When I deploy to my host (XCopy of site files + restore of a .bak SQL Server backup file), I get all kinds of errors pertaining to records in the database that are looking for files on my local HD. IE: There are fully qualified path names in the database vs. relative. EX: C:\FolderName\FileName.ext

2) I've stood up a brand new database and new site files out on my host as well in order to create the site fresh, but the SQL Scripts won't run. Appears to be a permissions issue even though the connection strings are set properly in the web.config.

Also, I've not fired up anything from Visual Studio yet. Just doing everything from the portal interface at the moment.

Oh, and I'm asking here first because you all on StackOverflow are reliable. The folks at DNN that monitor the forums are not.

A: 

1) You should be able to copy the file system and database to another server and run without a problem. If you are doing custom development, you must make sure to use relative paths in your URLs or take into account the current portal alias (The PortalModuleBase base class has a property PortalAlias.HTTPAlias which gets the current alias). If you have "hard-coded links" your site won't work properly.

If you can provide more details about the errors you are seeing I'll edit this post with any more information I have.

2) The user needs to be in the db_owner role for installation. Can you verify that this is the case? I often find it helpful to test the login in SQL Server Management Studio and very the login/password as well as the role before trying to install DNN.

Ian Robinson
A: 

1) Locally enter Host -> Portals -> YourPortal and add one more alias equal to url of domain you deploy at. Maybe, you have localhost there already :)

2) Deploy DB at host and create user with rights db_owner

3) Copy files of your DNN at host and update at web.config connectionString with new paths, DBname, credentials

4) ASP.NET shall have full rights for folder where you portal is deployed

5) try it.

Natallia
A: 

The issue was in the Portal Alias table. There has to be appropriate records for all applicable aliases. The problem is, when you create the site in your own localhost, there's only a "localhost" record. Additional records have to be created for all URI locations.

Boydski