DCSIMG
English Posts - Dor Rotman`s Blog

Browse by Tags

How to Force Redirection From HTTP to HTTPS – The Easy (ISA) Way!
Yesterday I wrote a post about redirecting HTTP to HTTPS , which uses an IIS technique to perform the redirection. However, many IIS websites are connected to the internet using Microsoft ISA Server . So here’s an even easier technique to perform this: 1. Open the ISA Server snap-in in the Management Console, and open the the web server’s rules properties. 2. Go to the Bridging tab. 3. Check the box that says Redirect requests to SSL port. 4. Uncheck the box that says Redirect requests to HTTP port...
How to Force Redirection From HTTP to HTTPS on IIS 6.0
Lets say your clients write HTTP://myserver.lab to get to your site, but you want to redirect them automatically to an SSL secured site: HTTPS://myserver.lab . Unfortunately, performing this redirection in IIS 6 not a regular feature, but there’s a nice trick to do it. Note: This process will cause some downtime and disconnect all active user sessions on the website. If you have a server farm, make sure you perform this procedure on all servers. Instructions for making your site accept HTTPS only...
Converting Word 2007’s WdColor to .NET Color Class
Here’s a small snippet that I wrote for converting a Microsoft.Office.Interop.Word.WdColor object to a System.Drawing.Color object. The WdColor enum values are actually stored as BGR and not RGB. So you must parse the number and isolate the R,G and B elements to re-assemble them into a .NET Color class. Also, during runtime, sometimes a color object gets a value that isn’t listed in the enum. I don’t understand why this happens, but I’m guessing it’s either me being silly or the COM wrapper being...
How to check if a file exists over HTTP
Here’s a piece of C# code that determines the existence of a file over HTTP, given its URL. (Note that URLs should be encoded.) try { WebRequest request = HttpWebRequest.Create( "http://www.microsoft.com/NonExistantFile.aspx" ); request.Method = "HEAD" ; // Just get the document headers, not the data. request.Credentials = System.Net.CredentialCache.DefaultCredentials; // This may throw a WebException: using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) ...
How to get the context item in an SPD Workflow Activity
David Birin , a talented colleague of mine who also works at Omnisys , has just published a post about getting the context item in a SharePoint Designer Custom Workflow Activity . This post is important for SharePoint developers since most samples you’ll find on the internet ignore this ability. Instead, their workflow activities ask the user to supply an item, while it’s obvious the relevant item is the current one, which the workflow is running on. (Even the ECM samples in the WSS/MOSS SDK have...
How to implement Forms-based authentication for MOSS 2007 by using SQL Server
A new Knowledge Base article on Forms based authentication was posted this week, it's very thorough. Here's there link: http://support.microsoft.com/kb/952170 Soon: Some VSTO Posts. :) Dor Rotman.
How to create a custom e-mail alert alert handler in MOSS
A new article from the Microsoft Knowledge Base: How to create a custom e-mail alert alert handler in MOSS This method creates a class that inherits from the IAlertNotificationHandler interface and that uses the OnNotification method. This method enables you to intercept the outgoing e-mail alerts and modify them. You can access most of the properties of the alert. By using XML parsing and SharePoint object model code, you can extract all the information that you must have to modify the e-mail alert...
Changing Content Types for a Sub-Folder in a Document Library
Here's a neat trick Elad Barkan revealed to me: Set up a Document Library so it will have several Content Types assigned to it (using the Advanced Settings). So here's the Document Library's New Menu: Now create a new Folder in it, we'll just call it "Subdirectory" for the sample. Pop up the context menu.. did you notice the Change New Button Order Item? Let's click it! Now we get this cool page, in which we can change the appearance of Content Types in the selected...
Facebook, Facebook, Facebook.
Does anyone still remember Second Life? Looks like the media forgot all about it these days... In Second Life, the graphical designers were kings. They created places, objects, clothing, and actually everything in the virtual world. The got virtual money for their work, that sometimes translated to be real money. In Facebook - the programmers are the kings. They create the interaction channels and enable rich communication between people in the platform. Small application developers get almost no...
SharePoint Designer ‘Send Email’ Workflow Activity HTML Message Body
Would you like to send email messages with a rich text body from your custom SharePoint Designer workflow? Well, it’s easier than you think… ...
Using Javascript to Manipulate a List Form Field Title
Lets say you want to change the text of a field title in a new item form, or in an edit-item form. You might want to do one of the following: Change the field title text Add a remark to the title Add a link Make the title a link Put some javascript The...
SPD ‘Send Email’ Workflow Activity HTML Message Body
Would you like to send email messages with a rich text body from your custom SharePoint Designer workflow? Well, it’s easier than you think… Appearatnly the out of the box activity sends the message body as HTML, but the editor is not rich...
Stock Quote Web Part(s)
Yesterday I was asked to put a web part on an internal MS site, which displays Microsoft’s stock current value and a graph to show its changes. This appeared to be easy - Yahoo offers these kind of web widgets that can be embedded in a site. However...
Windows Live Writer works again on this blog!
1. The Problem I was unable to write using this cool application for a while now. The reason was this annoying error: Invalid Server Response - The response to the blogger.getUsersBlogs method received from the weblog server was invalid. So I did...
Updating a list item without changing the Modified field
In WSS 3.0, it is now possible to update a list item (SPListItem) without changing the contents of the Modified or Editor fields. This wonderful method is called SPListItem.SystemUpdate (has two overloads). This solves the annoying problem where people...