Posts

Questions from the August 2005 SIG Meeting

Listed below are the answers to some of the questions posed at the August SIG meeting about SharePoint 2003. Q: For a web part that displays Outlook contacts in a SharePoint site, will it require Exchange? A: If you use "My Inbox" and tweak it a bit to point to any mail folder in your Exchange mailbox. (e.g. https://exchange.mycompany.com/exchange/1602/contacts/ ) In this case, it does require Exchange. On the other hand, there are special list types called Contacts Lists built-in to SharePoint. These are not integrated directly with Outlook. The data sits in the SharePoint SQL database. However, there is an option to "Link to Outlook". This gives you a link to the SharePoint Contacts list from your Outlook client. You can also import contacts from Outlook into the SharePoint contact list. In both cases, Exchange is probably not required, but this has not been tested. Q: How do you deploy an application from QA to production? A: First, build a CAB file to conta...

Visual Studio .Net has detected that the specified web server is not running asp.net version 1.1, You will be unable to run ASP.Net Web Applications

Problem : If you start Visual Studio .Net 2003 and get the following error: " Visual Studio .Net has detected that the specified web server is not running asp.net version 1.1, You will be unable to run ASP.Net Web Applications or services " There are several ways to go about fixing this error. Solution : From "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322" , run "aspnet_regiis.exe -r". The following messages will appear Start replacing ASP.NET DLL in all Scriptmaps with current version (1.1.4322.0). Finished replacing ASP.NET DLL in all Scriptmaps with current version (1.1.4322.0). When execution has completed, you can start VS.Net and load a web application without any problems.

Passing variables to a web page in .Net

To pass a variable from one web page to another page, use Response.Redirect() method( Response.Redirect("newpage.aspx?variablex=newvalue") ) to pass a variable to a newpage.aspx. In the receiving page (newpage.aspx), use the Request.QueryString() function to extract the variable desired ( Dim strPassed As String = Request.QueryString("variablex") ). When executed, the value of strPassed will be "newvalue".

Authenticating web app users against Active Directory

I found a great article ( http://support.microsoft.com/kb/326340 ) on microsoft.com that provides click-by-click instructions on how to authenticate users logging into a web application against Active Directory. The article is complete and easy to understand, but misses to mention 2 crucial points. Within Login.aspx, you need to specify "Imports MyApp .FormsAuth". This will import the FormsAuthAD Namespace, otherwise declaring a variable of type "LDAPAuthentication" will result in a compile time error. Also, if you cut & paste the code, be sure that any references to "FormsAuthAD" are changed to the name of your project. This will ensure you import the correct class from the correct assembly. Aside from these points, the article is nicely written and easy to understand.

Storing a time zone value in SQL Server's datetime field

Q: Is there a way to store the time zone value in a datetime field in SQL Server? I receive the value of ‘12/1/2005 12:31:23 -5:00’ and when I try to store it in SQL it fails. Do I need to format the date/time differently, or I am forced to create a separate time zone field? A: SQL Server does not support storing a timezone in a datetime field. However, to overcome that issue, you can convert all date/time values to the UTC timezone so you have a standard timezone to work with. When displaying the data to the user, you would then convert the time to the client’s timezone. In regards to storing the value ‘12/1/2005 12:31:23 -5:00’ into SQL Server, try using the format '2005-08-09 00:00:00.000'.

LibCheck.exe

LibCheck.exe is a free utility from Microsoft that allows you to compare two versions of an assembly, and determine the differences. The tool reports the differences as a combination of 'removed' and 'added' APIs. This can be useful in resolving versioning issues and determining which libraries are needed for a particular application. For more information or to download LibCheck, go to http://www.microsoft.com/downloads/details.aspx?familyid=4B5B7F29-1939-4E5B-A780-70E887964165&displaylang=en

Building a Smarter Home with .Net

I came across an interesting article on MSDN ( http://msdn.microsoft.com/coding4fun/diy/usingx10/default.aspx ) that turns an ordinary home into a smart home. Using an X10 device, one can turn on/off lights and devices remotely. In addition the X10 device can be interfaced with a PC and controlled using PERL script or .Net code. This also means you can control devices in your home through a VPN connection or a simple email. The MSDN article also contains a 15 mintue how-to video that shows the X10 in action. To take it a step further and interface with .Net code, Tony Northrup wrote "Home Hacking Projects for Geeks" ( http://www.homehacking.com ). This book discusses coding .Net projects for home control. Links to sample chapters are available on the left margin of the page.