When typing in a url that does not exist I want to display a custom 404 page however when I type in a non-existing page I am seeing a Page not found No umbraco document matches the url in the browser
At present I am to running multiple websites in one umbraco v6.2.5 application and there are multiple languages for each website for example the following:
- www.mydomain.com/en
- www.mydomain.com/de
- www.mydomain.com/fr
The config\404handlers.config consists of the following:
<?xml version="1.0" encoding="utf-8" ?>
<NotFoundHandlers>
<notFound assembly="umbraco" type="SearchForAlias" />
<notFound assembly="umbraco" type="SearchForTemplate"/>
<notFound assembly="umbraco" type="SearchForProfile"/>
<notFound assembly="uComponents.NotFoundHandlers" type="MultiSitePageNotFoundHandler" />
<notFound assembly="umbraco" type="handle404"/>
</NotFoundHandlers>
The document type and template have been created and the template has been assigned to the new 404 node but it is still not working.
I can see that the issue is related to the subdomain as when I remove these (i.e en/, de/, fr/) from the culture and hostnames the 404 page starts working but this is required to differentiate between the languages..
Can someone please suggest how I can get the 404 page to work with the subdomains, thanks!
Related
Help me get rid of the default 400 page
I've implemented a IContentFinder and added it as a ContentLastChanceFinderResolver. Just like it's explained here: https://our.umbraco.org/documentation/reference/routing/request-pipeline/icontentfinder
This works flawless!!
%25c3
But for certain url's I still see the "This page is intentionally left ugly" system 404 page.
Ex: http://example.com/test%25c3
On umbraco.com just a blank page is returned: https://umbraco.com/test%25c3
How do I get this behaviour?
I've also tried using the configuration-way to set the 404 page, but it still shows the "This page is intentionally left ugly" page.
In /config/umbracoSettings.config:
<errors>
<error404>1105</error404>
</errors>
XSS
The reason I want to remove the"This page is intentionally left ugly" page is that it allow for cross site scripting attack since it will output what ever you type in the url.
That means if you add a script tag to the url it'll get executed on the "left ugly" page
The url /test%25c3 give a:
HTTP Error 404.11 - Not Found
The request filtering module is configured to deny a request that contains a double escape sequence.
Use the IIS error handeling.
In the web.config
place below the <system.webServer>
<httpErrors errorMode="Custom">
<error statusCode="404" subStatusCode="11" path="/error.html" responseMode="ExecuteURL" />
</httpErrors>
And create a error.html file, blank or if you like with some text.
There are many more errors. Try this url for example http://umbraco.com/* or http://umbraco.com/lpt1
more about the error page and a .NET CMS, like Umbraco or Sitecore you can read here: Sitecore and the error page it is also on some Umbraco situations.
This is my crossdomain.xml that I put in the same folder of my Web.config:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" secure="false" />
<allow-http-request-headers-from domain="*" headers="*" />
</cross-domain-policy>
Although I can load using Security.loadPolicyFile("http://localhost:52090/crossdomain.xml").
When my swf try to comunicate with my local site (asp.net mvc) it says:
Error #2048: Security sandbox violation: http:/ /localhost:52090/Content/Swf/MyApp.swf cannot load data from localhost:52090
How do I solve that?
Since you use as3httpclientlib that based on Socket, rather than URLLoader you should setup socket policy server instead of http one (so your crossdomain.xml isn't used by flash in this case).
To setup flash policy server you can use perl script from this article http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html with policy xml suggested by #Bart Friederichs (with to-ports attribute)
Try this one:
<?xml version="1.0"?>
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" to-ports="*" />
</cross-domain-policy>
also, if you send it yourself, make sure to send a null-character in the end.
I'm currently developing a Ruby on Rails application with Rails 3.0 on Ubuntu 10.4.
I intend to use Adobe Flex for the front-end. For this reason I've installed Flash Builder 4 on Windows XP using Virtual Box. The Internet connection of this virtual machine is bridged.
The Flex Application currently only consists of a simple HTTP Request that retrieves an XML file from the Rails Application running on Ubuntu localhost:3000 :
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
creationComplete="plansService.send()">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
<s:HTTPService id="plansService"
url="http://192.168.1.102:3000/plans/list" />
</fx:Declarations>
<fx:Script>
<![CDATA[
private function printPlans():void {
for each (var xm:XML in plansService.lastResult.plans.plan) {
trace("my name is "+ xm.child("name"));
}
}
]]>
</fx:Script>
</s:Application>
In the Flash Builder Network Manager the HTTP Request is displayed as working. The response is there and contains the correct XML data.
But when the Flex Application loads in the Browser I get this error:
Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: file://C:\Documents and Settings\susi\Adobe Flash Builder 4\naturalstudy\bin-debug\naturalstudy.swf cannot load data from localhost:27813.
at mx.netmon::NetworkMonitorImpl()[/ndepot/fb_401/ide_builder/ActionscriptProjects/src/mx/netmon/NetworkMonitorImpl.as:81]
at mx.netmon::NetworkMonitorImpl$/init()[/ndepot/fb_401/ide_builder/ActionscriptProjects/src/mx/netmon/NetworkMonitorImpl.as:49]
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::kickOff()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\SystemManager.as:2620]
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::preloader_completeHandler()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\SystemManager.as:2539]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/timerHandler()[E:\dev\4.x\frameworks\projects\framework\src\mx\preloaders\Preloader.as:515]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
I googled this and thus have tried these things:
- added use-network=false to the Flash Builder compiler options for this project
- added a crossdomain.xml file to the Rails Project public folder:
<?xml version="1.0" encoding="utf-8"?>
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all" />
<allow-access-from domain="*" />
<allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>
But it still doesn't work and the error is the same.
I think the problem is that the Flex application is trying to receive something from localhost:27813 ... but I'm stuck at this point.
Help would be much appreciated!
A shot in the dark. Go here and add that location (localhost:27813) as trusted location:
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
More guesses:
Run your project with Flash Builder Network Monitor disabled.
Export a release build and run that
I am trying to use the AddWebPartToZone web service call within Sharepoint 2007 to add a webpart programmatically to a webpart page. We get a soap exception (Microsoft.Sharepoint.SoapServer.SoapServerException).
The webpart i am trying to add is the original version of the Chatterbox app found on codeplex. When i try and add a content editor webpart to the same page it works perfectly.
We can add the webpart manually (Chatterbox) to the webpart page and it works fine. We have checked and the web part is added appropriately to the safe controls list in the webconfig (as it should be). So the next step is to have a quick look in the logs. The messages we get are:
Monitorable Usage: Security - Web Services: AddWebPart
Monitorable Error importing WebPart. Assembly Microsoft.SharePoint.SampleParts.ChatterBox, Version=12.0.0.0, Culture=neutral, PublicKeyToken=48e046c834625a88, TypeName. Microsoft.SharePoint.SampleParts.ChatterBox
I've tried amending the webpart XML we use on the webservice call and we get the same error message everytime. Now this looks like a permissions problem with the webpart but seeing as we have added it correctly to the safecontrols listing in the webconfig i can't see what else i can do?
Here is the webpart XML that we used:
<?xml version="1.0" encoding="utf-16"?>
<WebPart xmlns:xsd="http://schemas.microsoft.com/WebPart/v3" xmlns:xsi="http://microsoft.com/sharepoint/webpartpages" xmlns="http://schemas.microsoft.com/WebPart/v2">
<IsIncluded>true</IsIncluded>
<ZoneID>Full Page</ZoneID>
<PartOrder>1</PartOrder>
<FrameState>Normal</FrameState>
<Height />
<Width />
<AllowClose>True</AllowClose>
<AllowRemove>true</AllowRemove>
<AllowZoneChange>true</AllowZoneChange>
<AllowMinimize>false</AllowMinimize>
<IsVisible>true</IsVisible>
<NumComments>10</NumComments>
<UpdateInterval>5</UpdateInterval>
<AllowConnect>True</AllowConnect>
<ChromeType>Default</ChromeType>
<TitleIconImageUrl />
<Description />
<Hidden>False</Hidden>
<BackingListName>Potato</BackingListName>
<UserName />
<AllowEdit>True</AllowEdit>
<DetailLink />
<HelpLink />
<Title>ChatterBox 101</Title>
<Dir>Default</Dir>
<PartImageSmall />
<MissingAssembly />
<PartImageLarge>/_layouts/images/mscontl.gif</PartImageLarge>
<IsIncludedFilter />
<Assembly>ChatterBox, Version=12.0.0.0, Culture=neutral, PublicKeyToken=48e046c834625a88</Assembly>
<TypeName>Microsoft.SharePoint.SampleParts.ChatterBox</TypeName>
<ChromeState>Normal</ChromeState>
<HelpMode>Navigate</HelpMode>
</WebPart>
We have a sharepoint 2007 (MOSS) box running on Win 2003. Any help would be really appreciated as this is slowly but surely doing my head in!
thanks,
Kev
Does the user the webservice is called under (NetworkCredentials) have the permission to add the webpart to that particular page?
I notices when i go to some sites (include Stackoverflow) by Firefox a little blue circle shows I can add the site to my Search providers .
so wanted to know how can add this feature to my MVC project .
I Heared an XML file should be added ...
Follow the instructions in this guide.
This is the meat and veg of it though...
The link in your master page:
<link rel="search" type="application/opensearchdescription+xml" href="http://mysite.com/browserplugin.xml" title="My Site Search" />
The browserplugin.xml file mentioned above should look like this:
<?xml version="1.0"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>My Site Search</ShortName>
<Description>My Site Search</Description>
<Image height="16" width="16" type="image/x-icon">http://mysite.com/favicon.ico</Image>
<Url type="text/html" method="get" template="http://mysite.com/search/{searchTerms}"/>
</OpenSearchDescription>
Note that you should (obviously) change that urls appropriately according to your website. Specifically the Url in the OpenSearchDescription in order to match your search url.