Issue
Our Dot Net Core 5 is hosted on Linux Azure Web App, which contains angular 12 web apps.
this.router.navigate([]).then((result) => {
window.open('/flight/flight-book?flightdata=' + encodeURIComponent(this.encryptData(hiddenvalue)), '_blank');
});
Now the above code is running on the browser getting an error - HTTP ERROR 414 - URL Too Long but running in localhost it is working fine.
We think that the azure web app is stopping this URL to render on the browser. Even on web.config we mention the below code but still not working.
<system.webServer>
<!-- Here you have other settings related to handlers.-->
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="10485760" maxUrl="1000241" maxQueryString="3002768" />
</requestFiltering>
</security>
</system.webServer>
Solution
I solved this by localStorage API, finally, I can able to work with the long text value for multiple pages across the application.
localStorage.setItem("flightinfo", JSON.stringify(this.countries));//set value
localStorage.getItem('flightinfo' + paramGuid);//get value
It's working for me, Thanks.
Answered By - D S
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.