In lieu of installing a .NET application (including referenced assemblies) to an Intranet server or network share, you may be tempted to copy your assemblies to a network drive and execute them directly from there. However, if you've ever tried to do this, your application probably threw a SecurityException ...
To get around this, you have a few options that are documented at the .Net Security Blog. You could open up your security policy to fully trust the Intranet Zone, which is probably a bad idea. Or, you could strongly-name each assembly and configure the appropriate permissions for each assembly that you are going to deploy, which is a better idea. However, this means that you need to modify configuration settings on each user's machine every time a new assembly is deployed ...
To avoid this, you could configure a specific network folder (and subdirectories) to be fully trusted. This way, all future assemblies can be deployed to this network folder without the need to individually configure each assembly. Of course, you still open yourself up to rogue applictions that are installed in this folder being fully trusted, but you are more secure than if you fully trusted your entire Intranet!
To fully trust a specific network folder:
- Open the .NET Framework 2.0 Configuration applet,
- Expand the tree to My Computer, Runtime Security Policy, Machine, Code Groups, LocalIntranet_Zone,
- Right-click New... to create a new code group,
- Name your code group,
- Choose URL as the condition type for this code group,
- For the URL, enter a UNC path using the following format: file://\\<network drive>\folder
- On the next page of the wizard, select Full Trust as the existing permission set,
- Click Finish to add the code group ...
To test that your assembly is now fully-trusted from the network path, right-click at the Runtime Security Policy node and choose Evaluate Assembly... . If you navigate to your assembly, you can validate that your assembly is indeed fully-trusted. Of course, you can always execute your assembly to validate that your assembly no longer throws a SecurityException, but using Evaluate Assembly... can come in handy when debugging security problems ...
I recently installed a hardware upgrade on my email server and was forced to reboot the machine. [The machine is a year old or so, Socket 754 AMD64 processor, MSI K8T NEO-FIS2R motherboard.] After the machine came back up, I noticed that the NIC driver (Realtek 8110S integrated NIC) did not load. This had been working for the past 6 months or so (ever since I installed Windows Server 2003 on the machine) and has been used in a production environment without incident ...
Perplexed, I went rooting around for a driver for this NIC that supports Windows Server 2003 and could not find one specific to that operating system. How in the world did I get it to work before ???
To make a long story short, I discovered that I had previously installed the Realtek 8169 driver, despite the warning that this driver did not match the hardware. Installing this driver did the trick ...
I recently put together a new desktop machine for my home network environment, with the intention of installing the 64-bit version of SQL Server 2005. Having not looked at the 64-bit versions of Windows Server 2003 and Windows XP in a while, I did a bit of research first to make sure all the 64-bit drivers were readily available. I chose the Asus A8R-MVP motherboard (and an AMD64 dual-core processor) based on the availability of 64-bit drivers, plus the fact that this motherboard supports the newest, fastest SATA II hard drives ...
After completing the install, I was not disappointed in my choice. I was able to install the operating system without having to download any additional drivers, and everything worked perfectly. No problems with RAID drivers, network drivers, or audio drivers (although I admin I didn't plug in any speakers). The 64-bit edition of SQL Server 2005 installed without incident as well ...
If you are looking to install the 64-bit version of either Windows Server 2003 or Windows XP on your hardware, here are two things to keep in mind:
1. Make sure all the 64-bit drivers required for hard drives, network cards, sound cards, USB, Firewire, etc. are available for your hardware and for the operating system you choose ...
2. Make sure you have all the software utilities that you need. Low-level utilities that we've all become dependent on, such as Norton AntiVirus, certain DVD-burning software packages, etc. require you to obtain 64-bit versions of the software as the 32-bit versions will not work ...
As a continuation of my previous entry, here's a list of software tools and utilities that I find to be essential for any Microsoft architect, developer, and consultant:
1. MSDN Subscription. Here's where you get access to the latest Microsoft development tools, operating systems, servers, betas, etc. Each month, you receive DVD updates. In addition, you can download the latest updates anytime ...
2. Antivirus and Anti-spyware software. There's really not much to say here. Keep your virus definition files updated regularly and use these religiously. Practice "safe computing" ...
3. Virtual PC. I've blogged quite a few "tips and tricks" for using Virtual PC. It is a valuable tool for testing, demos, and working with beta software. Learn to use it and love it!
4. Backup Software. Don't wait for a disaster to happen before realizing that you don't have a backup of your "stuff"! Even if you do, you may not realize how long it can take to recover. Get a "ghosting" backup utility that does a sector-by-sector image of your hard drive and store the backups remotely on an external hard drive. I purchased a product called R-DriveImage. It allowed me to image my hard drive, install a new, larger hard drive, boot from a CD, and restore the image from an external hard drive within a matter of an hour!
5. Disk partitioning software. You'll also need disk partitioning software such as Paragon Partition Manager to resize disk images ...
6. NewSID utility. This handy freeware utility is essential for working with ghosted images, virtual and otherwise. It renames all computer and user SIDs on your image which allow you to deply multiple copies of the image on the same subnet without conflict ...
7. DVD Burning software. Essential for burning DVD images. There are several good ones out there; I'm partial to Nero ...
8. Isobuster. This utility allows you to extract ISO CD and DVD images onto your hard drive. This is useful for dealing with large DVD ISO images and Virtual PC ...
9. RSS reader. You'll want to keep abreast of key developments that others are blogging about. I use RSSReader ...
10. And, finally, blogging software. Again, you can choose to host your own, outsource it entirely, or outsource the hosting, and deploy your own blogging software. Mine is based on DasBlog ...
Have I forgotten anything ???
I've recently been working with a good friend of mine on configuring a Virtual PC environment for examining the Office 12 beta, including the latest Office Server and SharePoint products. He gave me a great idea for a blog entry that lists the tools, both hardware and software, that we use every day as Microsoft architects, developers, and consultants. Here's my list of hardware:
Hardware:
1. A good laptop. Plan on getting a new one every two years. Most important are RAM and disk capacity. Nowadays, you need 2GB of RAM to setup multiple virtual machines, and at least a 100GB hard drive. A DVD burner is also a necessity. CPU clock speed is of less importance; look for the best "price point" the latest processor but at a lower clock speed. I'm a big fan of the AMD64 processors ...
2. External hard drives. A large external hard drive is essential for working with Virtual PC images as well as performing backups. Consider getting two units: one to store your Virtual PC images, and one dedicated to a complete hard drive backup. Both should be 250GB or greater. You can save about $40. per unit by purchasing the external USB 2.0 case and the hard drive separately. They are a snap to assemble ...
3. Your network infrastructure. You need a place to host your blog, email, test websites, and, in general, a "place to play". Outsourcing is an inexpensive way to do this. I've chosen to build my own small infrastructure (web server, email server, database server, and domain controller). If you can afford to do this it is a great way to learn all about deployment, configuration, and network infrastructure issues. You can also build up your infrastructure piece-by-piece ...
4. Internet connection and router / firewall. No mystery here. You need a fast, reliable Internet connection and a hardware firewall to keep the bad people away from your "stuff" ...
In my next blog entry, I'll list the software tools that I can't live without ...
The release version of the Enterprise Library for .NET Framework 2.0 is now available for download here. This release of Enterprise Library includes six application blocks (Caching, Cryptography, Data Access, Exception Handling, Logging and Security). The release version for the .NET Framework 2.0 is labeled as the January 2006 release ...
While I've found many of the application blocks to be a bit over-engineered and overly complex, I am particularly interested in the Data Access Application Block. I've used it going back to the .NET 1.1 version and have been using earlier releases of the 2.0 version in a .NET migration effort. I think the 2.0 version both provides flexibility in working with both the disconnected and connected modes provided by ADO.NET, as well as providing a level of reuse and standardization when working with data ...
We've been using the Database Access Application Block (DAAB) in Enterprise Library 2.0 for our .NET migration effort and have found it to be a great way to jump-start our development effort. We are using the Enterprise Library as-is and are simply implementing our own versions of the Database and DatabaseFactory classes. As we eventually get the "production" version of Enterprise Library 2.0, we'll simply deploy the new assemblies along with our own assembly that implements our custom classes ...
OK, so I've been trying to install beta 1 of the Office 12 Server, with limited success. My good friend Mauro Cardarelli warned me about installing this server on a domain controller, so I've create a virtual environment consisting of three virtual machines. One is a domain controller, and the other two are member servers. One member server is a SQL Server, and the second member server will be my Office 12 server ...
I have all three VMs up and running, and the member servers have been joined to the domain. Once I got all the prerequisites installed on the Office 12 server (.NET Framework 2.0, ASP.NET, WWF 3.0, etc.) I installed the Office 12 server. The installation completed, and life appeared to be good. However, when I ran the SharePoint Products and Technologies Configuration Wizard, configuration task 5 of 9 fails with a "Failure to Register SharePoint Services" message. Additional exception information is that "This access control list is not in canonical form and therefore cannot be modified." ...
Has anyone gotten this to work?
I've been looking at .NET localization and resource handling in .NET 2.0 and Visual Studio 2005. If you've created a Windows Forms application using Visual Studio 2005, you'll notice a Properties folder in your project containing a default Resources.resx file. Here, you can use the designer to easily add formatted string resources, as well as images and icons. Even if you are not writing an localizable application, the resource file can be a handy, central location to contain string constants used by your application ...
To fetch a resource string in you application, simply create an instance of System.Resources.ResourceManager and invoke the GetString() method like so:
ResourceManager resMgr = new ResourceManager("MyProject.Properties.Resources", this.GetType().Assembly); string s = regMgr.GetString("String1");
I've been looking at the latest version of the Database Access Application Block for my latest project, a VB6 to .NET 2.0 migration project. I've used previous version of the DAAB in .NET 1.0 and 1.1 projects and found it to be a great tool to encapsulate and standardize all the database access logic ...
While earlier versions were made up of almost entirely static methods of a SQLHelper class that made a database connection, setup the commands, executed them, and tore down the connection, the new version is based on a Database object that wraps the DbConnection object and also handles the fetching of the connection string from the web.config file. It also provides the flexibility to setup your own DbCommand object (with any appropriate SQLParameters), or make a method call that encapsulates the DbCommand. The "Quick Start" also provides a useful test harness that provides examples of salient use cases ...
The DAAB is a great way to jumpstart any ADO.NET 2.0 development effort!
I built a simple photo album ASP.NET applicatioin with Visual Studio 2005 and I decided to use forms-based authentication to "password-protect" the application. The good news is that I didn't write a single line of code to provide a login page. However, there was a bit of configuration and installation that I had to do to get the SQL Server 2005 personalization database setup and working with my application. Once I got it setup, deploying it to my production server was a breeze ...
Here are the important steps:
1. Run the aspnet_regsql.exe application from the Visual Studio 2005 command prompt to create the aspnetdb database,
2. Be sure to grant your anonymous Internet login aspnet_Membership_BasicAccess, aspnet_Personalization_BasicAccess, aspnet_Profile_BasicAccess, and aspnet_Roles_BacisAccess role memberships for the aspnetdb database,
3. Using Visual Studio 2005, configure your web.config file with a connection string to the aspnet database, as well as membership, roleManager, and authorization nodes as shown below:
<?xml version="1.0"?> <!-- Note: As an alternative to hand editing this file you can use the web admin tool to configure settings for your application. Use the Website->Asp.Net Configuration option in Visual Studio. A full list of settings and comments can be found in machine.config.comments usually located in \Windows\Microsoft.Net\Framework\v2.x\Config --> <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <appSettings/> <connectionStrings> <add name="MySqlConnection" connectionString="Data Source=<your SQL Server here>;Initial Catalog=aspnetdb;Integrated Security=SSPI;" /> <system.web> <!-- Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development. --> <compilation debug="true"/>
<authorization> <allow users="guest" /> <deny users="*" /> </authorization> <!-- The <authentication> section enables configuration of the security authentication mode used by ASP.NET to identify an incoming user. --> <membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="15"> <providers> <clear /> <add name="SqlProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="MySqlConnection" applicationName="<your app name here>" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" requiresUniqueEmail="true" passwordFormat="Hashed" /> </providers> </membership> <roleManager> <providers> <clear /> <add connectionStringName="MySqlConnection" applicationName="<your app name here>" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <add applicationName="PatsPhotos" name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </providers> </roleManager>
<authentication mode="Forms"> <forms name=".ASPXFORMSAUTH" /> </authentication>
<!-- The <customErrors> section enables configuration of what to do if/when an unhandled error occurs during the execution of a request. Specifically, it enables developers to configure html error pages to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> <error statusCode="403" redirect="NoAccess.htm" /> <error statusCode="404" redirect="FileNotFound.htm" /> </customErrors> --> </system.web> </configuration>
4. From the Website, ASP.NET Configuration menu in Visual Studio 2005, add the appropriate users, roles, and access rules using the Website Administration Tool,
5. For my app, I created a new, blank ASP.NET page named login.aspx and dragged a Login control onto the page from the Toolbox. I selected one of the built-in auto formats for the Login control ...
Et voila! I had added forms-based authentication using a SQL Server 2005 database without writing a single line of ASP.NET code!
After testing my application, I repeated steps 1 and 2 on my production SQL Server, and modified my web.config file to add a "production" connection string ...
I just went through the process of integrating Visual SourceSafe with Visual Studio 2005. A new version of Visual SourceSafe, Visual SourceSafe 2005, is packaged with the Team Edition of Microsoft Visual Studio 2005. The bad news is that Visual Studio 2005 does not support integration with Visual SourceSafe 6.0, and furthermore, you cannot install Visual SourceSafe 6.0 side-by-side with Visual SourceSafe 2005. However, the good news is that legacy versions of Microsoft Visual Studio, including Visual Studio 6.0, will integrate with the new version of SourceSafe ...
The installation process was a little tricky on my laptop. Here are the steps I took:
1. I uninstalled Microsoft Visual SourceSafe 6.0 via Add/Remove Programs. This apparently was successful, yet my SourceSafe icon was still installed on my start menu and the application still worked,
2. I ran Add/Remove Programs on my instance of Microsoft Visual Studio 6.0 and deselected the Visual SourceSafe option. This was successful, but again, SourceSafe 6.0 was still installed and working,
3. I went to the /Program Files/Microsoft Visual Studio/Common Files/VSS folder and unregistered all the DLLs in that folder. Then, I deleted the folder. I received no warning messages about applications or components being registered or installed,
4. I installed Visual SourceSafe 2005 from my Visual Studio 2005 Team Edition for Developers disc,
5. I opened Visual Studio 2005 and selected Microsoft Visual SourceSafe as my installed plug-in from the Tools, Options menu.
To my surprise, not only was Visual Studio 2005 integrated with this new version of SourceSafe, but my Visual Studio 6.0 environment (as well as my Visual Studio 2003) was as well ...
|
Copyright © 2008 George D. Wesolowski
newtelligence dasBlog 1.8.5223.1
|
|