my web site is a template, it has web.config.
how to disable its RSS in this web
i am using vendor's web site, i find web.config only have an applicationfoldername to set for RSS when i read the comment
however, no enable or disable option for RSS, how can i know where to disable RSS
it has RSS_Feed class in code directory
and RSS_result in xslt directory
and in web.config for RSS
Look for something like this on the html template and remove it (don't make a literal search of the entire tag since title and href will be different)
<link rel="alternate" type="application/rss+xml" title="RSS" href="url" />
Related
I have asp.net app that I am trying to upload to azure host.
first I have try to link in the traditional way with Css folder and link to it
<link href="http://mysite.azurewebsites.net/css/style.css"
rel="stylesheet" type="text/css" />
NOT WORKING
then i create blob and reference to it :
<link href="http://mysite.blob.core.windows.net/scripts/style.css"
rel="stylesheet" type="text/css" />
NOT WORKING
now I dont get error but nothing happend to the styling (after empty my cache and restart the site)
I am not using master pages in my site just normal asp.net page.
i saw in some place that they are doing it with master page but there is other way to do it without master page.
Thanks.
I am building a website using asp .net. The site uses a Google font this is imported in the masterpage like so...
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Yanone+Kaffeesatz:400,300,200" media="screen"/>
Note that I have removed the http(s) from the url.
However I still always get the following error in a popup...
"This page is accessing information that is not under its control. This poses a security risk. Do you want to continue?"
I thought that removing the http(s) would ensure that this error would not appear? How do I go about removing it?
I have also tried putting this reference in my css files using an import but I still get the popup.
I don't want to change browser settings as clients can't be expected to do this.
Thank you
I don't know if the solution below is compliant with Google API's Terms of Service.
The error you have is due to a Cross-Domain request (the popup is known as the Cross-Domain Data Access dialog).
To avoid this dialog, you can host the .css file & the related font files on the same domain has your website.
Well, I'm trying to make custom app_offline.htm and want to add links to my css files in project. But next code doesn't work
<link href="/Content/Themes/screen.css" rel="stylesheet" type="text/css" />
In console I've got error
GET mySite/Content/Themes/screen.css 503 (Service Unavailable)
Please, give me advise how to make a link to css file in app_ofline.htm. Any help will greatly appriciated!
The idea of the app_offline.htm is that it indicates that the app is, well, offline. So, no resources are available from the site when the site is offline. Either put the relevant rules into the page or host the stylesheet on a separate domain.
You have to use inline css style for this instead of referring to external CSS file.
<style type="text/css">
/* write your css code here */
</style>
App_Offline.htm
Basically, if you place a file with this name in the root of a web application directory, ASP.NET will shut-down the application, unload the application domain from the server, and stop processing any new incoming requests for that application. ASP.NET will also then respond to all requests for dynamic pages in the application by sending back the content of the app_offline.htm file (for example: you might want to have a “site under construction” or “down for maintenance” message).
You can add it as base64 in the img tag... like this:
<img src="data:image/png;base64,<64-bit string goes here> alt=""/>
This works at least for an image that says the site is under construction.
You can't link to it. It's offline. Unless you're using a remote css file that you can guarantee will be in a functioning server the css file will not be allowed to be served because the .Net Framework restrictions have been put in place to forbid the serving of any file except app_offline.htm. You can either put your css inline with the page or host it on a separate site (which is a choice some companies make anyway to keep design elements in a common location for enterprise applications).
I am using UrlRewriter to rewrite my urls in an ASP.NET application. Everything works fine and the work which I need to do is working ok.
I want to redirect ~/product/45/something to ~/show_product_details.aspx?current_prod=45
and it's working fine. But the problem is when I request ~/product/45/something, I am getting the page from ~/show_product_details.aspx?current_prod=45. After that when I click some link like ~/home.aspx, it again redirects me to ~/product/45/home.aspx.
Please suggest how to fix this. I am using this rule:
<add name="Gallery1" virtualUrl="^~/product/(.*)/(.*)"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/show_product_details.aspx?current_prod=$1"
ignoreCase="true" />
It sounds like the URLs in your ASP.NET application are not resolved to the root of the application, but rather are relative links, causing the folder structure to be taken into account.
If you are using ASP.NET Web Forms you need to ensure you either call ResolveUrl("~/home.aspx") when outputting the URL, or ensure that the hyperlink is runat=server, for example:
<a runat="server" href="~/home.aspx">Home</a>
OR:
<a href='<%# ResolveUrl("~/home.aspx") %>'>Home</a>
Another way you can resolve this is to have a base reference in your HTML, which tells the browser that ALL links on the page must be rooted at the specified path:
In the <head> section:<base href='http://www.yourwebsite.com/' />
I have some pages on my site that are plain HTML pages, but I want to add some ASP .NET type functionality to these pages. My concern is that if I simple rename the .html page to .aspx that I will break links, and lose SEO, and so on.
I would think there is a "best practice" for how to handle this situation.
Create your new pages on aspx, and just serve 301 permanent redirects from the HTML pages.
Search spiders are smart enough to realize the content has moved and will not penalize you.
Both Google and Yahoo also say that they parse a meta-refresh with no delay as a 301 redirect, so just do something like this:
<html>
<head>
<title>Moved to new URL: http://example.com/newurl</title>
<meta http-equiv="refresh" content="0; url=http://example.com/newurl" />
<meta name="robots" content="noindex,follow" />
</head>
<body>
<h1>This page has been moved to http://example.com/newurl</h1>
<p>If your browser doesn't redirect you to the new location please <b>click here</b>, sorry for the hassles!</p>
</body>
</html>
If you control IIS - you could just map .HTML to the ASP.NET handler and run them as is. Or, map them to a custom HttpHandler and send a 301 code with the updated location.
All this would work, but I think a lot depends on the content of the pages, the amount of programming you need to add to it, and the plans going forward. If they are valued by search engines,
In general, however, I think your best bet would be to create new pages and 301 redirect the html pages to the .aspx pages. Alternatively, you could do a URL rewrite to display the .aspx page while leaving the URL the same, but that is not a very scalable solution.
You could use ISAPI rewrite to redirect the .html urls to the .aspx urls.
The idea here is that you rename all the existing pages to .aspx, but have all incoming requests handled as a permanent redirect (301) to the new .aspx pages. This means all incoming links to *.html will find the correct *.aspx page.
If the new ASP.NET functionalities is minor, I would recommend to include IFrames inside your HTML which links to the new created ASP.NET pages containing your minor dynamic changes.
Changing over to aspx should not break any SEO