-1

i have devloped the c# asp.net web application with master page. its working fine in localhost but when i publish it in IIS. it is not run properly, inside the devloper tools find the error "Failed to load resource: the server responded with a status of 404 () /Content/css/?v=jRhCwhzcqoKX5UO6Ep4Zb2Fys6l96h5HP2M3bMA_9hk1:1"

<webopt:bundlereference runat="server" path="~/Content/css" /> bootstrap.css (Bootstrap-v5.2.3) and site.css files are inside this folder path.. i am using visual studio 2019, .Net famwork 4.8 and IIS-10.

I tried by many way to solve this problem but i could not get sucesss... Please help me.... Thanks...

1 Answers1

0

The issue happens when you really have a css folder in Content. The site.css file should be in the "Content" folder directly despite the path is "~/Content/css". You can compare with visual studio default webform application, there won't be a css folder in the published files. You can rename this folder.

The other thing you can try is in the web.config, in the section of <system.web> add

<compilation debug="true" targetFramework="4.8">
Qiang Fu
  • 1,401
  • 1
  • 2
  • 8