Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4.5 > ASP.NET 4.5 General Discussion
|
ASP.NET 4.5 General Discussion For ASP.NET 4.5 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4.5 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 14th, 2014, 04:29 PM
Authorized User
 
Join Date: May 2013
Posts: 59
Thanks: 10
Thanked 0 Times in 0 Posts
Default Favicon is not working in hosted website

Hello I have included this in my master page:
<link rel="shortcut icon" type="image/x-icon" href="~/favicon.ico" />

when I open the website from visual studio it shows the favicon at localhost but when I upload the master page file to the hosting environment it is not showing.

Any idea what I am doing wrong?
 
Old October 14th, 2014, 05:18 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

~/favicon is a server side URL. However, your link element doesn't run server side. Try changing it to /favicon or whatever the path to the icon is

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
dksellou (October 14th, 2014)
 
Old October 14th, 2014, 09:05 PM
Authorized User
 
Join Date: May 2013
Posts: 59
Thanks: 10
Thanked 0 Times in 0 Posts
Default

Thank you!

Actually I added this and it works:
<link id="Link1" runat="server" rel="shortcut icon" type="image/x-icon" href="~/favicon.ico" />

:)

Last edited by dksellou; October 17th, 2014 at 12:44 PM..





Similar Threads
Thread Thread Starter Forum Replies Last Post
Deploying your website - Hosted server trust level pmarti BOOK: Beginning ASP.NET 4.5 : in C# and VB 3 December 23rd, 2013 07:45 AM
Email not being sent on hosted website jdlferreira BOOK: Beginning ASP.NET 4 : in C# and VB 2 July 10th, 2012 05:48 AM
Accompanying website not working Taz1 Book: Professional Windows Embedded Compact 7 0 February 5th, 2012 10:57 AM
put favicon in address bar jack_hilary ASP.NET 3.5 Professionals 2 January 12th, 2010 11:11 AM
Favicon netcrawler Classic ASP Basics 1 October 21st, 2004 03:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.