Apparently there are some folks out there that use Safari, I assume most of us ASP geeks are not part of this group (at least until the iPhone come out). Microsoft obviously neither, and ASP.NET does not recognize Safari correctly. For example the asp:Menu does not display right in Safari.
There are tons of posts about this problem, ranging from using BrowserCaps to switching to CSS Adapters.
Issue here is that Browser Caps are deprecated in ASP.NET 2.0.
Nice solution, but a little bit more time consuming to implement.
Needs browser specific coding.
Browser Definition File:
This is what I used. Simple and effective.
The issue with the Browser Definition File solution is that everybody wrote that one has to change the \windows\framework\v2…\config\browsers\mozilla.browser file and remove the following under the Safari node:
But nobody mentioned that you actually have to recompile these settings with:
And that was it! Problem solved. Boss Happy!
Thanks to Big-O for this hint!
3 Kommentare zu “ASP.NET and our lovely Safari”
Thank you for your page titled “ASP.NET and Our Lovely Safari”.
I have one question:
While I can change mozilla.browser on my development machine, I could not run aspnet_regbrowsers.exe -i (got error: ASPRUNTIME: Cannot restart W3SVC Service, this operation might require other privileges.) This made no sense since I am administrator 🙁
At any rate, I do not have access to mozilla.browser on the live server what can I do?
Your help would be most appreciated.
I actually got a new approach from Saavik this morning:
In Page_PreInit Sub I added these lines:
Dim s As String
s = Request.ServerVariables(“http_user_agent”).ToLower
If s.IndexOf(“safari”) <> -1 Then
Page.ClientTarget = “uplevel”
Good idea if you rent webspace and don’t have access to the server.
[…] had that problem before, when I had to update the CSS MenuAdapter. « ASP Server Variables, Request Object and […]