Microsoft EDGE使用typescript文件报告XHR HTTP404(Microsoft EDGE reports XHR HTTP404 with typescript file)

当我从Visual Studio 2015调试Typescript Web应用程序时,使用Microsoft EDGE浏览器报告以下内容;

HTTP404: NOT FOUND - The server has not found anything matching the requested URI (Uniform Resource Identifier).
(XHR): GET - http://localhost:2543/scripts/Helpers/jsontable.ts

我的项目中有一个jsontable.ts文件,但它jsontable.ts scripts下。 我还在我的解决方案中进行了全文搜索,并且除了在_references.ts文件中之外我还没有找到对'jsontable.ts'的其他引用。 问题仍然存在。 其他浏览器不会在F12网络窗格中报告此错误(使用Internet Explorer 11,Chrome,Opera和FireFox进行测试)。 我知道我不会在我的申请中自己从其他州发送此请求。 有没有其他人经历过这个。 有什么问题吗?


When I debug a Typescript web-application from Visual Studio 2015, using the Microsoft EDGE browser it reports the following;

HTTP404: NOT FOUND - The server has not found anything matching the requested URI (Uniform Resource Identifier).
(XHR): GET - http://localhost:2543/scripts/Helpers/jsontable.ts

I have a jsontable.ts file in my project, but it is NOT located under scripts. I have also done a full text-search in my solution, and haven't found other references to 'jsontable.ts' other than in the _references.ts file which I have now removed. The problem is still there. Other browsers doesn't report this error in the F12 network-pane (tested with Internet Explorer 11, Chrome, Opera and FireFox). I know for sure I don't send this request myself from other states in my application. Has anyone else experienced this. Is there any fix?


原文:https://stackoverflow.com/questions/34244816
2024-03-26 08:03

满意答案

所以我最终放弃了Bing,并使用了GoogleMaps。 说实话,第一次尝试就像魅力一样! 使用Microsoft工具太多了......

无论如何...

首先是在index.html中加载gogle API:

<script src="http://maps.googleapis.com/maps/api/js"></script>

