ASP
Config inheritance
You can centralise with configuration/location/@path="page.aspx" (or child directory).
@allowOverride="false" on any setting
section/@allowDefinition="MachineOnly" (machine.config), or "MachineToApplication" (+ main web.config)
How To
- Divert viewstate to a server file/session: override LoadPageStateFromPersistenceMedium and Save...
Long running processes
Three ways (the first 2 run in IIS and could be easily recycled...)
- Thread it. You can use a hashtable to signal results ("LongProcess" can be an instance method of the Page, accessing controls). Full example
ThreadStart ts = new ThreadStart(LongProcess);
Thread workerThread = new Thread(ts);
workerThread.Start();
- Use a web service with the attributes [WebMethod] [SoapDocumentMethod(OneWay=true)]
- A windows service, if you can persuade people to deploy one.
Upgrading ASP 2.0 to 3.5
- Properties - Build - change Target Framework
- Manually: Properties- References - System.Web.Extensions (+.Design) version 1.0.6 : click REMOVE
(You shouldn't have to add System.Web.Extensions 3.5, but check it after saving) - If components use Ajax 1.0, use a binding redirect:
<runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/> <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/> </dependentAssembly> </assemblyBinding> </runtime> - Change Ajax Toolkit reference to 3.5 version