简体   繁体   English

UWP applicationcontenturirules url规则已添加,但不适用于iframe

[英]UWP applicationcontenturirules url rule added but not working for iframe

I am using UWP store app using typescript and winjs. 我正在使用通过打字稿和Winjs的UWP商店应用程序。 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. 因此,我们决定使用IFrame来接收表单发布数据。 for this I have add the remote web page URI to the ApplicationContentUriRules section of the package manifest. 为此,我已将远程网页URI添加到程序包清单的ApplicationContentUriRules部分。 but getting me below error while performing post form action. 但是在执行表单后操作时使我处于错误之下。

APPHOST9625: Unable to navigate to: ' https://www.mytestweb.com/ '. APPHOST9625:无法导航至:' https ://www.mytestweb.com/'。 An iframe attempted to navigate to a URI that is not included in the ApplicationContentUriRules for this app. iframe尝试导航到此应用程序的ApplicationContentUriRules中未包含的URI。 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. 请改用x-ms-webview元素查看URI,或将URI添加到程序包清单的ApplicationContentUriRules部分,以便iframe可以导航到它。 (In Visual Studio, add this URI to the Content URIs tab of the Manifest Designer.) (在Visual Studio中,将此URI添加到清单设计器的“内容URI”选项卡中。)

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. 当我从“发布”按钮提交时,远程URL加载有表单数据,而没有从数据中加载的远程URL未加载。

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. 使用msbuild命令创建新应用程序包并安装新应用程序,现在我的应用程序已能够在IFrame中成功加载远程URL。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM