Base solution for your next web application
Open Closed

deployment #8075


User avatar
0
fdelcarmen created

Hello,

I am doing a deployment to IIS 8.5 and need some helps.

I have problem with Angular Application Publishing :

Note: One important thing is that; Angular uses client side routing. If you refresh a page (F5) then IIS will handle the request and will not find the requested path and returns a HTTP 404 error. We should configure IIS to redirect all requests to the index.html page (or, to the root path). At the same time, IIS needs to install the URL Rewrite module, please refer to https://www.iis.net/downloads/microsoft/url-rewrite

ASP.NET Zero Angular UI contains a web.config file. You can copy it to the web site's root folder to overcome the problem described above. (What this means? where is ASP.NET Zero Angular UI??

And in Web Host, i have the error : HTTP Error 502.3 - Bad Gateway There was a connection error while trying to route the request.

Thanks

Fernando De Carmen.


2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    You can copy it to the web site's root folder to overcome the problem described above. (What this means? where is ASP.NET Zero Angular UI??

    The angular routing requires iis rewriting.

    <!-- IIS URL Rewrite for Angular routes -->
    <rewrite>
      <rules>
    	<rule name="Angular Routes" stopProcessing="true">
    	  <match url=".*" />
    	  <conditions logicalGrouping="MatchAll">
    		<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
    		<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    		<add input="{REQUEST_URI}" pattern="^/(api)" negate="true" />
    	  </conditions>
    	  <action type="Rewrite" url="/" />
    	</rule>
      </rules>
    </rewrite>
    

    And in Web Host, i have the error : HTTP Error 502.3 - Bad Gateway There was a connection error while trying to route the request.

    • Run the published YourApp.exe or YourApp.dll from the command line. Does that work?

      • If it does, you know you have an IIS integration problem.
      • If it does not, you know you have an application problem.
    • Change stdoutLogEnabled="false" to true and then check the logs at stdoutLogFile=".\logs\stdout". The error(s) there might tell you something.

    • Check your IIS Application logs in the Event Viewer. The error(s) there might tell you something.

  • User Avatar
    0
    ismcagdas created
    Support Team

    This issue is closed because it has not had recent activity for a long time.