0

I am publishing my first Flutter web application to a local VM using IIS. I used Visual Studio Code and released the project and zipped it up to transfer it to the server. After placing the file into the root folder of IIS and creating the website bindings I opened the web page and received this Error message

HTTP Error 401.3 - Unauthorized You do not have permission to view this directory or page because of the access control list (ACL) configuration or encryption settings for this resource on the Web server.

I looked around and could not find anything on how to fix the issue. I have two other web pages running on the same IIS and they are both working perfectly fine. This is the first Flutter project so my guess is it's causing this error. I am using Firebase as my database so I am not sure if there is something I must do specific for Firebase to allow access.

These are all the Dependencies I am running in the project:

Dependencies:

flutter:

sdk: flutter



# The following adds the Cupertino Icons font to your application.

# Use with the CupertinoIcons class for iOS style icons.

cupertino_icons: ^1.0.2

cloud_firestore: ^3.1.14

firebase_core: ^1.16.0

firebase_auth: ^3.3.17

http: ^0.13.4

fluro: ^2.0.3

fluttertoast: ^8.0.9

url_launcher: ^6.1.3

json_annotation: ^4.5.0

build_runner: ^2.1.11

json_serializable: ^6.2.0

Does anyone have any ideas?

Aiden P
  • 23
  • 1
  • 8
  • I would like to confirm with you whether you have build your project? If not, you could refer to [this link](https://docs.flutter.dev/deployment/web#building-the-app-for-release) may help you build it. After that you could try to move that 'web' directory to the WWWroot folder on your VM where IIS is installed. Bind that 'Web' folder with the site binding. Restart the site and visit it in the browser. – Deepak-MSFT Jun 29 '22 at 02:39
  • We need to know how you created that site on IIS (authentication, application pool identity and so on) and which folder is being used (whether it is under My Documents or another special folder). Edit the question body to include such key information please, or no one can easily help further. – Lex Li Jun 29 '22 at 04:48
  • @Deepak-MSFT I have in fact built the project and done everything you stated before I even hit the site to see if it was working. The built web files are in the root folder with the filepath of the website pointing to the files. – Aiden P Jun 29 '22 at 11:01
  • Try to go to the site folder in file explorer and add IIS_IUSRS and IUSR group and give the necessary permissions to it. Go to IIS-> select your site -> Open the Authentication -> Select Anonymous Authentication -> Edit -> Select the option Specific User and set its value as IUSR. Restart the site and try to visit the site in the browser. – Deepak-MSFT Jun 30 '22 at 03:02

1 Answers1

0

Under the site that is causing the issue select the Authentication option and right click on the Anonymous Authentication and select edit. If the specific user is blank select the Application pool identity. This method does work.

Aiden P
  • 23
  • 1
  • 8