Skip to main content

Posts

Showing posts from November, 2006

Windows Miscellaneous

Virtual PC Creating a Virtual PC using another machines Virtual Hard Disk Make a copy of the other machines .vhd file. Copy to the local machine and point the new Virtual PC to the .vhd. SID will have to be run on the new Virtual PC in order to change the name of the machine, as it will still have the name of the original machine the vhd was taken from. http://www.microsoft.com/technet/sysinternals/Security/NewSid.mspx HTML DOM Inspector http://www.sharewareconnection.com/download-ie-dom-inspector-from-sharecon.html

dotNET - VS 2005 Web Deployment Projects + Installer (MSI) creation

You've got your Web Project in Visual Studio and you want to create a way to provide it as an installation. There are 2 ways to do this: 1. Create a Web Deployment Project from your Web Project and then use the output of this as the input to another project, a Setup Project. After you've achieved this you'll have an MSI installer file which has configurable elements, these configurable elements will be dictated by yourself when creating the Web Deployment Project and the Setup Project. 2. Create a WebSetup project from your Web Project. After you've achieved this you'll have an MSI installer file. Option 2 is the simpler option. The difference between the 2 options is that the first provides extra control using the Deployment project, such things a MSBuild and assembly type deployment. If you choose option 1 then: You can quickly create a Web Deployment Project by right-clicking the Web Project in the Visual Studio Solution Explorer. This will copy the contents of y...

IIS admininstration Miscellaneous

http://feeds.delicious.com/rss/learnerplates/iis How to access the IIS Metadase programmatically. Parser for IIS logs A script to extract data from log files (can be IIS log files) using SQL Query format. http://www.microsoft.com/technet/community/columns/profwin/pw0505.mspx The script can be downloaded at http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&displaylang=en

Cookies and FormsAuthentication

Cookies Cookies are simply a file stored in the client machine which are sent up and down to and from the server with every Request and Response. The Cookie is used to store some client information such as details of their past session. It allows the Client to return to a webpage and have information already available to them without having to start from scratch. The Cookie is first sent down from the Server and is stored somewhere on the Client's hard-drive. It's up to the Web Application developer to do the Cookie processing on the Server side. The Cookie can be accessed from the Request as the Cookie is a property of the HttpRequest, Request.Cookie["cookiename"]; One problem I've encountered with Cookies is that all the cookies associated with your application get Posted from the Client on each Request, this adds to the amount of data sent as you can imagine. There is a solution however, in order to ensure a Cookie is only sent from Client to Server when a cert...

Setup Programs Installer creation using VS2005

Setup Programs Installer creation using VS2005 Getting Started with Setup Projects (SimpleTalk). Visual Studio Setup Projects and Custom Actions (Simple Talk). Updates to Setup Projects (SimpleTalk). To create an Installer using Visual Studio you must create a Setup Project. A setup project contents are files and outputs of other projects in the solution. The Setup Project template can be found in the Visual Studio New Project dialog under Other Projects->Setup and Deployment->Setup Project. Tip! To debug installation or just see what's happening in the background and view system variable values use the msiexec logger, it logs everything that's happening on installation, it can also be used for uninstall install: msiexec /i yourinstaller .msi /l* yourinstaller .log or verbose msiexec /i yourinstaller .msi /l*v yourinstaller .log uninstall: msiexec /uninstall yourinstaller .msi /l* yourinstaller .log or verbose msiexec /uninstall yourinstaller .msi /l*v yourinstaller .lo...

Miscellaneous

New Assignment instead of Virtual/Override The "new" keyword can be used with methods, it provides a type of inheritance similar to polymorphism. class Program { static void Main(string[] args) { BaseClass bc = new BaseClass(); ChildClass cc = new ChildClass(); bc.Foo(); bc.Bar(); Console.WriteLine("======================="); ((BaseClass)cc).Foo(); ((BaseClass)cc).Bar(); Console.WriteLine("======================="); cc.Foo(); cc.Bar(); Console.WriteLine("======================="); Console.ReadLine(); } } class BaseClass { public void Foo() { Console.WriteLine("BaseClass.Foo"); } public virtual void Bar() { Console.WriteLine("BaseClass.Bar"); } } class ChildClass : BaseClass { new public void Foo() { ...