Category Archives: .NET

Small development Q&A

Q:how to zip in .NET
A:find library ICSharpCode

Q:System.Net.HttpWebRequest vs WebClient

Q:How to create self-signed ssl certificate?
A:use makecert.exe (part of .NET) Ex:makecert.exe -a SHA1 -ss my -sr LocalMachine -n "CN=ComputerName" -b 01/01/2000 -e 01/01/2050 -eku -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12
Then install it in IIS

Q:How to implement ssl switching (b/w http & https) in app?
A:See "Switching Between HTTP and HTTPS Automatically" by "Matt Sollars"

Q:How to create multiple Web Servers in WinXP?
A:cscript c:\Inetpub\Adminscripts\adsutil.vbs COPY W3SVC/1 W3SVC/2

Q: how to copy user’s profile?

Q: SELECT permission denied on object ‘ASPStateTempApplications’, database ‘tempdb’, owner ‘dbo’.

Q: How to debug Client-Side in .NET
A: -In IE Tools\Adv Options clear "Disable script debugging…"
-In VS.NET Tools\Debug Processes attach to the IExplore.exe
-In VS.NET set a breakpoint in the Client Side code
-In IE cause the script to run

Q: When connecting another computer to cable modem, it can’t connect to Internet saying "Unable to contact DHCP host"
A:Reboot the cable modem

Q:aspx files don’t run, but open "File download" dialog.
A:C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\aspnet_regiis.exe -i

Q: When trying to run, the server gives: "Server Application Unavailable" error

Q: Disable Windows Explorer search assitant
A: In HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState add String Value "Use Search Asst" with value "no"

Q: How to output an xls file
A: Response.ContentType = "application/" OR "application/excel" and maybe Page.EnableViewState = "false"