Error running nopcommerce 4.605 in iis

6 meses atrás
Hello,
I am having a problem running nopcommerce 4.605 on my windows server 2016 server with iis 10.
I installed the asp.net core 7.0 runtime-windows hosting bundle.  I had these problems after publishing my website from visual studio, but get the same exact problems after installing the precompiled nopcommerce 4.605 website files, which eliminates some potential issues.  With both, I've created a new application pool in iis, set it to no managed code, set up and started a new website pointing to the nop installation folder and gave read/write permissions to the folder.  When I try to browse to the website, I get a 'The page cannot be displayed because an internal server error has occurred.'.  Connecting externally, after getting warnings about there being no https:, I get a HTTP Error 404, The required resource is not found.  
Any suggestions on what step I might be missing or on how I can see more detailed error logs?
Thanks,
Rick
6 meses atrás
Turn  on StdOut logging
See https://www.selectsystems.com.au/checking-for-errors-on-a-new-installation-of-nopcommerce
6 meses atrás
Edited the web.config file to write logs and restarted, but no logs created.
No event viewer messages.  MS Edge browser shows error 500.
Inside IIS, the website is showing as started and I'm not getting any kind of error message.
As a reminder, this is a fresh download and install of nopcommerce 4.605 (no source), running on windows server 2016, iis version 10.0.14393, I'm logged in as an Admin, the binding url pings to the external IP 3.134.222.244, dotnet-hosting-7.0.5-win hosting package has been installed and system rebooted. 'Everyone' has been given read/write permissions on the website folder, SQL server express instance running.
Additional info that may or may not be relevant.  This is an EC2 server running on AWS, with a load balancer running in front of it.  There is an older version of Nopcommerce installed on the same server in a different application pool of IIS and its websites are running fine, so it seems http traffic is getting to the server ok.  It is sharing the same external IP as the running websites.  I've tried turning off this website and restarting and it seems to make no difference.
Any suggestions are appreciated.
Thanks,
Rick
6 meses atrás
Is your nopCommerce already "installed"?  (I.e., do you have a \App_Data\appsettings.json ?)

Use SQL to query the Log table in the database to see if any errors there.
6 meses atrás
It had never gotten as far as opening the initial configuration screen, so I
do have an appsettings.json file, but they were the unitialized values, no connection string etc.

I then tried directly running the Nop.Web.exe file as administrator, which opened a console saying it was listening on http://localhost:5000, so I put that address in my browser and it opened the initial configuration screen.  I gave it the sql server settings and it created the database and I then added the store domain url in the Administrative panel settings.  I can then start the exe again and open the website with the localhost setting, but not with the actual domain url.  I still cannot get anything to work in IIS.
When I query the log table it has an entry for the application starting via localhost, but no error messages.
Seems like the issue is with it working in IIS and maybe the domain url being seen.
Any suggestions for next steps?
Thanks,
Rick
6 meses atrás
RE: "...  I can then start the exe again and open the website with the localhost setting, but not with the actual domain url.  ..."

Why would you expect it to work with "the actual domain url", when you are running it on your local PC?
6 meses atrás
Once the website is installed on the server and setup in IIS and running, and a binding is set for the domain url and port 80, a browser directed to that url should open the website in the browser.  
It is not, that is the problem, so I don't understand why you suggest I shouldn't expect it to.

Opening the  nop.web.exe directly in localhost is only a test.  It seems that it proves that the website files all exist, and the website can run, which should rule out a lot of potential issues preventing the website from running, like all the server files and website prereqs are there.  It also shows the sql connection is good.

After stopping the local connection and restarting IIS, I should be able to connect to the website through the domain url set up in iis bindings, right?  If not, explain.

As previously mentioned, an older version of nopcommerce is running without an issue and those websites open fine.  In task manager, I can see nop.web.exe is a running process and it points to the older version.  After starting the new version website in iis, I don't see a second nop.web.exe process running in taskmanager, suggesting to me that iis is unable to start the nopcommerce 4.605 website, which is consistent with the lack of logs and never opening the initial setup page.  I turned off windows defender just in case it was blocking and it made no difference.  Any suggestions on why iis can't start 4.605?

Thanks,
Rick
6 meses atrás
Anything in the Windows System Event logs ?
This is my Setup doc for running in IIS https://selectsystems.com.au/content/Server%20install%20IIS%20and%20SQL%20Server.pdf
6 meses atrás
(I would not expect it to work with URL because you specifically said "start the exe again".  In any case,...)

Above you mention both 404 and 500.  What are you seeing now?  If 500, then I'd think that you are hitting the app, and there should be logging.  If 404, then maybe it never gets there because of load balancer, etc. in front.  
Normally, IIS does not start the application until it receives the first request  So, if you don't see "Application started" in the Log table (like you do when you tested using localhost), then you're not hitting the app.   You could try having IIS force app to preload.
https://www.taithienbo.com/how-to-auto-start-and-keep-an-asp-net-core-web-application-and-keep-it-running-on-iis/.
6 meses atrás
Thanks for the suggestions.
I am getting Error 500 Internal Server Error when trying to connect in IIS and "The page cannot be displayed because an internal server error has occurred" when connecting via external browser. However, there are no stdout log files being created.  I verified the web config file is set " stdoutLogEnabled="true"  stdoutLogFile=".\logs\stdout" and gave everyone read/write permissions on that folder.
There are no errors shown in the Event Viewer.
It looks like IIS has its own log files, but they are binary and not sure how to read them to see if there is anything useful in there.
I reviewed your iis settings and they mirror mine (is this the current 4.605 version?)
I went through the steps of enabling the immediate startup per the steps in the link then restarted IIS, it made no difference, still no exe process started in taskmanager and same error 500.  I restored the initial settings.
I then changed the website settings to use the application pool used by the older nopcommerce version, which is working fine.  I got the same error 500.

Any new suggestions are appreciated.
Thanks,
Rick