WSS : Multiple Templates DocLib v2.0
I have fix the security issue when running as non-admin user in MultiTemplate DocLib and re-relase it as v2.0
http://workspaces.gotdotnet.com/jywss
Labels: sharepoint
I have fix the security issue when running as non-admin user in MultiTemplate DocLib and re-relase it as v2.0
Labels: sharepoint
The reason for the pull back of v1.1 is that as I tested the doc lib with a non-admin user, an authentication problem arise.
Labels: sharepoint
Note : MultiTemplate DocLib v1.1 has been pulled back due to some issues run running as non-admin.
Labels: sharepoint
If you are creating the second ProjectServer site using the EditSite tool and want to integrate with WSS, you need to change the Server Intranet Address in ProjectServer after creating the site in order for it to link correctly.
Labels: project
When you try to lookup a control by passing a control ID to the FindControl method,
Control c = FindControl("TextBox1");
<%@ Master Language="C#"
AutoEventWireup="true"
CodeFile="MasterPage.master.cs"
Inherits="MasterPage" %>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:contentplaceholder id="ContentPlaceHolder1"
runat="server">
</asp:contentplaceholder>
</div>
</form>
</body>
</html>
<%@ Page Language="C#"
AutoEventWireup="true"
CodeFile="MasterPageJustFindControl.aspx.cs"
Inherits="MasterPageJustFindControl"
MasterPageFile="~/MasterPage.master" %>
<asp:Content ID="Content1"
ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<asp:TextBox ID="txtFindControl" runat="server">
</asp:TextBox>
</asp:Content>
public partial class MasterPageJustFindControl : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
JustFindControl();
MasterPageFindControl();
}
private void JustFindControl()
{
Control c = FindControl("txtFindControl");
if (c is WebControl)
{
Response.Write("<BR>JustFindControl : WebControl found<BR>");
}
else
{
Response.Write("<BR>JustFindControl : NOT found<BR>");
}
}
private void MasterPageFindControl()
{
ContentPlaceHolder cpholder = (ContentPlaceHolder)Master.
FindControl("ContentPlaceHolder1");
Control c = cpholder.FindControl("txtFindControl");
if (c is WebControl)
{
Response.Write("<BR>MasterPageFindControl : WebControl found<BR>");
}
else
{
Response.Write("<BR>MasterPageFindControl : NOT found<BR>");
}
}
}
JustFindControl : NOT found
MasterPageFindControl : WebControl found
Labels: aspnet
I keep hitting an exception when I use the WSS SDK to upload a document to a document library in my WSS app. The error message read
The security validation for this page is invalid.
Click Back in your Web browser, refresh the page,
and try your operation again.
using System.IO;
private void btnUpload_Click(object sender, System.EventArgs e)
{
string targetSite = "http://wssserver/sites/myteamsite";
string docLib = "my doc lib";
byte[] contents = null;
string saveAsFile = Path.GetFileName(FileUpload.PostedFile.FileName);
Stream stream = FileUpload.PostedFile.InputStream;
contents = new byte[(int)stream.Length];
stream.Read(contents, 0, (int)stream.Length);
stream.Close();
SPSite site = new SPSite(targetSite);
SPWeb web = site.OpenWeb();
site.AllowUnsafeUpdates = true;
web.AllowUnsafeUpdates = true;
SPFolder folder = web.Folders[docLib];
folder.Files.Add(saveAsFile, contents, true);
site.AllowUnsafeUpdates = false;
web.AllowUnsafeUpdates = false;
web.Close();
site.Close();
}
Labels: sharepoint