Are you tired of using the command-line version of STSADM? Then, download STSADMWin, the GUI for the powerful command line utility STSADM, from here .
I found STSADMWin a very helpful tool. It lists all the STSADM commands in dropdown, and as you select a command, all the parameters for the command show up. You won’t miss any, even if you want to. Drop the downloaded file to \12\BIN directory and run the executable.
Rock it!
Thanks to my colleague Meera for this useful information.
If you are working with Sharepoint or Infopath sometime you need to use makecab.exe, it is a command line utility to create cab files from Microsoft. You can use makecab utility from command prompt.
Command line output from MakeCab/?
MAKECAB [/V[n]] [/D var=value ...] [/L dir] source [destination]
MAKECAB [/V[n]] [/D var=value ...] /F directive_file [...]
source - File to compress.
destination - File name to give compressed file. If omitted, the
last character of the source file name is replaced
with an underscore (_) and used as the destination.
/F directives - A file with MakeCAB directives (may be repeated).
/D var=value - Defines variable with specified value.
/L dir - Location to place destination (default is current directory).
/V[n] - Verbosity level (1..3)
But I was unable to create the cab file with multiple files using this. After a long search I found one solution from MSDN – Using MakeCab.exe. Then I have created one .ddf file and using the command
makecab.exe /f Sample.ddf
And in the sample.ddf you can specify the file names.
;*** Sample Source Code MakeCAB Directive file example
;
.OPTION EXPLICIT ; Generate errors
.Set CabinetNameTemplate="Sample.cab"
.set DiskDirectoryTemplate=CDROM ; All cabinets go in a single directory
.Set CompressionType=MSZIP;** All files are compressed in cabinet files
.Set UniqueFiles="OFF"
.Set Cabinet=on
.Set DiskDirectory1="Cabs"
image1.gif
image2.gif
mystyle.xsl
manifest.xsf
myschema.xsd
script.vbs
template.xml
upgrade.xsl
;*** <the end>
I think the code is self explanatory.
Normally while developing applications in WSS, if any error occured, the WSS will give it’s own error page, and it contains nothing much information about the error, like unexpected error occured. To enable to view the ASP.Net error page we need to modify the web.config in the Root directory. Change the customErrors mode from “On” to “Off” or “RemoteOnly”. And change the CallStack attribute of SafeMode tag from “false” to “true”. Then if an error occurs it WSS will give the exact error.
Today, while deploying webpart to our WSS 3.0 server we got some funny errors like object reference not set to an instance of an object. The team got stuck in there for more than 3 hours. After lot of googling we found it is because of missing some entries in the WSS Content Database. To fix this issue, Microsoft doesn’t providing any tool. And we got some tools and tips from
Missing Feature.exe
FeatureCleaner.exe
And we found the FeatureCleaner v0 is good tool, compare to Missing Feature.exe, because in the latter we need to give the Connection string to the WSS Database.
Update
We need to modify the FeatureCleaner v0 source, if you WSS installed on other than C:\ Drive.
While debugging webparts , event handlers etc. in sharepoint we may need to attach the w3wp.exe. But the real problem is that to identify which w3wp.exe is for the sharepoint webpage we are trying to debug?, there may be two more w3wp.exe processes. In that time we can attach the two w3wp.exe processes it will work. But it slow down the server performance.
Today I got a solution for this, Microsoft is providing some script files to identify which w3wp.exe process belongs to the sharepoint application pool.
To get the details Go to Command Prompt. Change directory to SystemRoot/System32. Use command cscript.exe iisapp.vbs. <enter> will give you all the application process, with the w3wp process Ids.
W3WP.exe PID: 3848 AppPoolId: SharePoint – 80
W3WP.exe PID: 6044 AppPoolId: SharePoint Central Administration v3
From my machine.
For more details
http://weblogs.asp.net/owscott/archive/2004/09/21/
Which-w3wp.exe-process-belongs-to-which-App-Pool-in-IIS6.aspx
In my project I need to send mail to Administrator, while adding items to a list using Webpart. I have tried ASP.Net, System.Net namespace but I need to read all the server and mail settings from any config file. After I got sharepoint’s own mechanism to send mail.
SPUtility.SendEmail(SPContext.Current.Site.OpenWeb(), false, false, "admin@myserver.com", "Hello World", "This is a Sample Mail");
This will send a mail to “admin@myserver.com”, with “Hello World” as subject and “This is a Sample Mail” as body. You can send HTML emails by changing the third parameter to TRUE.
Update : You may need to use SPSecurity.RunWithElevatedPrivileges method to send mails.
Url :
http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.spsecurity.runwithelevatedprivileges.aspx
This method enable users to Execute the specified method with Full Control rights even if the user does not otherwise have Full Control.