Hi,
I am trying to deploy my first Metronic template to the website but was not successful to launch the site. Everything is working properly in my local server
I follow this url https://aspnetzero.com/Documents/Step-by-step-core-publish-to-iis .
1 Using MVC .net core 2.1 with Jquery 2. Only Change WebsiteRootAddress to Http://xyz.com 3. publish the site to folder and copy it to the inetpub area for the launch
6 Answer(s)
-
0
Hi @rnguyen, I see from your request screenshot(s) you are hitting the url http://aixem.com. Your ServerRootAddress, ClientRootaddress CorsOrigin must be set according to the url requested (i.e. http://aixem.com).
Your other screen indicates http://xyz.com which would of course be incorrect given the screenshots you've provided. In this case, this would definitely produce a CORs pre-flight access error.
Can you provide a screenshot of your network tab under the F12 tools? This would indicate any access errors.
-
0
Hi rnguyen, Does the log output folder exist and does the apppool have write access to it? This link might be usefull https://odetocode.com/blogs/scott/archive/2018/07/16/7-tips-for-troubleshooting-asp-net-core-startup-errors.aspx
-
0
xyz.com is an example.
can we setup a call using teamviewer today ?
-
0
I'm unable to support you via Teamviewer, but you need to ensure your CORs settings are correct. As @mumfie suggested check your apppool permissions for the site. Ensure whatever account you're running under has read/write access to your host database.
Also, check your app_data log folder (ensure your apppool account has modify/write access to this folder as well), the logs should provide more info.
-
0
I was able to solve this issue by adding
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Production" />
<?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <handlers> <add name="aspNetCore" path="" verb="" modules="AspNetCoreModule" resourceType="Unspecified" /> </handlers> <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" startupTimeLimit="3600" requestTimeout="23:00:00" >
<environmentVariables> <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Production" /> </environmentVariables> </aspNetCore> <httpProtocol> <customHeaders> <remove name="X-Powered-By" /> </customHeaders> </httpProtocol>
</system.webServer> </configuration>
-
0
@rnguyen, glad to hear you found the problem.
Some additional info for other users is that the ASP.NET core environment can also be set right in the Windows environment under Control Panel > System > Advanced system settings | Environment variables.