Search code examples
windowsvisual-studioservermsdeploy

ERROR_USER_UNAUTHORIZED visual studio 2019 deploy IIS. Noob


I'm setting up an asp.net server for school and I am getting ERROR_USER_UNAUTHORIZED.

I have looked over the internet and everyone says that it has to do with not being administrator or not having access to the site. I am just getting confused. I added the user to the local administrator group. added him to iis manager permissions and to IIS manager users in like 3 different ways (same user different type of name, with server/name, name, iis manager user name).

Man I am just trying to publish to this server and I've been at it for like 5 hours (not that much but still I havent gotten any further at all).

To give some more detail:

I setup a publish profile in visual studio, correct host, username,password,site name and I think correct url (we have no dns setup yet so its just the ip of the server). INTERESTING PART HERE (I Think) when I click validate connection it works correctly (in edit) but when I publish it gives the error stated above. Also when I change https to http in the url it makes the error ERROR_USER_NOT_ADMIN, which the user is... .

To summarize, I have no clue what I am doing please help me god.

Take as long as you want to, I just want to get this done.


Solution

  • I forgot to mark this as solved and post the solution. Apparently the solution was that I didn't mark the folder(inside the site in iis manager) as an application. Solution is simply, open iis, select the server, select the site, right click the main folder with all your stuff, click mark as application.

    I couldn't find this anywhere on the internet or on the help page it shows but it solved the problem. (litterally just started to turn insane a bit after trying stuff for 5 hours so stopped and went at it again next day and solved it in 5 minutes).