Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6585529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:40:30+00:00 2026-05-25T16:40:30+00:00

We have deployed a crossdomain.xml file into the root of Sharepoint 2010 instance in

  • 0

We have deployed a crossdomain.xml file into the root of Sharepoint 2010 instance in order to define the flash cross domain policy. In SP2007 this worked as expected, but it SP2010 the file name is blocked.

If we rename the file anything other than crossdomain.xml it’s served. As soon as we name it what we want, it throws a 404 error.

Any ideas how to work around this? I’m guessing there must now be a way to control this file through SharePoint itself?

I’ve looking for an answer other than to copy the crossdomain.xml file into the root of IIS.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T16:40:31+00:00Added an answer on May 25, 2026 at 4:40 pm

    I discovered the reason this doesn’t work. It turns out in SharePoint 2010 the path crossdomain.xml and clientaccesspolicy are excluded from the virtual path provider, and therefore will never be served from the SharePoint content database.

    The code is tucked away in the Sharepoint SPRequestModule (see below). The only sensible solution is to deploy the crossdomain.xml file to the root of IIS on each of the web servers, which is less than ideal.

    [SharePointPermission(SecurityAction.Demand, ObjectModel=true)]
    void IHttpModule.Init(HttpApplication app)
    {
        if (app is SPHttpApplication)
        {
            if (!_virtualPathProviderInitialized)
            {
                lock (_virtualServerDataInitializedSyncObject)
                {
                    if (!_virtualPathProviderInitialized)
                    {
                        Dictionary<string, ExclusionAttributes> dictionary = new Dictionary<string, ExclusionAttributes>(StringComparer.OrdinalIgnoreCase);
                        dictionary["/app_themes"] = ExclusionAttributes.Folder;
                        dictionary["/app_browsers"] = ExclusionAttributes.Folder;
                        dictionary["/defaultwsdlhelpgenerator.aspx"] = ExclusionAttributes.File;
                        dictionary["/clientaccesspolicy.xml"] = ExclusionAttributes.File;
                        dictionary["/crossdomain.xml"] = ExclusionAttributes.File;
                        VirtualPathProvider virtualPathProvider = HostingEnvironment.VirtualPathProvider;
                        if ((virtualPathProvider != null) && virtualPathProvider.DirectoryExists("/"))
                        {
                            VirtualDirectory directory = virtualPathProvider.GetDirectory("/");
                            if (directory != null)
                            {
                                IEnumerable children = directory.Children;
                                if (children != null)
                                {
                                    foreach (VirtualFileBase base2 in children)
                                    {
                                        string str = base2.VirtualPath.TrimEnd(new char[] { '/' });
                                        ExclusionAttributes attributes = 0;
                                        if (base2.IsDirectory)
                                        {
                                            attributes |= ExclusionAttributes.Folder;
                                        }
                                        else
                                        {
                                            attributes |= ExclusionAttributes.File;
                                        }
                                        dictionary[str] = attributes;
                                    }
                                }
                            }
                        }
                        _excludedFileList = dictionary;
                        SPVirtualPathProvider provider2 = new SPVirtualPathProvider();
                        HostingEnvironment.RegisterVirtualPathProvider(provider2);
                        _virtualPathProviderInitialized = true;
                    }
                    SPTemplateFileSystemWatcher.Local.Initialize();
                    SPPerformanceCounterAgent current = SPPerformanceCounterAgent.Current;
                }
            }
            app.BeginRequest += new EventHandler(this.BeginRequestHandler);
            app.PostAuthenticateRequest += new EventHandler(this.PostAuthenticateRequestHandler);
            app.PostAuthorizeRequest += new EventHandler(this.PostAuthorizeRequestHandler);
            app.PostResolveRequestCache += new EventHandler(this.PostResolveRequestCacheHandler);
            app.PostAcquireRequestState += new EventHandler(this.PostAcquireRequestStateHandler);
            app.PreRequestHandlerExecute += new EventHandler(this.PreRequestExecuteAppHandler);
            app.PostRequestHandlerExecute += new EventHandler(this.PostRequestExecuteHandler);
            app.ReleaseRequestState += new EventHandler(this.ReleaseRequestStateHandler);
            app.Error += new EventHandler(this.ErrorAppHandler);
            app.PostLogRequest += new EventHandler(this.PostLogRequestHandler);
            app.EndRequest += new EventHandler(this.EndRequestHandler);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have deployed an SSRS 2008 R2 project into our SharePoint Integration. This worked
I have an application deployed into multiple zones and there are some issues with
I have a problem with crossdomain.xml that is located on Facebook photo servers. The
Is there any alternative to cross domain xml loading than with XML()? I wrote
I have deployed some jax-ws webservices in a tomcat: web.xml: ... <servlet> <servlet-name>WebServiceJaxWs</servlet-name> <servlet-class>...a
I have deployed a .war file inside Jetty Server. The server has been started,
I have deployed an ejb in a war file(not an ear file). I have
I have deployed a Worker Role to an Azure instance with remote access enabled.
I have deployed our War under Tomcat 6.0 into Linux server. In that Linux
I have deployed a website using Visual Studio 2010 on IIS6. I used one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.