UWP applicationcontenturirules url rule added but not working for iframe

467 views Asked by At

I am using UWP store app using typescript and winjs. As per requirement we need to load remote web page in our app and that page required some form parameter which are not possible to set with query string as size limitation. so we decided to use IFrame which allow to receive form post data. for this I have add the remote web page URI to the ApplicationContentUriRules section of the package manifest. but getting me below error while performing post form action.

APPHOST9625: Unable to navigate to: 'https://www.mytestweb.com/'. An iframe attempted to navigate to a URI that is not included in the ApplicationContentUriRules for this app. Use a x-ms-webview element to view the URI instead, or add the URI to the ApplicationContentUriRules section of the package manifest so that the iframe can navigate to it. (In Visual Studio, add this URI to the Content URIs tab of the Manifest Designer.)

Is anything I am missing or wrong? I need help to resolve this.

below is my sample code,

<form id="my-form" action="https://www.mytestweb.com/operations" method='post' target="my-iframe">
    <div class="col">
        <div class="row">
            <input type="hidden" name="token" value="largeTokenString" />
        </div>
        <div class="row">
            <input type="hidden" name="transaction" value="serializedTransactionData" />
        </div>
        <div class="buttonContainer">
            <button type="submit" data-bind="click: postFromData">Post</button>
        </div>
    </div>
</form>
<iframe id="my-iframe" name="my-iframe" src="about:blank"></iframe>

When I submit on from post button remote URL loads with form data, without from data my remote URL is not loaded.

1

There are 1 answers

0
Kishor On

I am able to resolve my issue. One of my team member question me, how you know your app refers updated app manifest. I don't know where I find this. So I have uninstall my app from computer clear app memory from app data using app name search and delete. Create new app package using msbuild command and install new app, now my app able to load remote URL successfully in IFrame.