We recently moved a website built using Sitecore 5 CMS to a new Server 2008 R2 / IIS 7.5 machine. But after this change, our Sitecore aliases no longer resolve.
UPDATE I don't think the problem has to do with our server move. There's something strange going on in the Sitecore API.
The problem is that this method call to Aliases.Exists() always returns false:
if (Sitecore.Context.Database.Aliases.Exists(args.LocalPath))
{
var aliasId = Sitecore.Context.Database.Aliases.GetTargetID(args.LocalPath);
...
}
But I can get the alias node using this code:
var folder = Sitecore.Context.Database.Items["/sitecore/system/Aliases"];
var aliasItem = folder.Axes.GetChild(args.LocalPath);
Where args.LocalPath is something like "/thisIsAnAlias".
We have AliasesActive turned on in the web.config file, and Anonymous users have read access to the Alias node.
Am I doing something wrong? Why won't the Context.Database.Aliases code find the alias?
Probably already checked, but have you looked in System > Aliases folder to check that the aliases are still linked to their respective items? There is a field under 'Data' where you can confirm this called 'Linked item'.
Related
I have done the following:
installed a clean Sitecore 7.5 instance
added the relevant asp.net web forms controls and pages to support the site
imported and published a content tree from an old application
Visiting the base site url yields a YSOD with the error message:
Could not find configuration node: contactRepository
Now I understand what this means - there's an expected configuration section that is missing. Adding an empty element contactRepository yields an expected message that this section is not defined.
What is contactRepository, what is its associated configuration section type, what is it for and what values should be specified in it? Alternatively, how can I turn off whatever demands this section to be present?
edit #1:
In the Sitecore.Analytics.config file in the node there are the following two lines:
<!--This configuration node is obsolete and will be removed in a future version of Sitecore. Use "contactRepository" node to get access to Contact repository-->
<contactRepository ref="contactRepository"/>
The comment is total gibberish. Which node? 'Use' how? 'get access' in what sense? How is this different to what's there?
replacing with an empty <contactRepository> without the ref attribute, commenting out this node, both nodes, and the whole tracking node makes no difference to the application's behaviour.
Looking at my local Sitecore 7.5 setup the Contact Repository settings should be in your Sitecore.Analytics.config.
The contacts repository settings relate to the new xDB stuff.
Please ensure you have the correct Sitecore.Analytics config files for 7.5.
There should be around 15 config files with new settings for xDB.
Please read this blog post for more information on the new Analytics setup.
https://www.sitecore.net/learn/blogs/technical-blogs/getting-to-know-sitecore/posts/2014/10/introducing-the-sitecore-analytics-index
I'm facing a problem, and don't know if anybody has solved this issue.
I'm using Tridion webdav (Tridion 2011 SP1 HR1) to insert structured content (folders + binary files) into a publication.
All goes well when the folder doesn't exist, but if the folder exist, then an error appear:
You do not have permission to access this Web Folder location
Watching the log files, the problem is that Tridion tries to create a new folder when I drag & drop an existing folder, and rename to the folder title, giving an error:
Name must be unique for items of type: Folder/Virtual Folder within this Folder and its BluePrint context.
I tried using Events to avoid saving the folder when it exists (throwing an exception in the initiated phase), but the permission error appears when updating the content inside the folder.
Has anyone tried to do something alike?
Has anyone any sugestion I can try?
Thank you all in advance.
This has nothing to do with Tridion as you are using Windows Explorer to access WebDAV, so if anything it's the Explorer who is to blame for sending wrong requests, but if you will take a look at WebDAV sprcification here: http://www.webdav.org/specs/rfc4918.html, you can see all the possible calls under chapter 9.
Tridion Folders are treated as collections, so there's a MKCOL call to create a folder, but if you will check 9.7.2 PUT for Collections, you will see:
9.7.2 PUT for Collections
This specification does not define the behavior of the PUT method for existing collections. A PUT > request to an existing collection MAY be treated as an error (405 Method Not Allowed).
The MKCOL method is defined to create collections.
So there's no way to update existing folders, it's create and upload contents, indeed.
You can also check this article if you are interested in WebDAV protocol: http://amarchuk.blogspot.nl/2011/10/heres-c-webdav-client-that-works-with.html
I am displaying images on my page and then attempting to find the current height of the images in order to vertically position them. I am doing this by creating a new bitmap and then getting the height of the bitmap, as follows:
Dim sampleImg As New System.Drawing.Bitmap(Server.MapPath(String.Format("/Uploads/Products/Images/w100h100/{0}", e.Item.DataItem("Filename"))))
Dim imgHeight As Integer = sampleImg.Height
When I run this on my local machine, all works fine. However, I have recently uploaded the site so far to my development server and when I run the same code from there, I get this error message:
Parameter is not valid
I have been searching forums to try to find a solution but I have ended up a bit unsure where else to look because the file definitely exists on the development server and the code works fine on my local machine. The server I am using is a VPS and I am quite a beginner with working with servers so I don't know if there is anything I haven't set up on there which is stopping it from working?
Whilst trying to find a solution, I have also tried the following code but I get a System.IO.FileNotFoundException error message:
Dim sampleImg As System.Drawing.Image = System.Drawing.Image.FromFile(Server.MapPath(String.Format("/Uploads/Products/Images/w100h100/{0}", e.Item.DataItem("Filename"))))
I am wondering if anyone can help me find a solution to this, or alternatively is there a different method to acheiving the same end?
All help is very much appreciated. Thanks.
It may be a file permissions issue, you need to ensure that the IUSR account for your site has read access to the image file. To do this -
R-click the file, Properties, Select the "Security" tab - you will have a list of users who have access to the file. A quick check is to add "Everyone" with read priviliges. To keep it locked to your ASP.Net instance only you should start IIS Manager, r-click your app pool and the Identity is the user your app runs under.
If you are running through IIS it may be that the file type isn't set up in the available MIME types for the site.
http://technet.microsoft.com/en-us/library/bb742440.aspx
With IIS7 there is a module for each Site called "MIME Types". Check whether the File Extension is in the list, and if not, add it with the appropriate MIME Type (list of mime types in link above)
I think you have to use ~ root operator to resolve the path issue.
Dim sampleImg As System.Drawing.Image =
System.Drawing.Image.FromFile(Server.MapPath(
String.Format("~/Uploads/Products/Images/w100h100/{0}",
e.Item.DataItem("Filename"))))
OR the specified file is not a valid image file.
This is kind of an advanced problem, hopefully one of you asp/VB gurus will have a suggestion. I am trying to dynamically set a folder's execute permissions in IIS6 from an asp page. I have given the server full permissions to make the changes necessary. When I run the code I get:
Microsoft VBScript runtime error '800a0046'
Permission denied: 'GetObject'
/learning.asp, line 11
I have a server setup with IIS6 running a couple asp websites. I use a code like this to create a folder called "files"
set fso = Server.CreateObject("Scripting.FileSystemObject")
set folder3 = fso.CreateFolder(Server.MapPath(username & "/files"))
set folder3 = nothing
set fso = nothing
Works fine and creates the files folder just where I want it. However, the new folder has execute permissions set to "scripts and exe's" and I need it to be "never" or false. There is a system object that you can call to make this change, and I even have a piece of code that I wrote after reading another tutorial.
It doesn't work and gives the above error. I think, maybe, I am just leaving something out, but this stuff is a little over my head. Here is what I used, but I don't know the syntax or what exactly to call.
Set root = GetObject("IIS://localhost/" & username)
Set newVDir = root.Create("IIsWebVirtualDir","files")
newVDir.Path = "e:\iis3\server2\ADSI"
newVDir.AccessScript = False
newVDir.SetInfo
I have searched around for 3 days trying to find a solution to this, but not very many people do this type of thing apparently, because there are no posts about it that I can find.
Anyway, I don't understand what the getobject is supposed to do, and what newVDir.path I am supposed to be using?
Thank you, in advance, for any helpful suggestions you may have.
This article (see http://technet.microsoft.com/en-us/library/bb742439.aspx) explains what the GetObject actually does.
I believe, what happens behind the scene is that a COM object of type "IIS Admin Service" is (needs to be) created to perform your operations. By default, the IIS application pool account is not allowed to create such object. So maybe its worth to check it. Open Control panel->Administrative services, run "Component services". Find "my computer" in the tree and there find "IIS admin service". Check "activation" and "launch" permissions, add some if necessary.
I'm receiving "culture name 'uploads' is not supported" when my ASP.NET application start. Where do I have to view/debug to toggle the error?
A full-text search for "uploads" returns 0 entries in my project.
I've deleted this folder and it solved the problem:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\8dfb04ef\44bf70fb\uploads
Do not worry, it is not a real error.
When the runtime tries to find which resource assemblies exists, it tries to enumerate folders where compiled DLL files reside. It assumes the name of the folder is the culture name, so it tries to create a culture for it. Unfortunately uploads is a folder which is created automatically by ASP.NET, and it is obviously not a culture :).
The runtime ignores some predefined folders like "hash", but not "uploads". So we have to live with it.
I am getting the exact same error. ["culture name 'uploads' is not supported"]. I do not know what is causing it but I've been able to get around it by clicking [Debug|Exceptions (Ctrl-alt-E) and un-checking "Common Language Runtime Exceptions". I do not have an 'uploads' folder or file in my project and there is nothing in my project that has anything to do with multilingual support and the error fires right off the bat when I run my project ... looking at the call stack just walks me through a whole lot of mscorlib calls. I have no clue why it's even getting called.
JumpingLethalRampage, instead of unchecking all "Commong Language Runtime Exceptions," you could uncheck just "Common Language Runtime Exceptions > System > System.ArgumentException." You don't need to uncheck all CLR items.
It sounds like maybe you have some code somewhere that is trying to set the culture based on a URL pattern (this may be tracked down if it is possible to get a stack trace). For example, sometimes I'll set up multi-lingual sites with URLs like this:
http://www.example.com/en-US/
http://www.example.com/es-MX/
I'll then have code in my base page that looks at the URL and attempts to set the culture based on the URL path. But if you tried to hit a URL like:
http://www.example.com/uploads
It would fail with an error like what you are seeing if you just blindly take the first path element and try to use it as the culture without checking it first.
If the application is it built upon DotNetNuke (and not a simple ASP.NET application), this kind of error generally occurs in DotNetNuke due to the issue described in Culture name '__page' is not supported.
If you are not using DotNetNuke, check your Application_Start code (in the Global.asax file). It might be setting the CultureInfo. Or check your web.config file for any invalid culture values.
Assuming that your search through the project wasn't restrictive (widest possible search in all files), then my guess would be that your browser has a User language set to a custom string - "uploads".
In IE, you can check via Tools -> Options -> Languages -> Add -> User defined language.