Mark's Stuff

My Foray Into Weblogging. Using this to store interesting items for later review.

Thursday, December 22, 2005

Start VS.Net faster

I found a reference to this for VS.Net 2005, but found it works on 2003 as well. Start Visual Studio environment faster by adding the command line switch /nosplash, as in:

devenv.exe /nosplash

Change at least the Program shortcut files. If you are real ambitious, there are literally hundreds of references in the registry where the devenv program is associated with different file extensions.

Wednesday, December 14, 2005

Alternative to SmartNavigation

Another alternative to the smartNavigation replacement. This one is code-only, no custom control, though a little more involved to implement.

Alternative to SmartNavigation

smartNavigation replacement

ASP.Net smartNavigation has some problems (w/Autopostback may clear the form; events stop working; does not work for non-IE browsers). This custom control does same thing (and a little more) without these problems.


Tuesday, December 13, 2005

Useful Web Development Tools

These are some of the more useful tools I use during web development.

Fiddler HTTP Debugger - Fiddler

IE Developer Toolbar: Very handy. Dozens of tools.

IE(5) Web Developer Accessories: DOM Tree viewer, View Partial Source.

Wednesday, December 07, 2005

Ken Henderson's WebLog : Regular Expressions in T-SQL

Ken Henderson's WebLog : Regular Expressions in T-SQL

This was very handy for adding a TSQL function to validate email addresses during an import. This will only work with SQL Server 2000, and not 2005, but that is OK since 2005 can do regex in CLR functions anyways. Note that this is sp_oa methods, so it will not be appropriate to use this in triggers, or stored procedures that are performance-sensitive (this will be somewhat slow).

Tuesday, December 06, 2005

.Net Asynchronous Call (Fire and Forget)

From O'Reilly's "Calling Web Services Asynchronously"

Asynchronous Call (Fire and Forget)
Very often, there can arise certain situations where a web method does not return any value. Also, a process may need to be kicked off the web server without waiting for the results. We can better illustrate this with the help of the following example. We will create an XML file using the CreateXmlFile web method, passing in a value. Note: if there is any error while creating an XML file at the web service end, then the web application cannot be notified, as the results are not returned to the web app from the web service.

// WebService web method
using System.Web.Services.Protocols;

public void CreateXMLFile(string lang) //No return value
//. . . . . . . . . . .

Client Call:

string mLangsInput = "English";

// Create an instance of the WebService
localhost.MyAsyncWebService webServ =
new localhost.MyAsyncWebService();

// Make a Web Method Call to create an XMLFile

// Do some process while the web service is processing the request

To support fire-and-forget method calls, web methods should have an attribute SoapDocumentMethod, with the OneWay attribute set to true. SoapDocumentMethod resides in the System.Web.Services.Protocols namespace; make sure that this namespace was used in the web service. Fire and forget methods cannot have any return values, as the client does not expect any results. When you use fire and forget web methods, it does not really matter whether you have chosen an asynchronous or synchronous process, as the parent thread does not wait for the results.