Microsoft Knowledge Base Email Alertz

(924463) - Describes a scenario that occurs in Windows SharePoint Services 3.0 in which you receive an error message when you try to open a .cs file in a document library or open a .cs file that is attached to a list item. Provides a workaround.

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 924463 - Last Review: May 14, 2007 - Revision: 1.4

You receive an error message when you try to open a .cs file that you uploaded to a document library or that you attached to a list item in Windows SharePoint Services 3.0

SYMPTOMS

In Microsoft Windows SharePoint Services 3.0, you upload a .cs file to a document library, or you attach a .cs file to a list item. However, when you click the link to the .cs file, you receive an error message that resembles one of the following:
Path '/DocumentLibraryName/FileName.cs' is forbidden.
Path '/Lists/ListName/Attachments/FileName.cs' is forbidden.
An unexpected error occurred.

CAUSE

Microsoft ASP.NET blocks .cs files. Therefore, even though you can upload a .cs file to a document library or attach a .cs file to a list item in Windows SharePoint Services 3.0, you cannot open the .cs file.

WORKAROUND

To work around this issue, add the .cs file name extension to the list of blocked file types in Windows SharePoint Services 3.0. When you do this, users cannot upload .cs files to a document library or attach .cs files to list items.

To add the .cs file name extension to the list of blocked file types, follow these steps:
  1. Start SharePoint 3.0 Central Administration.
  2. Click Operations, and then click Blocked file types under Security Configuration.
  3. On the Blocked File Types page, click the Web application that you want to configure in the Web Application box.
  4. Type cs in the box that contains the list of blocked file types, and then press ENTER.
  5. Click OK.

APPLIES TO
  • Microsoft Windows SharePoint Services 3.0
Keywords: 
kbprb kberrmsg kbtshoot kbexpertiseinter KB924463
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate