Permission denied by user -iis 10

Shervin Ghamghamy 1 Reputation point
2021-12-21T05:27:40.56+00:00

I am learing HTML5 Programming using Head
First HTML5 Programming book. I also set up IIs 10 as my local webserver.
There is this short code that I typed in. It is supposed to find the
distance and display a google map next to it.
However when I enter localhost/My Location, it only displays the
distance-longitude and latitude. Google map does not display.

I also tried it a different way:

-Saved the folder My Location in wwwroot directory with three files myLoc.js, myLoc.html and myLoc.html in it.

-Added a website in IIS10.

When I browse the website within IIs Manager I get Permission denied by user.
I tried this with google chrome, edge and firefox browsers. Neither one shows the map next to or under the distance info. And I get different error message with each.

With the google chrome browser I get:
Failed to load resource: the server responded with a status of 403 (Forbidden)

159148-google-browser.png

This is using localhost within IIS 10 Manager

159100-iis-manager-image.png

This is with Microsoft edge:

159135-my-location-opening-with-edge.png

As you can see google map is not showing either way.

Here are my source codes:
159221-f9c84617ed2d02de2f582b6993126884.png

159222-f6a234e24b68dca15bcd061ee9be9273.png

159212-a0476b80b0c4b6f4c9429572259d28d3.png

159182-695ab137a3ba0496ba7563e349789011.png

when I point my device to http;//wickedlysmart.com/html5/chapter5/latlong/mylocation I get the following image.

159224-8cd93417e34d5f72ce3534d434156c7e.png

Why IIS Webserver or other browsers are unable to show the google map?.
Please help. Thx.

Windows development | Internet Information Services
{count} votes

1 answer

Sort by: Most helpful
  1. Sam Wu-MSFT 7,561 Reputation points Microsoft External Staff
    2021-12-22T02:15:10.373+00:00

    @Shervin Ghamghamy

    The problem should appear on the Google Maps APIs, As per Google announcement, usage of the Google Maps APIs now requires a key. If you are using the Google Maps API on localhost or your domain was not active prior to June 22nd, 2016, it will require a key going forward. You can refer to the Google Maps APIs documentation to get a key and add it to your application.

    Create a Google Maps API Key.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.