question

POZ9 avatar image
0 Votes"
POZ9 asked POZ9 commented

ASP.NET Website not rendering StyleSheets nor GIF on IIS 10

Hello,
I have moved my ASP.NET website from Windows Server 2008 R2 IIS 7.5 to 2019 IIS 10.
It seems that the website does not render stylesheets nor GIF files when running on IIS 10(?).

Recompiling the website under VS2019 did not help.

Please advise.

windows-server-iis
· 17
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @POZ9 ,

Have you checked the developer mode of your browser? What's the status code and sub status code of CSS files? Then you can check the url of the css file to determine whether the corresponding physical address and file structure are correct.

I recommend you to use web deploy for IIS website migration. It is more simpler and convenient. You can refer to my another answer about how to use web deploy to migrate IIS website.


1 Vote 1 ·
POZ9 avatar image POZ9 BruceZhang-MSFT ·

Hello Bruce,

Thank you for your follow-up.

II am not sure if I follows your instructions correctly, but I have found the following:

  • In IE11, my site running on IIS 10 has 2 errors

Sys.WebForms.PageRequestManager._initialize('ctl00$ScriptManager', 'mainForm', [], [], [], 36000, 'ctl00');

SCRIPT5009: 'Sys' is undefined


WebForm_AutoFocus('coreContent_txtUser');

SCRIPT5009: 'WebForm_AutoFocus' is undefined


  • In Edge, my site running on IIS 10 has 17 errors

Please advise whether it might be a site/script (Ajax) issue and how to debug it.
Just to clarify it, the same code works OK when website is running on IIS 7.5

I will also try your web deploy for IIS website migration next.

0 Votes 0 ·
POZ9 avatar image POZ9 BruceZhang-MSFT ·

i also found suggestions on the web to fix the 'sys' undefined issue;
https://stackoverflow.com/questions/75322/sys-is-undefined

try to add
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" />
try to add
<asp:ScriptManager ID="ScriptManager1" runat="server" EnableCdn="true" />

So I will try them both.

0 Votes 0 ·

Hi @POZ9 ,

You can try suggestions on site that is not working. Create a new site to host the application migrated by web deploy. Then try to visit to see which works.

0 Votes 0 ·
Show more comments

how did you move website from IIS7.5 to IIS10?

0 Votes 0 ·

I set up the website from the scratch on the new server.
Is there a way to copy a website setup from one server to another?

Also, maybe related to the rendering issue:

New website requires a full URL (default page?) specified http://xxx.intranet.db.com/Login.aspx
otherwise I get 403 error upon login.

On new hosting server, needed to add permission for IUSR to website directories, otherwise I was getting 403 error;
Website did not need permission for IUSR on the old server, just IIS_IUSRS.

I hope that I am just missing some correct setup option on the website or IIS itself.

0 Votes 0 ·

0 Answers