然后,在控制器中,在容器中添加GoogleMaps API(如果需要,还可以将引脚添加到中心:

var tmpMap = new google.maps.Map(document.getElementById('myContainer'), {
    center: {
        lat: parseFloat($scope.lat),
        lng: parseFloat($scope.long)
    },
    zoom: 12,
    mapTypeId: google.maps.MapTypeId.ROADMAP
});

var tmpMarker = new window.google.maps.Marker({
  position: tmpMap.getCenter(),
  map: tmpMap,
  title: 'My Title'
});

然后,设置容器的大小(与BingMaps相反,Google不会调整容器的大小..所以没有大小,你将无法看到任何东西)

最后,将CSP设置为接受来自googleapi.com/*的代码。在此示例中,Il打开了所有内容的CSP,这对真正的应用程序来说不是一件好事:

<meta http-equiv="Content-Security-Policy" content="default-src *; style-src * 'unsafe-inline'; script-src *">

瞧!

谷歌是爱,谷歌是生命:)


So I finaly gave up on Bing, and used GoogleMaps instead. And to be honest, it works like charm on the first try ! So much for using Microsoft tools...

Anyway...

First is to load the gogle API in the index.html :

<script src="http://maps.googleapis.com/maps/api/js"></script>

Then, in the controller, add the GoogleMaps API in the container (and adding a pin to the center if needed :

var tmpMap = new google.maps.Map(document.getElementById('myContainer'), {
    center: {
        lat: parseFloat($scope.lat),
        lng: parseFloat($scope.long)
    },
    zoom: 12,
    mapTypeId: google.maps.MapTypeId.ROADMAP
});

var tmpMarker = new window.google.maps.Marker({
  position: tmpMap.getCenter(),
  map: tmpMap,
  title: 'My Title'
});

Then, setting a size to the container (contrary to BingMaps, Google doesn't resize the container.. So without a size, you won't be able to see anything)

Finaly, set the CSP to accept code from googleapi.com/* In this sample, Il opened the CSP to everything, which is not a good thing to do on a real app :

<meta http-equiv="Content-Security-Policy" content="default-src *; style-src * 'unsafe-inline'; script-src *">

And voilà !

Google is love, Google is life :)

相关问答

更多

允许Web套接字的content-security-policy元标记(content-security-policy meta tag for allowing web socket)

我有一个类似的问题。 这影响Cordova 5.xx请参阅Nic Raboy的这篇博客文章https://blog.nraboy.com/2015/05/whitelist-external-resources-for-use-in-ionic-framework/ 我不得不稍微调整元标记以使我的websocket连接。 这是什么样的; <meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'se...

内容安全政策cordova问题(Content Security Policy cordova problems)

您已在style-src部分添加了url,如果您尝试加载远程脚本源,则必须在script-src部分中添加源URL。 <meta http-equiv="Content-Security-Policy" content="default-src * data: cdvfile: gap:; style-src 'self' https://cdn.firebase.com https://*.firebaseio.com...

Bing地图绘图工具模块(Bing Maps Drawing Tools Module)

Bing Maps V8内置了绘图工具。使用它可以替代我为V7创建的旧绘图工具模块(旧版本不像V8中的内置工具那么好)。 这里有一些资源: https://bingmapsv8samples.azurewebsites.net/#DrawingTools_Basic https://www.bing.com/api/maps/sdkrelease/mapcontrol/isdk#dtDrawThings+JS https://msdn.microsoft.com/en-US/library/mt7...

Bing语音和Bing地图在Windows 8商店应用中存在冲突(Bing Speech and Bing Maps conflicting in Windows 8 Store app)

我之前遇到过这种情况。 语音API可能会覆盖Microsoft名称空间。 有两种选择。 第一种是在语音参考之后添加Bing Maps脚本引用。 Bing Maps SDK扩展了Microsoft命名空间,但不会覆盖它。 第二个选项是更改Bing Maps控件的命名空间: 在引用html文件中的sdk js文件之前添加片段,如下所示: 窗口。$ MapsNamespace = 'MicrosoftJS' ; 然后用'Microsoft'替换新创建的自定义命名空间,如下所示: MicrosoftJS ...

使用Bing映射和Bootstrap(Using Bing maps with Bootstrap)

添加style="position:relative; width:400px;"后,我能够获得所需的布局 到包含地图的div 。 function LoadMap() { var map = new VEMap('pnlMap'); map.LoadMap(); } <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <script src="https...

“找不到内容安全策略元标记”(“No Content-Security-Policy meta tag found”)

所以跑完后: tns build android 这条消息似乎消失了。 不太确定这将如何改变,但希望这能帮助别人。 So after running: tns build android This message seem to go away. Not really sure how that would make a difference, but hopefully that will help someone.

内容 - 安全 - 政策问题(Content-Security-Policy issue)

您的页面上有一个内联脚本,例如: <script> ... </script> 这可以直接在您的HTML或使用的组件中(例如,您拉入到您页面的Facebook小部件添加此内容),也可以在您的浏览器使用的浏览器扩展中。 您可以通过在配置中添加unsafe-inline来允许此在线脚本,如下所示: <IfModule mod_headers.c> Header set Content-Security-Policy "script-src 'unsafe-inline' 'self' https:/...

让bing地图全部铺设(Make bing maps streetch all the may)

使用“*”使行和列填充容器的其余部分 也可以使用Grid.ColumnSpan =“2”,以便地图跨越两列 <Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <!--TitlePan...

在Phonegap / cordova Android APP中使用内容安全策略连接REST API的正确方法是什么(What is the right way of connect to a REST API with content security policy in a Phonegap/cordova Android APP)

请尝试以下方法 <plugin name="cordova-plugin-whitelist" source="npm" spec="1.1.0" /> <allow-navigation href="*" /> <allow-intent href="*" /> <access origin="*" /> <preference name="permissions" value="none"/> The white-listing configurat...

Cordova + Bing地图+内容安全政策(Cordova + Bing Maps + Content Security Policy)

所以我最终放弃了Bing,并使用了GoogleMaps。 说实话,第一次尝试就像魅力一样! 使用Microsoft工具太多了...... 无论如何... 首先是在index.html中加载gogle API: <script src="http://maps.googleapis.com/maps/api/js"></script> 然后,在控制器中,在容器中添加GoogleMaps API(如果需要,还可以将引脚添加到中心: var tmpMap = new google.maps.Map(d...

相关文章

更多

Interviewing at Microsoft

转自:http://www.cnblogs.com/GT_Andy/archive/2010/02/0 ...

摘抄---Multimedia Streaming on Microsoft Windows CE 3.0

Multimedia Streaming on Microsoft Windows CE 3.0 ...

Hadoop——Microsoft大数据战略的核心

如今,Microsoft已经将Hadoop作为自身大数据战略的核心。Microsoft此举的理由就是看 ...

Java 流(Stream)、文件(File)和IO

Java 流(Stream)、文件(File)和IO Java.io包几乎包含了所有操作输入、输 ...

《微软Windows 8新特性和功能教程》(VTC.com Microsoft Windows 8 Introduction Course)[光盘镜像]

中文名: 微软Windows 8新特性和功能教程 英文名: VTC.com Microsoft ...

PHP 中dirname(_file_)

PHP 中dirname(_file_) 2007-5-3 16:00|查看: 19256|评论: ...

【HDFS】HADOOP DISTRIBUTED FILE SYSTEM

【HDFS】Hadoop DISTRIBUTED FILE SYSTEM THE CAST CLIEN ...

shell 脚本执行,出现错误bad interpreter: No such file or directory

出现bad interpreter:No such file or directory的原因 是文件格 ...

Hadoop HDFS Wrong FS: hdfs:/ expected file:///

HDFS是一个分布式文件系统,然而对于程序员来说,HDFS就是一个普通文件系统,Hadoop进行的底层 ...

My W3C Custom Mapping File

[hdhw] HotKey=W Tip=Train Dragonha|cffffcc00w|r ...

最新问答

更多

如何在Laravel 5.2中使用paginate与关系?(How to use paginate with relationships in Laravel 5.2?)

请尝试以下方法: $messages = $user->contact_messages()->paginate(10); Try the following: $messages = $user->contact_messages()->paginate(10);

linux的常用命令干什么用的

linux和win7不一样,win7都图形界面,都是用鼠标来操作打开,解压,或者关闭。而linux是没有图形界面的,就和命令提示符一样的一个文本框,操作linux里的文件可没有鼠标给你用,打开文件夹或者解压文件之类的操作都要通过linux常用命令。

由于有四个新控制器,Auth刀片是否有任何变化?(Are there any changes in Auth blades due to four new controllers?)

它创建了这些视图: 'auth/login.blade.php', 'auth/register.blade.php', 'auth/passwords/email.blade.php', 'auth/passwords/reset.blade.php', 'layouts/app.blade.php', 'home.blade.php' 并修改这些文件: 'Http/Controllers/HomeController.php', 'routes/web.php' 如果使用--views

如何交换返回集中的行?(How to swap rows in a return set?)

您可以使用特殊的CASE表达式进行ORDER BY如下所示: SELECT * FROM table ORDER BY CASE id WHEN 3 THEN 8 WHEN 8 THEN 3 ELSE id END You can ORDER BY using a special CASE expression like this: SELECT * FROM table ORDER BY CASE id WHEN 3 THEN 8 WHEN 8 THEN 3 ELSE id END

在ios 7中的UITableView部分周围绘制边界线(draw borderline around UITableView section in ios 7)

我建议你制作一个新的TableView Cell,在这个newTableViewCell中,加载第2节中的所有单元格,然后为newTableViewCell提供边框。 但如果您不想这样做,那么您可以使用以下代码: @property(strong,nonatomic) CAShapeLayer* borderPath; -(void)viewDidLayoutSubviews{ [_borderPath removeFromSuperlayer]; UIView *viewToGiveBord

使用Boost.Spirit Qi和Lex时的空白队长(Whitespace skipper when using Boost.Spirit Qi and Lex)

出于一些奇怪的原因,我现在发现了一个不同的问题, Boost.Spirit SQL语法/词法分析失败 ,其中提供了一些其他解决方案来进行空格跳过。 一个更好的! 以下是根据建议重新编写的示例代码: #include #include #include #include #include #incl

Java中的不可变类(Immutable class in Java)

1.如果我只有final变量的课程? 这会让你远离但不是全部。 这些变量的类型也需要是不可变的。 考虑一下 class MyImmutableClass { // final variable, referring to a mutable type final String[] arr = { "hello" }; // ... } 这允许有人做 myImmutableObject.arr[0] = "world"; 并有效地改变你的不可变类的对象。 此外,建议禁

WordPress发布查询(WordPress post query)

如果你想要在div中包含所有帖子: post_parent) { $myposts = get_posts('numberposts=10&tag=medical&order=DESC'); echo ' '; foreach ($myposts as $post): ?>

如何在关系数据库中存储与IPv6兼容的地址(How to store IPv6-compatible address in a relational database)

我不确定哪个是MySQL的正确答案,因为它本身还不支持IPv6地址格式(尽管“ WL#798:MySQL IPv6支持 ”表明它将在MySQL v6.0中,当前文档不支持)。 不过,你建议的人建议去2 * BIGINT,但要确保他们是UNSIGNED。 在IPv6的/ 64地址边界处有一种自然分割(因为/ 64是最小的网格块大小),这将与其很好地对齐。 I'm not sure which is the right answer for MySQL given that it doesn't y

是否可以检查对象值的条件并返回密钥?(Is it possible to check the condition of a value of an object and JUST return the key?)

您可以使用Object.keys和Array#find来获取匹配value的key 。 const letters = {a:'26',b:'25',c:'24',d:'23',e:'22',f:'21',g:'20',h:'19',i:'18',j:'17',k:'16',l:'15',m:'14',n:'13',o:'12',p:'11',q:'10',r:'9',s:'8',t:'7',u:'6',v:'5',w:'4',x:'3',y:'2',z:'1'}; function sw