posted on June 27, 2006 7:05 PM by Kurt

File Not Found (SharePoint Forms Authentication)

(This is the second post in a series on Forms Authentication in SharePoint 2007.  I announced this series a little while ago over here and continued it here)

This is an error that until today signaled the end of using Forms Authentication for a web application.  Every once in a while, after setting up an application to use Forms Auth, I would get "File Not Found" when I was redirected to the login.aspx page.  Not a 404 mind you, but simply a web page that said "File Not Found" (just the text, no SharePoint chrome).  Basically, whenever I tried logging in, I wouldn't even be given the chance - and since I needed to be logged in - it would effectively bar me from the site completely.

I didn't really have a good workaround for this until I really started digging through the SharePoint code to find out what was causing it.  I am not sure how wide-spread this problem is, but I've had seen it so far on all of my installations, so I thought I would post this fix below.  It's not supported by Microsoft and when I brought it to the internal SharePoint DL, they didn't really have a solution.  (Take note: before implementing the solution below, you should make a back up copy of login.aspx and authenticate.aspx):

Basically, the error is caused because the Microsoft.SharePoint.ApplicationPages.dll assembly is not accessible by the login.aspx or authenticate.aspx.  I noticed this by removing the following tag from login.aspx (under \program files\common files\microsoft shared\web server extensions\12\template\layouts): < %@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c"% > (remove spaces between < and %).  This caused me to get compliation error, but it actually loaded the file.  So, throwing that tag back in, I just simply needed to make sure that the ApplicationPages assembly was available.

My solution was to toss the ApplicationPages assembly into the GAC (again, this is my work around hack - this "shouldn't have to be done" according to MS but they gave no reason as to why this file wouldn't be able to access the ApplicationPages dll in the first place).  You'll find the ApplicationPages dll under \program files\common files\Microsoft Shared\web server extensions\12\CONFIG\BIN. 

Next you should should be able to navigate to /_layouts/login.aspx and get your normal login page.  However, when you click the "Sign In" link from SharePoint this will take you to /_layouts/authenticate.aspx which will now give a similar "File Not Found" but this time with the SharePoint chrome.  Again, the ApplicationPages assembly tag is the culprit, so I replaced the stock < %@ Assembly Name="Microsoft.SharePoint.ApplicationPages" % > with the < %@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c"% > from the login.aspx.  After I did this, the problem worked fine.

Again, this is something that you'll have to do on each server that is affected by this horrible problem.  It doesn't seem ideal, and yes it is probably a bug in SharePoint, but if you want to get Forms Authentication to work in Beta 2, this is the kind of hack you might have to do.  After I made this change, I never ran into the dreaded "File Not Found" exception again.

Do me a favor and shoot me an email () if you have run into this problem.  I'd like to see how many people actually come across this problem.


# re: File Not Found (SharePoint Forms Authentication)

July 14, 2006 11:17 AM by Peter
I also ran into this problem, but since site was brand new, i just created another one. No idea why it popped up. Thanks for the tip.

# re: File Not Found (SharePoint Forms Authentication)

July 20, 2006 4:15 AM by Roopali
Hi All,

At the end of applying Form based authentication, i also came across the problem having File Not Found ( Not a 404 ) while browsing Application management and Operations lik at Central Administration page.

And event viwer error details as follows :-
Event Type: Error
Event Source: Office SharePoint Server
Event Category: Office Server Shared Services
Event ID: 6482
Date: 7/18/2006
Time: 4:49:53 PM
User: N/A
Computer: VANA
Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchAdminSharedWebServiceInstance (16c867e3-6aeb-4cbd-93c3-14930a6afa01).

Reason: Failed to connect to an IPC Port: The system cannot find the file specified.

Techinal Support Details:
System.Runtime.Remoting.RemotingException: Failed to connect to an IPC Port: The system cannot find the file specified.

Server stack trace:
at System.Runtime.Remoting.Channels.Ipc.IpcPort.Connect(String portName, Boolean secure, TokenImpersonationLevel impersonationLevel, Int32 timeout)
at System.Runtime.Remoting.Channels.Ipc.ConnectionCache.GetConnection(String portName, Boolean secure, TokenImpersonationLevel level, Int32 timeout)
at System.Runtime.Remoting.Channels.Ipc.IpcClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)
at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.SharePoint.AdministrationOperation.SPAdministrationOperation.DoProvisionIisApplicationPool(String name, Int32 identityType, String userName, String password, TimeSpan idleTimeout, TimeSpan periodicRestartTime)
at Microsoft.SharePoint.Administration.SPMetabaseManager.ProvisionIisApplicationPool(String name, Int32 identityType, String userName, SecureString password, TimeSpan idleTimeout, TimeSpan periodicRestartTime)
at Microsoft.Office.Server.Administration.SharedWebServiceInstance.Synchronize()
at Microsoft.Office.Server.Administration.ApplicationServerJob.ProvisionLocalSharedServiceInstances(Boolean isAdministrationServiceJob)

