C
C#β€’2y ago
joy

IIS Deploy ASP NET CORE Project

hi all, i tried to deploy an asp net core project using publish feature (publish to folder) to IIS server but i got this error which i try to search the stackoverlow lots of solution recommend to install net core hosting bundler, but i already installed and can't seem to resolve the issue (another installer i install : url rewrite module), the application is working fine if i run it using visual studio but not if i deploy to iis, can anyone help to advise why?
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
i downloaded the hosting bundler from microsoft site : https://dotnet.microsoft.com/en-us/download/dotnet/6.0
No description
17 Replies
Brainiac V
Brainiac Vβ€’2y ago
Hi there, did you also install the ASP.NET Core module for IIS?
joy
joyβ€’2y ago
i think i havent.. let me try that out..
joy
joyβ€’2y ago
sry i might be mistaken but when i try to search for ANCM for asp net core module i got redirected to here and the microsoft web say it's included inside the hosting bundler for asp net core, is this the correct bundler?
No description
Brainiac V
Brainiac Vβ€’2y ago
then you should be fine, did you restart the IIS service after the installation?
joy
joyβ€’2y ago
i tried to restart my windows, and i got a different issue this time.. do you have any idea what is this? 😦
No description
Brainiac V
Brainiac Vβ€’2y ago
are your .NET versions in sync? I mean that you use the hosting bundle for .NET 6 if your app is also using .NET 6 and also which exact version of the hosting bundle did you install? Can you show the link?
joy
joyβ€’2y ago
yes, my project is using net 6, i double check from the program and i download the hosting bundler for net 6 from this link https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-aspnetcore-6.0.8-windows-x64-installer
No description
Brainiac V
Brainiac Vβ€’2y ago
You didn't install the hosting bundle then πŸ™‚
Brainiac V
Brainiac Vβ€’2y ago
don't select the bit versions listed besides it, just the hosting bundle
joy
joyβ€’2y ago
ohhh.. i thought the bit version is the hosting bundler.. omg... πŸ˜… thank you so much for helping me to check, let me try to install it first..
Brainiac V
Brainiac Vβ€’2y ago
install this, restart the IIS service and give it a new try πŸ™‚
joy
joyβ€’2y ago
okay can.. it works now after i install the correct hosting bundler, i should have pay attention to the link.. thank you so much for your help! ^^
Brainiac V
Brainiac Vβ€’2y ago
you're welcome! πŸ™‚ I had to setup that stuff all myself so I know a lot about how painful it can be sometimes πŸ™‚
joy
joyβ€’2y ago
yeah.. i can't believe i spend hours and hours on this setup... πŸ˜… all the best, have a great day!
Brainiac V
Brainiac Vβ€’2y ago
same to you!