4

My goal is to run flash locally on a Windows Surface RT tablet. From research, I have found that for websites to run flash, they have to be whitelisted on Microsoft's website. Through further research, I have found how to hack the whitelist to add any domain: http://www.redmondpie.com/how-to-enable-flash-for-any-site-in-windows-8-rt-metro-internet-explorer-10/.

However, I cannot add the local file system (i.e. C:\ or file:\\) as they are not domains. One solution, I have though of is by using localhost. How can I write a web server to run on Windows 8 Surface RT, or can it be done?

In C#, I know you can use System.Net.HttpListener: http://www.codehosting.net/blog/BlogEngine/post/Simple-C-Web-Server.aspx. Is System.Net.HttpListener supported with Surface RT? If not, what are alternative solutions to play flash locally?

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
jth_92
  • 1,120
  • 9
  • 23
  • 1
    HttpListener is not supported by the windows store api. All network relelated classes are client side. Unless there is a hack/workaround/some other class it is not possible to have a server running (using WinRT) – Brad Semrad Nov 16 '12 at 21:42
  • Adobe is "committed" to bringing Adobe Air to Windows RT (Metro). Lee Brimelow (works at Adobe) tweeted that it should be released first half of 2013: https://twitter.com/leebrimelow/status/268815503349411841 Not sure if that's good news or bad news for you. – Chris Sinclair Nov 16 '12 at 21:59

1 Answers1

3

Theoretically, it is possible. You need to use StreamSocketListener to get a StreamSocket. Then you handle http input from that socket (tons of work), and send back your response. I've made my protocol work. One thing you might need to pay attention is that you might need a second machine to send the http request. I use IE from another PC to send the test request. Win8 network isolation won't allow tcp connections between 2 apps of a same machine...

Anujith
  • 9,370
  • 6
  • 33
  • 48
jie chen
  • 46
  • 2
  • 1
    If it helps, network isolation DOES allow the use of localhost within the same process. See http://msdn.microsoft.com/en-us/library/windows/apps/hh770532.aspx#network_isolation_and_loopback. "Network communications using an IP loopback address cannot be used for interprocess communication (between two different apps) because this is restricted by network isolation. Network communication using an IP loopback address is allowed within an app within the same process for communication purposes." – Rory MacLeod Mar 22 '13 at 16:49