For more information, see Help and Support Center at

Finally I uninstalled and Installed MOSS from fresh and this time it worked fine.

# re: File Not Found (SharePoint Forms Authentication)

August 22, 2006 6:06 AM by Evangelos Hadjichristodoulou
I run into this problem but it seems under different conditions.

What I did was to find my site in inetmng and try to activate debuging through the ASP.NET section.

Nustily enough i found that this utility of IIS adds:

xmlns="" in the <configuration> section... which results in the "File not found".

I am sure this is a totally dif problem but its nice to have the dif possibilities here.

# re: File Not Found (SharePoint Forms Authentication)

August 22, 2006 4:15 PM by Dave C
I ran into the same problem as Evangelos. I went into the ASP.NET configuration within IIS to make a session timeout change, and then all of a sudden all my admin pages in SharePoint 2007 failed with the "File not found" error. After taking out xmlns="" in the <configuration> section and restarting IIS, all is well again.

Seems like a significant oversight by Microsoft here, and the solution was not at all obvious. Thanks to Evangelos for sharing the solution!

# re: File Not Found (SharePoint Forms Authentication)

August 22, 2006 4:17 PM by Dave C
Just to clarify, the change was made to the web.config file in C:\Inetpub\wwwroot\wss\VirtualDirectories\8403d17b-15e8-44ad-b2a0-08409d14169e (directory defined in the Home Directory section of the SharePoint IIS web site.

# re: File Not Found (SharePoint Forms Authentication)

August 31, 2006 1:05 AM by Kurt
Did you remove that xmlns from the web.config in the SharePoint Web Application virtual directory or the Central Administration virtual directory

(remember, SharePoint needs the configuration info for your Authentication provider in both places - tricky, tricky)

# re: File Not Found (SharePoint Forms Authentication)

September 6, 2006 8:17 AM by Karthik
I have a SP site configured to run under both windows authentication (intranet zone) and form based authentication (extranet zone). For form based authentication, i have a custom login page placed in the layouts folder. In this scenario, I face a wierd issue. Even if "Authenticate.aspx" is removed from the layouts folder, the FBA works fine. I tried removing it, commenting all contents in it and even then the form based authentication works fine (even if the IIS is reset after the changes are made to that file). I was trying this bacause, I would like to have a custom authentication page to enable single sign-on for form based authentication. Any thoughts or pointers on this issue would be very helpfull.

Thanks in advance..

# Moss 2007: File Not Found error on Login.aspx page when using anonymous access

October 10, 2006 3:00 PM by Anonymous
This post saved my sanity, hopefully it will save yours. If you have experienced the File Not Found error...

# re: File Not Found (SharePoint Forms Authentication)

October 20, 2006 12:58 PM by Vin
Thanks Kurt!

And full marks to Evangelos...Removing the xmlns="" from the config file did the trick. Thanks guys!

# File not found and ASP.NET configuration utility

October 25, 2006 2:32 PM by Anonymous
Using ASP.NET configuration utility (from IIS, in ASP.NET tag of the properties of a virtual server or...

# re: File Not Found (SharePoint Forms Authentication)

November 6, 2006 5:50 PM by Phil
We hit the same ice berg. After editing authentication settings with the IIS ASP.Net Configuration Settings Tool our forms auth was broke. Below are before and after for the web application config file. Thanks Kurt and Evangelos for the nice fix (simply remove the xmlns attribute).


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<sectionGroup name="SharePoint">
<section name=".................................


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration xmlns="">
<sectionGroup name="SharePoint">
<section name=".................................

# Still an issue...

December 6, 2006 1:24 PM by Matt
I have the 'File Not Found' issue described above on the RTM version of MOSS/WSS. I've confirmed that it is NOT the xmlns attribute in any of the web.config files. I would like to avoid making the changes described in this post.

Has anybody heard word on whether Microsoft has, or is going to, address this issue? Have they even documented that it is a 'known' issue, or is it just within the community?

Thanks, Matt

# Stopping the ASP.Net Web Site Administration Tool adding a namespace to your web.config

December 13, 2006 12:16 AM by Anonymous
There is a bug in ASP.NET 2.0 (I don't know if this is a problem in v1.1) which causes some things to...

# Stopping the ASP.Net Web Site Administration Tool adding a namespace to your web.config

December 13, 2006 12:17 AM by Anonymous
There is a bug in ASP.NET 2.0 (I don't know if this is a problem in v1.1) which causes some things to...

# re: File Not Found (SharePoint Forms Authentication)

January 4, 2007 9:53 PM by Larry C. Collins
Hi Kurt. Just an FYI regarding the fact that I’ve been receiving this error in several RTM installations of MOSS. Removal of the config entry xmlns=" fixes it, however subsequent alterations to the same config require deleting the entry again. Plus I don’t like having to do this given I don’t know enough about why it exists or the ramifications of its deletion.

Any new info regarding this error\”bug”?

Thanks for sharing your experience,