title: Deploy plotly dash on IIS
body: <p>I am trying to deploy a plotly dash to IIS.<br/>
  First I followed the instructions in the link: <br/>
  <a href="https://netdot.co/2015/03/09/flask-on-iis/" rel="nofollow noreferrer">Flask on IIS - James Polera</a> <br/>
  then when i use this script it is works:</p>
  
  <pre><code>from flask import Flask
  app = Flask(__name__)
  
  @app.route("/")
  def hello():
      return "Hello from FastCGI via IIS!"
  
  if __name__ == "__main__":
      app.run()
  </code></pre>
  
  <p>but when i use this script it doesn't works for dash:</p>
  
  <pre><code>import dash
  import dash_core_components as dcc
  import dash_html_components as html
  
  app = dash.Dash()
  
  app.layout = html.Div(children=[html.H1('Hello Dash!'),
                                  html.Div('Dash: Web Dashboard with python'),
                                  dcc.Graph(id='example',
                                          figure={'data':[
                                              {'x':[1,2,3],'y':[4,1,3],'type':'bar','name':'SF'},
                                              {'x':[1,2,3],'y':[2,4,5],'type':'bar','name':'NYC'}
                                                          ],
                                                  'layout':{'title':'BAR PLOTS'}
                                                  })
                                  ])
  
  if __name__ == "__main__":
      app.run_server()
  </code></pre>
  
  <p>i get this error:</p>
  
  <pre><code>Error occurred while reading WSGI handler:
  
  Traceback (most recent call last):
    File "C:\inetpub\wwwroot\mysite\wfastcgi.py", line 791, in main
      env, handler = read_wsgi_handler(response.physical_path)
    File "C:\inetpub\wwwroot\mysite\wfastcgi.py", line 633, in read_wsgi_handler
      handler = get_wsgi_handler(os.getenv("WSGI_HANDLER"))
    File "C:\inetpub\wwwroot\mysite\wfastcgi.py", line 600, in get_wsgi_handler
      handler = __import__(module_name, fromlist=[name_list[0][0]])
    File "C:\inetpub\wwwroot\mysite\app.py", line 1, in &lt;module&gt;
      import dash
    File "C:\ProgramData\Anaconda3\lib\site-packages\dash\__init__.py", line 1, in &lt;module&gt;
      from .dash import Dash, no_update  # noqa: F401
    File "C:\ProgramData\Anaconda3\lib\site-packages\dash\dash.py", line 23, in &lt;module&gt;
      import plotly
    File "C:\ProgramData\Anaconda3\lib\site-packages\plotly\__init__.py", line 30, in &lt;module&gt;
      from plotly import (
    File "C:\ProgramData\Anaconda3\lib\site-packages\plotly\graph_objs\__init__.py", line 100161, in &lt;module&gt;
      import ipywidgets
    File "C:\ProgramData\Anaconda3\lib\site-packages\ipywidgets\__init__.py", line 23, in &lt;module&gt;
      from IPython import get_ipython
    File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\__init__.py", line 55, in &lt;module&gt;
      from .terminal.embed import embed
    File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\terminal\embed.py", line 15, in &lt;module&gt;
      from IPython.core.interactiveshell import DummyMod, InteractiveShell
    File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 64, in &lt;module&gt;
      from IPython.utils import io
    File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\utils\io.py", line 94, in &lt;module&gt;
      stdin = IOStream(sys.stdin, fallback=devnull)
    File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\utils\io.py", line 38, in __init__
      for meth in filter(clone, dir(stream)):
    File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\utils\io.py", line 37, in clone
      return not hasattr(self, meth) and not meth.startswith('_')
    File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\utils\io.py", line 81, in closed
      return self.stream.closed
  ValueError: underlying buffer has been detached
  </code></pre>
  
  <p>Someone can help, for two days now that I've been trying to find a solution.<br/>
  Thanks</p>