Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "kalidarscope"

Mailed you the details

Tried. Still have same issue.

I have moved the web.config file from ASAP.Web.Public to ASAP.Web.Host\wwwroot\dist. But facing same issue.

Note: We are using ASP.NET CORE & Angular (single solution). That's why we don't have web.config in angular folder.

We have tried the following changes in web.config.

Change 1:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
    </handlers>
    <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" startupTimeLimit="3600" requestTimeout="23:00:00">
      <environmentVariables />
    </aspNetCore>
    <httpProtocol>
      <customHeaders>
        <remove name="X-Powered-By" />
      </customHeaders>
    </httpProtocol>
  </system.webServer>
</configuration>

Change 2:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <httpProtocol>
      <customHeaders>
        <remove name="X-Powered-By" />
      </customHeaders>
    </httpProtocol>
    <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>
  </system.webServer>
</configuration>

Where can we find the web.config file?

I have only one file named web.config in ASAP.Web.Public.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <httpProtocol>
      <customHeaders>
        <remove name="X-Powered-By" />
      </customHeaders>
    </httpProtocol>
  </system.webServer>
</configuration>
Question

We have successfully deployed the ASP.NET Core and Angular project in Azure. Everything working fine. If i refresh the page or change the url, it shows following error:

The requested content does not exist.

    HttpStatusCode: 404
    ErrorCode: WebContentNotFound
    RequestId : 5714d6ad-301e-0006-0e4f-e9ecc1000000
    TimeStamp : 2019-04-02T12:27:49.8443130Z

Also find the screenshot:

Tue Mar 26 2019 05:30:00 GMT+0530 (India Standard Time)

creatioN_TIME: Moment {_isAMomentObject: true, _i: "2019-04-01T09:42:49", _f: "YYYY-MM-DDTHH:mm:ss", _isUTC: false, {_isAMomentObject: true, _i: "2019-04-30T09:42:49", _f: "YYYY-MM-DDTHH:mm:ss", _isUTC: false, _pf: {…}, …}

Is it possible to create my login credentials as external login provider in appsettings and use it for login? Because there is no option to login into application without password. You are using LoginAsync method to login. It is accepting the parameter like as username and password or external auth provider details.

Thanks @maliming. It is working now. Can you pls tell me why we not navigate.

i have tried as you mentioned. But it is looping infinite time. The browser is freezing. The code is below:

canActivateInternal(data: Data, state: RouterStateSnapshot): boolean {
        debugger;
        //if (state != null) {
        //    if (_.includes(state.url, 'asap-sso')) {
        //        this._router.navigate(['app/main/asap-sso', 66]);
        //        return true;
        //    }
        //}

        if (UrlHelper.isInstallUrl(location.href)) {
            return true;
        }

        if (!this._sessionService.user) {
            //this._router.navigate(['/account/login']);
            this._router.navigate(['app/main/asap-sso']);
            return false;
        }

        if (!data || !data['permission']) {
            return true;
        }

        if (this._permissionChecker.isGranted(data['permission'])) {
            return true;
        }

        this._router.navigate([this.selectBestRoute()]);
        return false;
    }
Showing 41 to 50 of 121 entries