http://blogs.msdn.com/b/webdev/archive/2013/07/29/10430221.aspx

Browser Link feature in Visual Studio Preview 2013

Browser Link is just a channel between your Visual Studio IDE and any open browser. This will allow dynamic data exchange between your web application and Visual Studio.

This feature is enabled by default in Visual Studio 2013 Preview. When Browser Link is enabled we register an HTTPModule with ASP.NET, which will then inject a <script> reference to every page request from the server. It is this JavaScript that does the magic of connecting the browser to Visual Studio. For Preview, we have a feature called the “Refresh Linked Browsers” that makes use of this channel between browsers and IDE.

Because the browser-side code is all JavaScript, it should work on all browsers, without requiring any other browser plug-in. It also works on iPad/ iPhone emulators. The connection between the browser and Visual Studio uses SignalR, an ASP.NET technology for bi-directional communication over HTTP. When Browser link is enabled, Visual Studio acts as a SignalR server, to which multiple clients (the browsers) can connect.

Let me try to walk you through the feature with a few questions:

1. What does the Browser Link feature look like?

As mentioned earlier, “Refresh Linked Browser” is the only feature that we have for Preview. This shows up with a little Refresh icon   in your toolbar next to debug drop down .

This feature becomes active as soon as you navigate to a page in your current project. You could do F5, Ctrl+F5, “View in Browser” or open any browser and paste your requested url to get this started.

In the image below you can see that:

1.  “Refresh Linked Browsers” is active as you may have browsers opened at this point.

2.  Brower Link feature is ON by default.

3.  “Refresh Linked Browsers” has a keyboard shortcut (Ctrl+Alt+Enter).

2. How will I know which browsers are connected to VS?

Once you navigate to your page using various browsers, they will be listed in a tooltip as you hover over the Refresh icon

The tooltip will look like the image below. Note that the tooltip shows how many browsers are connected. It also lists the connections with their respective urls.

If there are no browsers open for the project currently open in Visual studio, the tool tip will look like the image below. At this point you can do a View in Browser of a page to start the connection.

3. How does “Refresh Linked Browsers” work?

Let us assume that you want to quickly see how “Default.aspx” renders in various browsers.

Start off with launching “Browse with” and select multiple browsers(IE, Firefox, Chrome etc). At this point, VS will show you that there are 3 browsers connected.

Make an edit to Default.aspx  file . Change text in <h1> ASP.net </h1> to ASP.NET 4.5. Now click on the refresh button or do Ctrl+Alt+Enter to save and refresh the page. This will update all the browsers at once. Note that, this will only refresh the browser. It will not navigate to the page for you.

4. How do I know if Browser Link is turned ON?

Go to “View Source” of your rendered page and you will see a script tag at the very bottom. See image below. The presence of this script indicated that Browser Link feature is enabled.

4. How do I turn off Browser Link?

You can uncheck “Enable Browser Link” and it will be turned off “ Browser Link” for all future requests made.

You can also use the following appsettings in your web.config file.

1. Set appSetting “vs:EnableBrowserLink” to “false ““. This will  disable Browser Link.

2. Set debug= false in web.config file. This will  also disable Browser Link. Note that debug= true is required for Browser Link feature to work.

5. What is coming up for RTM?

For RTM we will have Browser Link available as an extensible API for users to write extensions that can talk to various browsers and VS. Stay tuned and we will be posting details of this soon.

Known Browser Link issues for Preview:

1. The Browser Link script tag is injected after the body tag. This will be moved inside the body tag for the next release.

2. “Refresh Linked Browsers” will not work for HTML pages. This can be fixed by enabling  Run All Managed Modules in  your web.config settings.

3. Browser Link does not work for sites that aren’t hosted on localhost.

4. We do not work on default Website Templates. This is because  debug flag is set to false in web.config. You will have to set the debug flag to true for Browser Link to start working.

 -----------------------------------

Simulate Popular Mobile Devices for Testing

http://www.asp.net/mobile/device-simulators

You can download emulators for popular mobile devices and browsers by following these links
Device or Browser Emulator / Simulator

BrowserStack Hosted Browser Virtualization 

BrowserStack Hosted Browser Virtualization

Test your local or production environment in any browser on any platform. You can create a tunnel between your machine and the BrowserStack network in your own hosted virtual machine. Make sure to get theBrowserStack Visual Studio Extension for an even more seamless experience.

Windows Phone

Windows Phone SDK Downloads

The Windows Phone Software Development Kit (SDK) includes all of the tools that you need to develop apps and games for Windows Phone

iPhone / iPod / iPad

Electric Plum

iPhone and iPad Simulators for Windows, as well as a Responsive design tool. Can integrate with VS 2012 "Browse With.." option.

Android

Android SDK homepage

Opera Mobile / Opera Mini

Latest versions: Opera Developer Tools home

Opera Mini 4.2: Online Java-based simulator

Windows Mobile 6.5.3

Windows Mobile 6.5.3 Developer Tool Kit

Note that to give the phone network access, you also need the VPC Network Adaptor included in Virtual PC 2007 . To connect IE on the phone to your Visual Studio development server, see Kiran Patil's blog post .

Windows Mobile 6.1

Emulator images for Visual Studio 2005/2008

