Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

new developer's question -- first VS.Net web application

Status
Not open for further replies.

david4chao

Programmer
Nov 2, 2003
1
CA
When I want to try my first VS.Net web application, according to Microsoft SharePoint Services SDK, I need register micorsoft.sharepoint assembly. The following is my ASP.Net code:

<%@ Page language=&quot;c#&quot; Codebehind=&quot;HelloWorld.aspx.cs&quot; AutoEventWireup=&quot;false&quot; Inherits=&quot;HelloWorld.HelloWorld&quot; %>
<%@ Register Tagprefix=&quot;SharePoint&quot; Namespace=&quot;Microsoft.SharePoint.WebControls&quot;
Assembly=&quot;Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c&quot; %>
<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot; >

<HTML>
<HEAD>
<title>HelloWorld</title>
<meta name=&quot;GENERATOR&quot; Content=&quot;Microsoft Visual Studio .NET 7.1&quot;>
<meta name=&quot;CODE_LANGUAGE&quot; Content=&quot;C#&quot;>
<meta name=&quot;vs_defaultClientScript&quot; content=&quot;JavaScript&quot;>
<meta name=&quot;vs_targetSchema&quot; content=&quot;</HEAD>
<body MS_POSITIONING=&quot;GridLayout&quot;>
<form id=&quot;Form1&quot; method=&quot;post&quot; runat=&quot;server&quot;>
<SharePoint:FormDigest runat=&quot;server&quot; ID=&quot;Formdigest1&quot; NAME=&quot;Formdigest1&quot; />
<asp:Button id=&quot;Button1&quot; style=&quot;Z-INDEX: 101; LEFT: 282px; POSITION: absolute; TOP: 282px&quot; runat=&quot;server&quot;
Text=&quot;Button&quot;></asp:Button>
<asp:Label id=&quot;Label1&quot; style=&quot;Z-INDEX: 102; LEFT: 192px; POSITION: absolute; TOP: 288px&quot; runat=&quot;server&quot;>Label</asp:Label>
<asp:TextBox id=&quot;TextBox1&quot; style=&quot;Z-INDEX: 103; LEFT: 384px; POSITION: absolute; TOP: 280px&quot;
runat=&quot;server&quot;></asp:TextBox>
</form>
</body>
</HTML>


An error popup:

Server Error in '/_layouts/HelloWorld' Application.
--------------------------------------------------------------------------------

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: File or assembly name Microsoft.SharePoint, or one of its dependencies, was not found.

Source Error:


Line 1: <%@ Page language=&quot;c#&quot; Codebehind=&quot;HelloWorld.aspx.cs&quot; AutoEventWireup=&quot;false&quot; Inherits=&quot;HelloWorld.HelloWorld&quot; %>
Line 2: <%@ Register Tagprefix=&quot;SharePoint&quot; Namespace=&quot;Microsoft.SharePoint.WebControls&quot;
Line 3: Assembly=&quot;Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral,
Line 4: PublicKeyToken=71e9bce111e9429c&quot; %>


Source File: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\template\layouts\HelloWorld\HelloWorld.aspx Line: 2

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.SharePoint' could not be loaded.


=== Pre-bind state information ===
LOG: DisplayName = Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral
(Partial)
LOG: Appbase = file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/60/template/layouts/HelloWorld
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===

LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/_layouts_helloworld/a8b46169/d21c8426/Microsoft.SharePoint.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/_layouts_helloworld/a8b46169/d21c8426/Microsoft.SharePoint/Microsoft.SharePoint.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/60/template/layouts/HelloWorld/bin/Microsoft.SharePoint.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/60/template/layouts/HelloWorld/bin/Microsoft.SharePoint/Microsoft.SharePoint.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/_layouts_helloworld/a8b46169/d21c8426/Microsoft.SharePoint.EXE.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/_layouts_helloworld/a8b46169/d21c8426/Microsoft.SharePoint/Microsoft.SharePoint.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/60/template/layouts/HelloWorld/bin/Microsoft.SharePoint.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/60/template/layouts/HelloWorld/bin/Microsoft.SharePoint/Microsoft.SharePoint.EXE.

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

Why?

Can anybody help me?

Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top