stsadm -o retractsolution -name MySolutionFile.wsp -immediate -allcontenturls
stsadm -o deletesolution -name MySolutionFile.wsp -override
stsadm -o addsolution -filename MySolutionFile.wsp
stsadm -o deploysolution -name MySolutionFile.wsp -url http://myserver -immediate -allowgacdeployment
Thursday, 13 January 2011
SharePoint package deployment using STSADM
Just, so I don't need to check stsadm doc over and over again:
Etykiety:
in English,
SharePoint
Monday, 8 November 2010
Serialize and deserialize to XML string
private
static string
XmlSerialize(T obj)
{
var stream
= new MemoryStream();
var writer
= new XmlTextWriter(stream,
Encoding.ASCII);
XmlSerializer
ser = new XmlSerializer(typeof(T));
ser.Serialize(writer, obj);
stream = (MemoryStream)writer.BaseStream;
var bytes =
stream.ToArray();
var
encoding = new UTF8Encoding();
string
result = encoding.GetString(bytes);
return
result;
}
private
static T XmlDeserialize(string xml)
{
XmlSerializer
xs = new XmlSerializer(typeof(T));
UTF8Encoding
encoding = new UTF8Encoding();
Byte[]
byteArray = encoding.GetBytes(xml);
MemoryStream
memoryStream = new MemoryStream(byteArray);
XmlTextWriter
xmlTextWriter = new XmlTextWriter(memoryStream,
Encoding.UTF8);
object obj
= xs.Deserialize(memoryStream);
return (T)obj;
}
Etykiety:
in English,
serialization,
XML
Friday, 17 September 2010
Znów błąd w SharePoincie
Szukając przyczyny błędu, otworzyłem w Reflectorze bibliotekę Microsoft.Sharepoint.dll z SharePoint'a 2010. Gdzieś tam w Microsoft.SharePoint.Administration.Claims.SPClaimsAuthMembershipProvider nagle ujrzałem następująca metodę:
public override MembershipUser GetUser(string name, bool userIsOnline)
{
throw new NotImplementedException();
}
No comment.
Etykiety:
errors,
in Polish,
SharePoint
Tuesday, 17 August 2010
Jak pobrać listę raportów ?
Okazuje się to bardzo proste. Report server wykorzystuje do tego procedurę składowaną FindObjectsNonRecursive.
string cnxstr = "Data Source=moja_nazwa_serwera;Initial Catalog=ReportServer;Integrated Security=SSPI;"; //connection string
using (SqlConnection connection = new SqlConnection(cnxstr))
{
connection.Open();
SqlCommand command = new SqlCommand();
SqlCommand command = new SqlCommand();
command.Connection = connection;
command.CommandType = CommandType.StoredProcedure;
command.CommandText = "FindObjectsNonRecursive";
command.CommandType = CommandType.StoredProcedure;
command.CommandText = "FindObjectsNonRecursive";
command.Parameters.Add(new SqlParameter("@Path", "/nazwa_mojego_folderu"));
command.Parameters.Add(new SqlParameter("@AuthType", 1));
command.Parameters.Add(new SqlParameter("@AuthType", 1));
SqlDataReader reader = null;
try
try
{
reader = command.ExecuteReader();
while (reader.Read())
while (reader.Read())
{
string sciezka = reader["Path"].ToString();
//teraz możesz np. wyświetlić ją na liście
//teraz możesz np. wyświetlić ją na liście
}
}
finally
{
if (reader != null)
reader.Close();
}
{
if (reader != null)
reader.Close();
}
}
Etykiety:
in Polish,
Reporting Services
UrlEncode
public static string UrlEncode(string url)
{
if (url == null)
return null;
StringBuilder bld = new StringBuilder(url.ToLower());
bld.Replace("!", "%21");
bld.Replace("*", "%2A");
bld.Replace("'", "%27");
bld.Replace("(", "%28");
bld.Replace(")", "%29");
bld.Replace(";", "%3B");
bld.Replace(":", "%3A");
bld.Replace("@", "%40");
bld.Replace("&", "%26");
bld.Replace("=", "%3D");
bld.Replace("+", "%2B");
bld.Replace("$", "%24");
bld.Replace(",", "%2C");
bld.Replace("/", "%2F");
bld.Replace("?", "%3F");
bld.Replace("#", "%23");
bld.Replace("[", "%5B");
bld.Replace("]", "%5D");
return bld.ToString();
}
Tylko że można to zastąpić metodą HttpUtility.UrlEncode
Etykiety:
in Polish
Sunday, 14 February 2010
Promo
Etykiety:
blogger,
Crystal Reports,
CSS,
Dynamics CRM,
hardware,
home.pl,
hosting,
jQuery,
MSDN,
Office 2010,
Office 2013,
Office 2016,
Office365,
Photoshop,
Storybook,
Windows,
Windows 7,
Windows 8,
WindowsLive,
XML
Monday, 20 April 2009
Wyświetlanie błędów w SharePoint
Typowy komunikat o błędzie w SharePoincie wygląda na przykład tak:
Informacja o błędzie: unexpected error. Więcej informacji możesz uzyskać, jeśli wyłączysz custom error pages i włączysz wyświetlanie stack trace. Aby to zrobić, ustaw w pliku web.config sekcję <customerrors mode="Off"> oraz <safemode callstack="true"> Teraz informacje o błędzie są dużo bogatsze.
Tu jeszcze kilka artykułów na ten temat: link 1, link 2

Tu jeszcze kilka artykułów na ten temat: link 1, link 2
Etykiety:
in Polish,
SharePoint
Subscribe to:
Posts (Atom)