How to pick a fallback site in Crafter Studio? - crafter-cms

I have an external REST client calling a service in a particular site in Crafter Studio. When the 'crafterSite' cookie is not set, Studio will fail the call and log this in catalina.out:
[WARN] 2018-03-15 19:50:50,015 [http-bio-7070-exec-4687] [] [context.SiteContextResolverImpl] | Unable to resolve a site name for the request. Using fallback site
Is there a way to set the fallback site to a specific site instead of the out-of-the-box default site?

Add "crafterSite={site}" to the URL. See this document for more detail: http://docs.craftercms.org/en/3.0/system-administrators/engine/configure-engine-multi-tenancy.html?highlight=craftersite

Related

HTTP Error 404.3 - Not Found in Azure with asp.net MVC and WebAPI core 2.1

Hi All I am getting below error, There is no publishing error. and also checked by deploying a MVC core 2.1 application which is generated by VS 2017 and the application also contains the font file. In that it does not produce any error and runs fine. But the project its giving below exception and the details are...
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
Most likely causes:
It is possible that a handler mapping is missing. By default, the static file handler processes all content.
The feature you are trying to use may not be installed.
The appropriate MIME map is not enabled for the Web site or application. (Warning: Do not create a MIME map for content that users should not download, such as .ASPX pages or .config files.)
If ASP.NET is not installed.
Things you can try:
In system.webServer/handlers:
Ensure that the expected handler for the current page is mapped.
Pay extra attention to preconditions (for example, runtimeVersion, pipelineMode, bitness) and compare them to the settings for your application pool.
Pay extra attention to typographical errors in the expected handler line.
Please verify that the feature you are trying to use is installed.
Verify that the MIME map is enabled or add the MIME map for the Web site using the command-line tool appcmd.exe.
To set a MIME type, use the following syntax: %SystemRoot%\windows\system32\inetsrv\appcmd set config /section:staticContent /+[fileExtension='string',mimeType='string']
The variable fileExtension string is the file name extension and the variable mimeType string is the file type description.
For example, to add a MIME map for a file which has the extension ".xyz": appcmd set config /section:staticContent /+[fileExtension='.xyz',mimeType='text/plain']
Warning: Ensure that this MIME mapping is needed for your Web server before adding it to the list. Configuration files such as .CONFIG or dynamic scripting pages such as .ASP or .ASPX, should not be downloaded directly and should always be processed through a handler. Other files such as database files or those used to store configuration, like .XML or .MDF, are sometimes used to store configuration information. Determine if clients can download these file types before enabling them.
Install ASP.NET.
Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here.
Detailed Error Information:
Module StaticFileModule
Notification ExecuteRequestHandler
Handler StaticFile
Error Code 0x80070032
Requested URL https://~1GpsLearning:80/Content/fonts/glyphicons-halflings-regular.woff
Physical Path D:\Program Files (x86)\SiteExtensions\Kudu\79.20129.3767\Content\fonts\glyphicons-halflings-regular.woff
Logon Method Anonymous
Logon User Anonymous
It was the issue of up-gradation from 2.0 to 2.1, SO I created a fresh application in 2.1 core and just implemented my other code as it is and every thing worked fine and is running on azure very smoothly.

Kentico 12 DancingGoat MVC SiteName is empty or null

I have installed DancingGoat MVC and i can access the IIS urls just fine
http://localhost:8080/Kentico12_DancingGoatMvc
http://localhost:8080/Kentico12_Admin/Admin/cmsadministration.aspx
When I try to debug the MVC application to look into the inner workings of the sample site, in StartUp.auh.cs file i get SiteName is empty or null exception.
The exception is on following line
// Register Kentico Membership identity implementation
app.CreatePerOwinContext(() => UserManager.Initialize(app, new UserManager(new UserStore(SiteContext.CurrentSiteName))));
How can i rectify this?
The MVC project is likely setup in your Visual Studio to launch under a different port than :8080. Open the MVC project's properties, go to the web tab and note the port after http://localhost in the Project URL field. Then, back in Kentico, go to the Sites tool, and for the Dancing Goat site, add the URL and port to your site's domain aliases (or change the default one in the site setting). Relaunch everything and you should be good to go. Barring that, make sure you have a valid license for your site and localhost, etc.

Default Document not working on Azure Web App

I have a simple azure web app and have set the default document in the portal to home.aspx. There is a home.aspx file published, it is browsable via http://my-domain.azurewebsites.net/home.aspx (not real domain) however the default document won't work when browsing to http://my-domain.azurewebsites.net it returns a 404. There is nothing special here. I even added it to the web.confg and it still returns a 404. It is a web forms project, set to integrated security with the correct default document added. Any ideas?
I setup the following web app (West): supportforlucuma There is only one other app in that plan which is the one that isn't working.
I can see the home.html page by visit “http://supportforlucuma.azurewebsites.net/”, Is your issue solved? If no, I will provide more information of how to debug this issue.
Except to set default document on portal and web.config, the default document also could be set in RouteConfig.cs file. For example, following code will set the index.aspx as the default page of current web application and it has the highest priority. If index.aspx file is not exist, a 404 error will response to client. Please check whether the similar code is exist in RouteConfig.cs file.
routes.MapPageRoute("default", "{page}", "~/{page}.aspx",false,new RouteValueDictionary( new { page = "index" }));
For further troubleshooting this issue, we can to get the detail information of 404 response. For example, which modules are executed on server side during the default page is accessed. To do it, we need to enable Failed request tracing. Then we could see the detail information by download the tracing log from LogFiles folder. For example, "ftp://xx.ftp.azurewebsites.windows.net/LogFiles/W3SVC355162095/".

how can I show a 404 page for URL I don't want to have?

I have a website: http://www.immvestwolf.de/
For most websites a 404 page is shown for unknown pages like http://www.immvestwolf.de/ggggggg.
But there is one Section of the website which is build by a plugin. For that section, URLs which don't exist, do not give a 404 header status back.
For example: http://www.immvestwolf.de/expose/39/gggg. All URLs with "/expose/sometext" don't give a 404 header status back. How can I fix this problem?
Any path that hits the plugin is at the descretion of that plugin.So if ../expose ist the plugin, it is the responsibility of that plugin to decide whether a certain path (within the namespace controlled by the plugin) exists or not.
If the plugin does not care, then you might configure your web server to deny the to-be-non-existant sub-paths. E.g you may have your plugin handle /expose but reject any access to /expose/ or below.
How this is to be achieved depends on what web server you are using and how the plugin expects to be configured.

Caching issues - how to identifiy the offending server

Hi
I replacing an existing website. One of the url to a page happens to match one of the url on the old site. I can see old content when I try accessing this url. Is it possible for to debug where this copy of the old site is coming from? I've already identified it's a server between me and our host because I get the same content on web based proxies and my android.
Also how would i get the cache updated?
Our host is Webfusion and our domain is with 123reg

Resources