Host the published site in nopcommerce - nopcommerce

I am working in ecommerce website using NopCommerce2.2. I hosted the website by copying the complete source code in the wwwroot of the dotnet panel. It was working fine. But the size was huge. It was around 700MB. So I published the Nop.Web and its Administration. The site was working fine in the localhost(i.e local server) using IIS7. But when I copied the contents directly to the wwwroot in the global server,it was redirecting to the error page errorpage.htm?aspxerrorpath=/ instead of the site. Can anyone suggest a solution?

Copy your website (all folders and content) from your development computer to an application folder on your remote hosting computer (server).
Make sure the bin folder, on your remote hosting computer, contains the same dll files as on your development computer.
Copy Your Data
If your application contains data or a database. For instance an SQL Server Compact database (a .sdf file in App_Data folder), consider the following:
Do you want to publish your test data to the remote server?
Most likely not.
If you have test data on your development computer, it may overwrite production data on your remote hosting computer.
If you have to copy an SQL database (.sdf file), perhaps you should delete everything in the database, and then copy the empty .sdf file from your development computer to the server.
THAT'S IT. GOOD LUCK !

You need to follow the following steps as I mentioned
For Publishing the NopCommerce Application website below is the step:
Step : 1 - Publish the Nop.Web project.
Step : 2 - Publish the Nop.Admin project.
Go to the publish folder where your publish created
Step : 3 - Cut all dll from the Administration and Paste all dll to bin folder which in main bin folder for whole project.
Step : 4 - Copy two things from your source project and in App_Data folder Settings.txt and InstalledPlugins.txt which is not published in your publish file so paste this two files in your publish folder in App_Data. (You need to change the connection string in Setting.txt as per your database host).
Step : 5 - Now you need to copy whole plugins folder from your source folder (but remember this plugins folder you need to copy from the Presentation folder not from the main source where the solution file are there.).
Step : 6 - Now your publish have been ready.(now you can deploy on hosting server)

Related

ASP.net Visual Studio 2019 project won't load because IIS Express cannot read configuration file on mapped network drive

I have an ASP.NET Web Application (.NET Framework) that was created in the default location of C:\Users\mcarr\source\repos\ It loads fine from this location.
I was asked by my manager to keep projects out on a mapped network drive. So I created the source and repos folders on the mapped drive and copied the entire project to the new location.
It won't load from here. I get an error message stating that the creation of the virtual directory https://localhost:XXXXX/ failed. Cannot read configuration file. You will need to manually create this virtual directory in IIS before you can open this project.
I have researched with no luck...
Cannot read configuration file due to insufficient permissions
Visual Studio - Cannot Read Configuration File
I did try the suggestion of removing the URL from IISUrl in the project file.
Thinking that it may be some other configuration file, I even created another new project in VS2019 and changed the location to the repos directory on the mapped drive from the Configure your new project window of VS2019, and saved the newly created project directly there. Even this new test project, created in place, gives the same error message.
Any ideas?
Full environmental disclosure:
VisualStudio 2019 Enterprise with Jetbrains Resharper installed.
64-bit Windows 10 Version 21H2 Build 19044.1826
Open Enterprise Server (OES) network. (Used to be known as Novell) (I suspect this is the root of the problem)
Turns out that OES and Windows don't play well together. I have several mapped drives available for me to store projects on. Some are on OES servers and others are on Windows servers. A help desk guy told me that when copying files from an OES drive to a Windows box he has to put them in C:\temp first, then move them from the temp folder to the desired folder. Windows doesn't trust files from an OES share.
So I moved my project to a mapped drive on a Windows box and the IIS Express error is gone.
I'm a programmer, not a network admin, and this was new to me.
But, problem solved.

Deploying ASP.NET application to more than one live server using BAT file

Currently I'm deploying an ASP.NET application to 4 live servers that are load balanced manually by zipping and dropping the files to the servers. I would like to know how can I write a BAT file and run from a command prompt to install the application to all the 4 servers. Any help or reference would be appreciated.
Here are the steps if only files must to be updated (no the database)
Create a bat file and do that steps, after you have copy the updated files on some directory.
Make a file called app_offline.htm on your root of your web site, and the site will go offline.
Overwrite the new files over the site.
Rename or delete the app_offline.html file
Here is the command to make the copy copy all files and folders from one drive to another drive using DOS (command prompt)

Publish (Deploying) my website

I am publish my website application . I am storing all my data in XML files in App_Data folder and in some other folder too.
The steps i follow are
1) Publish using visual studio 2010 asp.net c#.
2) Then copy my all file from "\Debug\PackageTemp" and paste in "C:\inetpub\wwwroot"
The files in wwwroot are being used my inetmgr and my system now acts as a server.
Am i doing it right ?
One More Question .
If i publish and follow the steps as mentioned above ,then for second time all my data (in XML file)get reseted.
So i wrote a batch file which will keep all my data files in backup and after deploy my website i vl copy my backup files in respectively folder ..but i dont know when to call my batch file .Is there anyway to call these batch file while i am doing my deployment ..
OR
there is any feature provided by microsoft visual studio to keep backup and automatically copy these files or not to modify some files
Once you Publish your solution, try selecting the Publish Method as "File System". Then point the target location to any folder on your system/network and click on the Publish button in the dialog.
Just copy all those files and directories that are created in that location, to either your FTP folder in case of a Web Deployment or to a local/network folder and configure a website from IIS.

Does web.config transformations works with Build\Release?

To deploy a website on production or UAT server, I perform following steps.
1)Build my website in build\release mode.
2)Copy the files manually and paste it on the production server.
I want to apply web.config transformations when website is bulid in release mode. Is it possible?
or is there any other way to change the value of connection string automatically when website is deployed on server.
I am not using webpublish or web packages methods for deployment.
You can use web publish to file system which is exactly as copy paste. You can publish to a folder in your machine and copy to server from there. After you run the publish, the files can be also found in obj\release\Package\PackageTmp

ASP.NET Web Deploy - Large Folders

I have an ASP.NET application that has two very large folders within the application on the production side: One for images and another for App_Themes. They grow dynamically from user input and customization. There are similar folders in my dev application, which have only some sample data for testing.
I am using web deploy through Visual Studio 2010 to publish my site to the production server. I have changed my .csproj file settings to exclude these two folders from deployment and have also checked the "leave extra files on destination" checkbox. However, the publishing still takes a long time. I think the reason is related to web deploy checking all the files in the images folder and the App_Themes folder on the server.
Is there a solution that would solve the publishing problem? I would like to continue using web deploy because it is really practical compared to other methods of publishing. The server is running IIS 6.
You can publish the way you're doing it, but into a local directory. It should be quick that way. Then set up a robocopy job ( http://en.wikipedia.org/wiki/Robocopy ) to sync the local publish directory with the web server. Robocopy can be fired off via a .bat file (I bet you can even chain it somehow to the completion of the publish) and is very configurable allowing you to specify files or directories to omit.

Resources