So why when I add the line <%@ Import Namespace="Microsoft.Sharepoint" %> does the page error with:

An error occurred during the compilation of the requested file, or one of its dependencies. The type or namespace name 'Sharepoint' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

Here is the code:

<%@ Page Language="C#" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Text" %>
<%@ Import Namespace="System.Threading" %>
<%@ Import Namespace="Microsoft.Sharepoint" %>
<script language="C#" runat="server">
void Page_Load(){
  DateTime modified = File.GetLastWriteTime(@"_vti_bin/listdata.svc/Conversations");
  /*while (modified == File.GetLastWriteTime(@"_vti_bin/listdata.svc/Conversations")){
  Response.Write("Change in HallPasses");

So what exactly am I doing wrong, I know I solved this problem at a previous job, I just forgot how. Help is much appreciated, thank you!

1 Answer 1


Looks like you're just spelling it wrong :))

<%@ Import Namespace="Microsoft.SharePoint" %>

"P" is capital :)

  • 1
    I'm an imbecile. Perhaps that's why I shouldn't work on projects this late :P
    – Vap0r
    Commented Nov 1, 2011 at 6:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.