Note that if you want to view your application on a real mobile device (which is the only option for fully testing iPhone or iPad, since there's no true emulator for Windows) you'll need to host your application in IIS or IIS Express. You can't easily use Visual Studio's built-in web server for this, because it won't respond to requests from other machines.

[转载]Browser Link feature in Visual Studio Preview 2013的更多相关文章

  1. please wait while windows configures microsoft visual studio professional 2013 [转载]

    2016年5月30日 VS3013安装update 2以后,打开offie出现"please wait while windows configures microsoft visual s ...

  2. Microsoft Visual Studio Ultimate 2013 RC 离线安装程序

    Microsoft Visual Studio Ultimate 2013 RC 离线安装程序 ☆ 微软官网地址:☆ http://www.microsoft.com/en-us/download/d ...

  3. Microsoft Visual Studio Ultimate 2013 Update 2 RC 英文版--离线完整安装ISO+简体中文语言包

    VS2013.2_RC_EN_Full.iso:名称:Microsoft Visual Studio 2013版本:Ultimate 2013 Update 2 RC语言:English在线下载:ht ...

  4. Visual Studio Ultimate 2013 with Update 4

    Visual Studio Ultimate 2013 with Update 4 是一个先进的开发解决方案,各种规模的团队通过它均可设计和创建引人注目的应用程序,使用户兴致勃勃. Visual St ...

  5. Microsoft Visual Studio Ultimate 2013 with Update 3 CN+EN

    官方90天试用版. Microsoft Visual Studio Ultimate 2013 with Update 3 - 简体中文DVD5 ISO image (SHA-1: 9A306631A ...

  6. Microsoft Visual Studio Ultimate 2013 旗舰版 有效注册密钥

    Visual Studio Ultimate 2013 KEY(密钥):BWG7X-J98B3-W34RT-33B3R-JVYW9 Visual Studio Premium 2013 KEY(密钥) ...

  7. Visual Studio 2010/2013 查看DLL接口(函数)

    1. “应用程序" Visual Studio 2010/2013 的Visual Studio Tools文件夹中打开Visual Studio Command Prompt 命令提示窗口 ...

  8. Visual Studio Community 2013,功能完整,免费使用

    http://www.infoq.com/cn/news/2014/11/VSC2013 微软刚刚宣布了.NET平台的开源计划,与此同时,它还推出了源自Visual Studio Profession ...

  9. Microsoft Visual Studio Ultimate 2013密钥

    Visual Studio Ultimate 2013 KEY(密钥):BWG7X-J98B3-W34RT-33B3R-JVYW9Visual Studio Premium 2013 KEY(密钥): ...

随机推荐

  1. python 游戏(龙的国度)

    1. 理清楚游戏思路 实现功能:2个洞穴选择,一个洞穴是好龙,一个洞穴是坏龙,坏龙可以概率屠龙或者概率逃跑选项(后续难度需要增加宝藏获取装备,随机遇见商人,随着游戏进度逐步减少屠龙概率) 2. 计数和 ...

  2. PAT甲题题解-1017. Queueing at Bank (25)-模拟

    有n个客户和k个窗口,给出n个客户的到达时间和需要的时长有空闲的窗口就去办理,没有的话就需要等待,求客户的平均时长.如果在8点前来的,就需要等到8点.如果17点以后来的,则不会被服务,无需考虑. 按客 ...

  3. PAT甲题题解1099. Build A Binary Search Tree (30)-二叉树遍历

    题目就是给出一棵二叉搜索树,已知根节点为0,并且给出一个序列要插入到这课二叉树中,求这棵二叉树层次遍历后的序列. 用结构体建立节点,val表示该节点存储的值,left指向左孩子,right指向右孩子. ...

  4. 【Alpha】功能规格说明书

    更新说明:从用户需求分析中剥离有关用户场景分析部分,加入功能规格说明书. Github地址:https://github.com/buaase/Phylab-Web/blob/master/docs/ ...

  5. Alpha冲刺第7天

    Alpha第7天 1.团队成员 郑西坤 031602542 (队长) 陈俊杰 031602504 陈顺兴 031602505 张胜男 031602540 廖钰萍 031602323 雷光游 03160 ...

  6. Activiti End Event及其派生类使用范例

    http://tynerblain.com/blog/2006/08/11/bpmn-end-events-1/ 普通流程完结就用end event,而比如无效卡支付时,就会进入cancel end  ...

  7. EntityFramework中Json序列化的循环引用问题解决--Newtonsoft.Json

    1.在使用EF时,由于数据库主外键关联,将对象进行Json序列化时会遇到循环引用的问题 //EF 中由于数据库主外键关联,对象的序列化经常出现循环引用问题 //使用.Net 自带的序列化工具,序列化出 ...

  8. Dubbo 生态添新兵,Dubbo Admin 发布 v0.1

    为了提升 Dubbo 里程碑版本2.7.0的使用体验,我们于去年年中启动了 Dubbo Admin 的重构计划,并作为Dubbo生态的子项目,于近期发布了v0.1,重构后的项目在结构上的变化如下: 将 ...

  9. 自学huawei之路-AC6005-8AP添加授权码

    返回自学Huawei之路 自学huawei之路-AC6005-8AP添加授权码

  10. Appium+python自动化获取toast消息(windows版)的方法

    原来用的Appium1.5.3GUI版本,那为什么升级呢? 为了兼容最新版本的iOS10和Android7 Xcode8升级后,将不支持使用UIAutomation,而是改为使用XCUITest了,并 ...