Universal Relative to Physical Path Converter for Windows Forms / ASP.NET / WPF / Console Apps

July 14, 2009
The .NET Framework does not provide standard functionality for resolving a path relative to the application root to a physical file system path. Thus in ASP.NET Web applications we need to use Server.MapPath(), but in console and Windows Forms / WPF applications we need to rely on the current directory. Moreover if we run a

Give full trust to .NET assembly hosted in a Web page in Internet Explorer

October 31, 2007
I have a .NET 2.0 assembly that runs in the Internet Explorer Web browser as hosted control. The assembly is called ExampleControl.dll. The HTML file used to display it is the following: Now I want to increase its priviledges to be able to connect to Microsoft SQL Server. If I just create a new code