I am trying to create Test site of a Production site which is created in DNN, but not successful in doing so. I have copied the whole production DNN folder at the other location and pointed it from IIS, but its not working. It shows NULL reference exception when i try to hit the URL.
Can someone help
copy all files of your root folder on the production machine to the
test machine
Make a backup of your database on the production
machine and add it to your test machine
Create a new sql user in SSMS on the test machine and add it to the database as dbowner
Edit the web.config on the test machine and change the ConnectionString to the new Sql User
Add the new site to the IIS with original domain name
Edit %windows%/system32/drivers/etc/host and add a line with your domain and the IP-Address 127.0.0.1
Edit the extended properties of the application package in IIS and change the identity to "network service"
Give wwwroot folder (exact: your website home folder) in windows explorer "full control" access rights for network service
if you want to automate this with powershell scripts -> this blog post could help: http://www.bitboxx.net/Blog/Post/189/Make-a-local-copy-of-your-live-DNN-installation#/
Related
I'm from the Devops team. We created a dotnet subsite in IIS:
Created a Virtual Application in IIS under the main site
Added Physical Path as inetpub\site\subsite
Requirement:
We have a main site. Ex - www.site.com
We need a subsite like www.site.com/subsite which should redirect to the www.site.com
The goal here is that our dev team can do testing and changes under www.site.com/subsite and not directly in www.site.com
RouteConfig.CS looks like this:
routes.MapRoute("TaxSupport", "TaxSupport/{controller}/{action}/{id}", new { controller = "Tax", action = "Index", id = UrlParameter.Optional });
routes.MapRoute("Default", "{controller}/{action}/{id}", new { controller = "Tax", action = "Index", id = UrlParameter.Optional });
Output:
Output of www
.site.com/subsite
Probe:
We have already referred to multiple Stack articles in this regard.
We have multiple applications running fine with same Entity Framework and other packages.
We can confirm that subsite web.config is using the same DB connection strings as other applications.
To deploy an application in an Azure Virtual Machine (VM) running IIS, you can follow below steps:
Create an Azure VM with required configuration such as the operating system and size.
Azure Portal > Create > Select Server OS.
Use Remote Desktop Protocol (RDP) to connect to the VM
Use FTP to upload your application code to the VM.
Open the Internet Information Services (IIS) Manager and create a new website or web application in IIS.
Configure the website or web application to point to the location of your application code on the VM.
Configure any necessary IIS settings, such as the application pool and virtual directories.
To deploy a subsite under a site in IIS (Internet Information Services)
Create a Sample Web App and an API for Subsite.
And publish the application as shown below.
Copy these files and paste in the VM of Azure.
Open the IIS Manager on the server where you want to create the subsite.
In the left pane, expand the server node, and then expand the Sites node.
Right-click the site under which you want to create the subsite, and select "Add Virtual Directory".
In the "Add Virtual Directory" wizard, enter a name for the virtual directory and browse to the physical path of the content for the subsite. Click OK to create the virtual directory.
Right-click on the virtual directory and select "Convert to Application"
In the "Add Application" wizard, select the Application pool you want to use for the subsite and click OK.
If you want to configure the subsite with custom bindings, you can do so by right-clicking on the subsite and selecting "Edit Bindings".
Once the subsite is created, you can use the IIS Manager to manage and configure the subsite, such as setting up authentication, creating custom error pages.
And the web.config is using the same DB connection
Connect to the Azure VM using Remote Desktop Protocol (RDP) and open the IIS Manager.
In the IIS Manager, right-click on the parent website and select "Add Web Site".
In the "Add Web Site" wizard, enter a name for the sub-site and select a physical path for the sub-site's files.
Select an appropriate Application pool for the sub-site.
Click on "Test Settings" to make sure the configuration of the site is correct or not.
Open the web.config file of the sub-site and locate the connection string section. And Remove the connection strings from the web.config file of the sub-site.
Add the below line of code to the sub-site's web.config file, in the section: replace "parentSite" with the name of the parent website's config file)
<connectionStrings configSource="parentSite.config" />
Restart IIS by running the command "iisreset" in the command prompt. Test the sub-site by visiting the sub-site's hostname in a web browser.
Here's the scenario:
MVC web project
Three MS SQL Server database projects
One of the databases must be populated with lookup tables
Other tables are user data and don't need data uploading
GoDaddy hosting
Visual Studio 2013
I'd like to deploy everything (web project, sql schemas, reference data) to GoDaddy in one fell swoop, but they appear to only offer FTP uploading. When using FTP in the Web Publishing Wizard, it says "Database preview not supported for this method" which I'm taking "method" to mean FTP. I can publish the web project fine in FTP, but of course without the databases the web application generates errors.
So here are my questions
There is a "Web Deploy" publish method listed in the wizard, but GoDaddy has no information on how to set this up. Can this be used with GoDaddy and will it publish DBs also?
How does one configure the project to use the local SQL Server when running on localhost, but when deployed it uses the GoDaddy SQL Servers?
Can the data in the local DB be uploaded as part of the publishing wizard process, or is SQL Server Management Studio the tool of choice?
Thanks!
I don't believe GoDaddy supports WebDeploy. They didn't when I left their service a few years ago. You can talk to them to confirm whether this has changed.
This is the role of Web.Config Transforms. For an intro to the topic, see here; the article is a little out of date and doesn't mention one of the most useful points - you can add transforms for each publish profile, so they're applied according to your publish settings.
You probably can't upload the local DB file. In almost every hosting situation, the SQL server and the web server are two separate machines, and don't share any files (corollary: the web server doesn't have the SQL service installed). One workaround you can try is to publish the DB directly from your own machine. That is, if you can connect to the DB from your machine, you can do a Web Deploy publish to your own machine but it will send the SQL changes to your GoDaddy DB server.
A more advanced workaround for #3:
Set up your FTP publishing settings for your files
Figure out how to publish your DB through WebDeploy only/from the command line (you can refer to here for a sample using WebDeploy from the command line; note this is going from GoDaddy -> Local, but it's trivial to turn it around)
Customize the web publish pipeline to insert an MSBuild target to execute your WebDeploy command line (see here for an example of modifying the pipeline; you can add the target directly in your .pubxml file if you're not intending to use it for multiple projects).
This will give you a single publish profile which will separately publish your files (via FTP) and your DB (via WebDeploy).
I have installed DotNetNuke 5.6 on my local drive,now i want to move it to host to run web site. What steps should I do to run my web site?
If you haven't done anything to the site on your localhost, it might be easiest to have your host install a clean copy of DotNetNuke to a site for you. Many hosts will do that for you or provide automated tools to install it through their control panel.
In order to help you move a DotNetNuke site, we really need more details in order to provide a complete answer (your hosting company should be able to give you guidance) but the basics are:
1a. If you are just using SQL Express on the local host and plan to
use it under SQL Express on the host as well, you'll just need to
FTP up the DB files along with all the other files.
1b. If you'll be
running the DB under a full SQL Server: Backup your database on your
localhost, copy the DB backup to your host, and restore the database
to the database server provided by the host.
2. Create a blank website on the host.
3. FTP all site files from your localhost to the root directory of your new website.
4. Make sure the Network Service account has Full Access permissions to the root directory and all sub-directories.
5. If you're using a full SQL Server, you'll need to update connection strings in the web.config to point to the restored DB and
ensure you're using a user/login with read/write rights to the DB.
6. Browse to the site.
That should do it.
My Silverlight web site is supposed to let the client download a zip file. The zip contains two pdf files that are copied to a temp folder, plus a third pdf file created using crystal reports. On debug in my computer this is working perfectly. However, I've just published the project on a remote server and I can't download the file.
I don't know if the problem is with silverlight or the server, since I wasn't the one that configured it. When I run fiddler, it throws an 'Access to folder is denied' error.
Both me and the server Administrator already set permissions to write and read from that folder to every account of the server, and still does not work.
Can anyone help with this, I can't seem to figure if the problem is with the server or silverlight. The server is running Windows Server 2008 R2 Standard.
Thanks
Seems it has nothing to do with Silverlight.
The IIS worker process must have the rights to access this folder (mostly it's a group called {MachineName}\IIS_IUSRS).
If you're using Single Sign On/Impersonation, then the actual user as currently authenticated by the Network's (Windows) Domain Controller has to have access rights to that folder, which is not a recommended security architecture.
I am a newbie with DotNetNuke and have been stumbling on how to deploy from the development server to the deployment server. For starters my development and deployment servers are one and the same machine. Here are the steps that I did:
DNN Setup
Downloaded DNN using WebMatrix.
Launched DNN and proceeded with the installation wizard, which is basically just testing the environment and then creating the DNN database.
After the wizard's installation launching DNN will now proceed to the Getting Started page
Added "localhost/dnn" in the site alias list
Moving to ISS
In IIS I added application (folder) DNN in the web root
I copied all the files from the original webmatrix path to the dnn folder in c:\inetpub\webroot making sure that the file/folder hierarchies are the same
Result:
When launching DNN using my browser I am directed to the installation wizard page instead of the Getting Started page. What am I missing?
Thanks!
Confirm that the permissions on the folder containing DNN are the same on your test server as they are on your development server. (I give Network Service read/write and IUsr Read/Execute)
Confirm that the application pool running your application has the proper identity (Network Service is suggested) and is running the proper .NET Framework version; based upon your question, I think you are set on this.
Gain access to your web.config file. You will see a ConnectionStrings section. You probably need to update the connection strings.
If your test server runs off of a different database than your dev server, figure out the connection string of your test server and update your connection string accordingly
You may be able to restore a .BAK file of your DB to your test server
If you do this, you will probably need to (in SSMS) edit your Portal Alias table to include the host name that you are using in your test server environment. Examples: Maybe you access the site via localhost/ on your dev environment, but you access to test site via test.Ronald.com? test.Ronald.com would be your PortalAlias
If your test server runs off the same database server as your dev server, it sounds like you need to open up access in firewalls so that your test server has connectivity to your dev database
A word of advice
Once you get it running, you will be making changes to each database separately (assuming your test site and dev site use different DB Servers). This sync issue can be a royal pain with DNN, as your page structures, module assignments, html module contents, installed modules/extensions will get out of sync. While restoring backups is nice, it is not a very good long-term solution. I recommend database-syncing tools
The problem is most likely a problem with DNN not being able to find the Database. If it can't find the database, it will run the wizard in order to create one.