dotnet thoughts 

a dotnet developer's technical blog

“Access denied” when trying to create a new application on WSS (Sharepoint) 3.0

Today morning I installed WSS 3.0 on my Vista Machine. The installation was successfully completed and I was able to login to the central administration page. But when I clicked the Create New Application link, the WSS is asking for credentials and even if I give the administrator user name and password, it wasn’t working. After doing so searching I found it is because of UAC of Windows Vista. To fix this issue you need to run the browser(IE in my case) as Administrator. Voila ! This issue resolved.

Run As Administrator

Run As Administrator

You can select the properties of IE shortcut and can set the Run As Administrator option always.

GUI for STSADM

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.

SPUtility.SendEmail

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.

« Newer Posts