Click here to Skip to main content
15,906,455 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a C# project developed using VS2013 and that solution has been deployed in my IIS. Its working fine without any issues.

I had updated the solution to make use of VS2017.
I have fixed the build issues by adding latest references accordingly.
I am able to debug the solution successfully.
But while I deploy the new solution to IIS, home page is not loading.

I am getting http 401 error.

What I have tried:

<HintPath>..\packages\Microsoft.Web.Infrastructure.2.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>

 <Reference Include="System.Net" />
    <Reference Include="System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.Helpers.dll</HintPath>
Posted

1 solution

Start by looking for what http 401 error[^] actually means - it's pretty simple!
Quote:
You may see the “Error code 401” if you try to access an outdated or misspelled URL. It means that the URL is non-existent, and the server may return a server error “401 Unauthorized Access”. Maybe you saved the page address in your browser, but the page address has been changed, or it has been deleted.

I'd start by looking at the Page Load method, and checking all URL's there, and then do the same for all config files.
If they all look right and appear to work, check the folder's you code is using and the user permissions on those folders - remember that websites don't run under your "normal user" account, but a specific account for IIS. If you have migrated this site to a new server (and that's likely given you are probably upgrading the .NET version) then you may have missed some folder permissions.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900