How can my web map work off https:// instead of file://?

2537
6
03-02-2016 11:48 AM
SG
by
New Contributor II

I used the ArcGIS API for JavaScript to build my web application. I used Notepad++ IDE. I got my IIS Web Server activated by turning on the IIS functionality through Control panel. Do I need to install any other stuff from the IIS Web Site? I am using Windows 10.

0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus

S G,

   Why do you need https? This is more of a basic IIS question, have you searched Google?

How to Install IIS on Windows 8 or Windows 10

0 Kudos
SG
by
New Contributor II

I have installed the IIS on my Windows 10 but yet the application starts with file:// instead of https://

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

S G,

   Have you setup your application in IIS?

Application for a Site <application> : The Official Microsoft IIS Site

0 Kudos
RudyProsser
Esri Contributor

S.G

You've run into a known issue with web applications - the application works differently when accessed using the file protocol in your browser (e.g. file:///c:/myapps/mywebapp.html) versus accessing it through a web protocol (e.g. http://myapps/mywebapp.html). Some IDE's, such as WebStorm, include an internal web server allowing you to launch the application in the browser using the appropriate protocol.

There are two ways to resolve this problem. I'm assuming you're working on a Windows system and have installed IIS. It's available as an OS component but is not usually installed. See Installing IIS 7.5 on Windows.

1. Make an applications folder in the web servers root folder (c:\inetpub\wwwroot) and copy you application to that folder. You can then launch your application using a URL like http://myserver/myapps/mywebapp.html.

2. Configure IIS to use the folder where you're developing your apps as a virtual directory. See How to: Create and Configure Virtual Directories in IIS. You can then launch your application using a URL.

Rudy

SG
by
New Contributor II

Rudy,

I've used both of your suggestions but it didn't work. Do I actually need to have ArcGIS Server installed?

SG

0 Kudos
RudyProsser
Esri Contributor

SG,

No, you don't need ArcGIS for Server to serve up your apps. IIS is enough.

I use NotePad++ and WebStorm for application development with the JavaScript API. WebStorm has an internal web server making it possible to launch the application in a browser directly from the editor. WebStorm will deliver the app to the browser using http. NotePad++ doesn't have an internal web server. Launching the app to the browser use the file:// protocol. If the folder containing your app is available to IIS, then you should be able to open a browser outside of NotePad++ and enter the URL to your application, i.e. http://mywebserver/appfolder/app.html.

Rudy