I have deployed NopCommerce to Windows azure website and I am able to see home page of NopCommerce website on website URL. After I login using admin credentials, I can see Administration link at the top. But when I click on the link, administration website is not shown.
It seems that with NopCommerce admin website does not get deployed. When I tried to publish from Admin website in Visual Studio to azure website, it didn't work. Can someone point me that how can I deploy admin website?
Run Deploy.bat in your root folder. This will create the entire website structure in the Deployable folder. FTP that up to your site.
It is quite tricky but will make sense to you after getting used to NopCommerce.
You need to create a subdirectory called 'Administration' and deploy there. Then you copy ALL the files that are inside /Administration/bin to /bin. These files will include Nop.Admin.dll and other dlls used by Admin.
Don't forget to copy all plugin DLLs to /plugins
If you add Nop.Admin project reference to Nop.Web it will be solved.
Just move Nop.Admin.dll to folder Nop.web\bin, this error is due to missing DLL Nop.Admin.dll from stuff.
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
Here is your answer below (Step :3 is your answer) :
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.)and replace it to with your publish's plugin folder.
Step : 6 - Now your publish have been ready.(now you can deploy on hosting server)
If you're using web deploy via Visual Studio, make sure in your publishing settings you deploy as "RELEASE", else the admin directory will 404. Just thought I'd share after discovering this in version 3.30 myself...
You need to go to the properties of the Nop.Web project and go to the "Package/Publish Web" tab and under the "Items to deploy" set it to "All files in this project folder".
You need to do this for each "Configuration" you have that you deploy under as it will not set it as this on default for any new configurations you might have created.
The reason for needing this is because the admin project is outside of the Nop.Web scope. So the default setting of "Only files needed to run this application" only includes the Nop.Web files. If you select the "All files in this project folder", it will include the admin project because nop.web has references to it.
Hope this helps.
Related
I need to integrate a third party plugin in my asp.net website. To install the plugin, they have mentioned this sentence, "Create an application through your IIS control panel with root directory at -(some path from my website folder)?".
I am not much aware with IIS and rarely worked with it. Though I tried every possible way I could do in IIS, I am not able to work it out. After installation, there is a test page provided by plugin which I have to run to check but when I run it, it shows this error.
"It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS."
I searched this error too and found that it is because the two Web.Config file, one from the main project and another from plugin folder. The only way to work with this, is to make the plugin folder they specified as a root directory in IIS. Someone kindly tell me some easy steps to do this.
What I was doing is, in IIS6, I added New website with the main folder of my asp.net website, then I right click>add application and choose the given path, thought it would become root directory but it is not.
Help would be appreciated. Also note that, I have to put the plugin folder in my main website folder only. So, there are two web.config. I tried to rename one of them too, it solved the above error but gave another errors but I think main problem is of root directory. P.S they show me above error on web.config file of plugin folder on this sentence-
"Line 51:
< authentication mode="Windows" />"
Most of the times the root directory is C:\inetpub\wwwroot folder and "Default Web Site" on IIS Manager.
Open IIS Manager and under Sites there should be IIS websites and under it you will probably see Default website. You can see the root directory with Right click/Settings.
Copy your website files under this root directory.
And after copying folder to root folder you will see this folder under Default websites on IIS.
Right click your directory name on IIS and "Create Application", select correct .net framework.
It should be work. Good luck, if you need more help please give more details on your server IIS.
I have created an asp.net C# application developed in visual studio 2010, which is running without any error on my PC, but when i tried to run the same application on another computer with visual studio 2010, it gives following error,
The element 'buildProviders' cannot be defined below the application level.
Following article at http://forums.iis.net/t/1160248.aspx?The+element+buildProviders+cannot+be+defined+below+the+application+level+
You probably need to convert the virtual directory to application. I encountered this when deploying my app (using NancyFX).
You can open IIS Manager->Right-click the diretory of your web application->Click Convert to Application.
I faced this problem and i found out that somehow i had another version of my website within the subfolders of my webstie.
Meaning that my website is in a folder called "FrontEnd". Withing this folder there is a subforlder called backup that contains a backup of my website.
when i removed the backup folder, everything went ok.
If you recently upgraded your solution, check for the backup directory for crystal report within your solution. The backup directory can get created when you upgrade visual studio. To resolve this error, closed the solution. Went to the solution directory
and delete or move the backup directory to a different location outside of the solution directory. This solved the problem for me
You can fix this problem either defining the element in the web.config file of the root dir or setting Virtual Directory as APPLICATION in IIS.
For doing this with IIS 6.0, you first have to set the the directory in which your site is present as a Virtual Directory and then define this virtual directory as an Application.
All physical directories under Inetpub\Wwwroot are not considered applications until the following procedure is used:
Open IIS Manager.
Expand the Default Web Site node and look for the subdirectory that you want to designate as an application root.
Right-click the directory that you want to mark as an application root, and then click Properties.
On the Directory tab, in the Application Settings section, click Create.
In the Application name text box, type the name of the application, and then click OK.
The virtual directory is now an application root.
Maybe on oppening website you were selected upper project directory as website root
In my case, the issue was that the web.config inadvertently existed in a subfolder of the applications root folder. I had a "temp" subfolder, and I had placed a copy of the web.config there, unaware of the unintended side effects. The solution in my case was to remove the dup copy in the subfolder. Hth
(In my case name of project was repeating in directory )
The problem's solution is very simple: check its root directory in Solution Explorer. If there is a name folder within another name folder then this error will occur. Your web site contents should be very first after your web site name folder. In other words, contents should not display in another same name folder.
I am using Visual Studio 2008 for .net project.
I have configured to use IIS as debug web server in the project property page.
I have two projects under c:\project, project1 and project 2. I can run project 1 with no problem. However when I try to run project 2 I got an error message, saying the web.config file is missing binary file from bin folder.
The server is trying to load the web.config file from project1 instead of project2.
I have checked the virtual path settings and project settings and could not find anything wrong.
Does anyone have such experience?
I could not find useful information on google.
Thanks,
Lewis
I found out that ON IIS manager, Default Web Site -> Basic Setting -> Physical path was set to perticular project.
I've changed it to C:\inetpub\wwwroot now when I run individual applicaiton they go and pick up correct config files
Make sure that project1 is an application whose base folder is the project1 directory and that project2 is an application whose base folder is the project2 directory. sounds like project1 is an application pointing to c:\project.
EDIT: How are your directories defined in IIS? If they are virtual directories, they must be defined as applications, otherwise it will try to use the root web.config.
Try this:
Shutting down all instance of Visual Studio
Stopping IIS (iisreset or restart the WWW service)
Delete everything in this directory: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
Open your projects back up
I also had this problem, it turned out I had mistakenly set up my website incorrectly in IIS.
I was pointing my default website to files for project 1, while a sub-application inside the default website was pointing to files for project 2, which was of course inheriting the web.config of project 1.
Everything was working just fine and on the last publish my wordpress directory is now gone.
I don't have a folder with the same name in the project/solution. I've been using visual studio for over 2 years but not doing webpages with it.
If you deploy your web site / application on a existing virtual directory, it ask you if you want to delete the existing content in it. I think you missed that check while deploying your application.
I get the following error when I try to compile an asp.net site using a custom build script.
error ASPCONFIG: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Although the description is in detail I do not understand what it means exactly. I have not configured IIS to host this website and I don't think I will be able to as I am running Vista Home Basic version. So the website cannot be built using custom scripts?Please reply as I want to test this feature.
I had this SAME EXACT problem and finally discovered a rogue Web.config was placed in my obj folder ... do yourself a favor and do a search in all the sub-directories for a web.config file. I deleted it and all was back to normal.
The rogue web.config file in the obj folder is most likely to be caused when you do a Publish Web Site. So just clean it up after you've done the publish.
if this happens after the virtual-directory is already created do the following:
right-click on web.config
properties
Build Action: Content
Copy to Output directory: Do not copy
if transformed (apply to all configurations)
properties
Build Action: None
Copy to Output directory: Do not copy
It is likely that your web.config file is placed in a directory that is not the root of the application. On most versions of IIS, you can convert any folder on your web site to an application root:
Open IIS and navigate to the appropriate folder
Right-click on the folder, select properties
Under Application Settings, and beside Application name, click Create
Apply and close
If this does not fix your problem, there may be another configuration error, either with IIS or your application.
In IIS, go to the folder that the app runs under, right click it, go to properties.
On the Directory tab, look for "Application settings". Click the create button.