Strange "&#65279" character after upgrading to Asp.Net Core RC2
Asked Answered
S

4

10

After I upgraded to Asp.Net RC2 a couple of strange things started happening. I first thought that it might have something to do with how I ported my app. But creating a new default web app produces the same result when I run it:

enter image description here

Notice how everything in the head is now in the body (no idea why). This is causing some visual problems. This is one (along a couple others), there is a gap after the navbar and before the body:

enter image description here

After a while I tried running in Edge and Firefox, and it seems the problem only happens on Google Chrome. I absolutely made sure I have no BOM characters.

Seigneury answered 21/5, 2016 at 9:54 Comment(0)
M
7

This is an issue with BrowserLink: https://github.com/aspnet/Mvc/issues/4671

Metalline answered 21/5, 2016 at 15:59 Comment(0)
H
4

As mentioned by @Tratcher it's an issue with BrowserLink. If you're not using it, just comment the line in Startup.cs that activates BrowserLink:

if (env.IsDevelopment())
{
    app.UseDeveloperExceptionPage();
    app.UseDatabaseErrorPage();
    //app.UseBrowserLink();
}
Helotism answered 31/5, 2016 at 15:8 Comment(0)
K
1

I had this problem and I don't use browser link. Check if there an Empty Line at the start of any .cshtml doc. Mostly its in the _Layout.cshtml. This worked for me.

Karolynkaron answered 9/3, 2017 at 13:50 Comment(1)
In my case the line wasn't blank but the very first character was the &#65279 - invisible but deleteable.Deposition
B
1

I had a similar issue, in my .cshtml file was UTF-8-BOM, I did use notepad++ to open the file and then switched using notepad++ Hexa editor plugin and noticed there was an invisible character just in front of @model. I did remove that character and changed the encoding of the file to UTF-8 and fixed the issue.

enter image description here

Bleeding answered 9/2, 2021 at 19:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.