Server Error in “Application”-Application Error When Using Access Database With NET Framework

June 19th, 2008

I had an application that I was working where the client insisted on using an Access database for the application. The application was running on a two node server farm so the Access database had to be located on a seperated machine and accessed over the network. When upgrading the server farm from 2000 to 2003 the client ran into an issue accessing the database.

After checking to make sure it wasn’t an error with the connection to the location where the database was held I attempted to put the database underneath the site and connect to it there. Well that connection worked fine and the data could be accessed.

Long story short after some research and some long hours on this I found that the issue was a combination of things. First under IIS 6 all applications are run under application pools. The application pools do not pass the identity along that they run under. This creates a problem when trying to access a remote drive. To solve this issue you can enable impersonation of the account that you had IIS to run as the anonymous user. To do this you need to open the web.config file of your application. Under the and then insert a line that is similar to this:

< IDENTITY impersonate=""true"/" >

This line should be used if you wish to impersonate the user as the account that the user is logged in as on their desktop.

or

< IDENTITY impersonate=""true"" userName=""< your" user name >” password=”< USER account password > “/>

This line should be used if you want to specify one specific account to impersonate.

After I turned on the impersonation in my project another issue appeared. I got the dreded /< YOUR name application > Application Error. This issue was addressed in Microsoft KB82719 Article.

When a .NET application executes it uses the TEMP folder of the ASPNET user, or whatever user you have specified to run your .NET applications, to run and store temporary files. When you run an Access database/application temporary files are opened but since you are impersonating a user that user does not have access to open these files under the ASPNET temp directory. The solution for this is simple, go into the file structure and grant the account access to the temp folder in C:Document settingsServerNameASPNETlocal settings folder. Only give the account access to the Temp folder so that a security risk is not created.

Jason Fortner is co-founder of Total Productivity Solutions, http://www.totalproductivitysolutions.com, a company that specilizes in SharePoint, Webpart and .NET development. More tips on web development visit Total Productivity Solutions.

Copies of Paychecks

March 25th, 2008

Copies of paychecks can be obtained through software that is specific to accounting. This software is quite versatile and allows the user to enter the number of hours worked, for instance, before it makes the check. It allows the user to have a preview of the check, if it is the very first check being created for a particular employee. It also allows one to factor in vacation time, sick leave and other additions and omissions.

This software allows the user to print multiple copies of any given paycheck. The date of the check and the end of the pay period need to be updated, if and when necessary. The preview option presents a sample of every check being signed so that relevant changes can be implemented. One must use forms that include preprinted account numbers, check numbers, and other pertinent information concerning the financial institution where the account is held.

The software, in addition to all its other features, contains print forms and paychecks. Furthermore, the ’select-employee-to-pay’ option will print out the paychecks. This can be done by selecting the checking account for which the check has to be made.

The first thing to do is check if the number on the paycheck in the printer coincides with the number in the first-check-number field. If the user requires multiple copies of the same check, the number of copies needed will have to be entered in the number-of-copies field. The way to make additional copies of paychecks and not waste check stock is by alternating checks with plain paper.

One remarkable thing about the software is that in case of a number being wrongly printed on the paycheck, the user, on entering the number of the misprinted paycheck, can get the software to remove the misprinted numbers from the paycheck, allowing the user to reuse the same checks.

Paychecks provides detailed information on Paychecks, Paycheck Calculators, Copies of Paychecks, Direct Depositing Paychecks and more. Paychecks is affiliated with Payday Loans.

The Best Way to Reinstall Windows Without Losing Data

March 21st, 2008

At some point during the course of your computer’s use, you will find yourself in the unenviable position of having to reinstall Windows. There are many reasons for this. Perhaps important system files got corrupted or disk errors or viruses caused your system to become unstable.

This is all a result of wear and tear on your PC. When that time comes, you will have to not only know how to reinstall windows, but how to reinstall windows without losing data. Here we refer to a fresh install of Windows and not simply an attempt to repair a few files.

1. Your Vendor’s Restore CD

The first step in knowing how to reinstall windows is to locate your vendor’s restore CDotherwise known appropriately enough as a rescue or boot disk. Windows comes with its own rescue CD as well. If that’s the only one you have at your disposal then locate your operating system’s instructions below.

Rescue CDs are not all alike. Some give you rescue functions as well as important software drivers for your computer. Others are more basic, only allowing you the ability to reformat your hard drive. Don’t reformat your hard drive without backing up your personal files to another medium first! Your personal files are those located under ‘My Documents’ in Windows. The exact location of your personal files and folders varies from one operating system to another.

In Windows XP, for example, you will backup everything in C:Documents and Settings. In Windows 98 and ME, you will backup C:My Documents. More instructions follow below for your particular system. If you have any other folders where you’ve stored personal stuff back those up as well.

2. Windows 98 and ME CDs

With Windows 98 and ME you don’t want to just reinstall windows without backing up important system information. This information can be found in your Windows folders.

First create a new folder on your C: drive and name it oldWindows. Then use Windows explorer to navigate to your Windows folder. Once there, locate the following subfolders: All Users, Application Data, Desktop, Favorites, Local Settings, Profiles, SendTo, and Start Menu. Copy these folders to the oldWindows folder you created.

Now it’s time to reboot. Restart Windows with your boot disk Upon startup select Start computer with CD-ROM support. Drivers will begin loading so go ahead and insert your Windows CD-ROM.

To reinstall windows properly you will need to delete your directory tree so type c:windowscommanddeltree /y c:windows and press the Enter key. After that you need to invoke the Windows setup installation procedure located on your Windows CD. Type your CD drive letter and then type setup.

Next get into the DOS prompt from Windows and type

xcopy c:oldWindows*.* c:windows /s /h /r /c.

This will restore all important system information.

3. Windows 2000 and XP CDs

If you have Windows 2000 and XP you need to know how to reinstall windows properly as well. Insert your Windows CD and boot your computer. Upon startup you will see Press any key to boot from CD.

After clicking you will come to the welcome screen. Press Enter, then press Escape to start a restore. From the menu options select C as your current partition and then l to delete the Windows folder. Enter temp as your user name when prompted. Reboot and you will be logged in as temp.

Next you will restore your personal files. Windows 2000 users should login as temp, then Administrator and then back to temp again. Then navigate to C:Documents and Settings and you will see an Administrator folder and one with Administrator: computername.

From DOS type cd documents and settings and then press Enter. Type xcopy administrator*.* administrator.computername /s /h /r /c, substituting for computername your folder that was appended to Administrator earlier. Your personal files will be restored.

4. For Both Windows XP and 2000

Windows XP and 2000 users need one extra step to know how to reinstall windows correctly. Create a new folder on your C: drive and label it oldData. Then go to My Documents and Settings and copy all of the folders for each username to oldData.

In Control Panel go to User Accounts and create a new account for each of these usersuse their names as spelled out under their Documents and Settings folders. If you’re using XP ensure that at least one account has Administrator privileges.

For each user on your computer, log off and log in with that user’s name. Then login as Temp and drop down into the DOS command prompt interpreter. Now type

xcopy c:oldData*.* “c:documents and settings” /s /h /r /c

Then press Enter. Go ahead and confirm that you want to overwrite files. When you’re done, log off and then login as each user. Each user’s Documents and Settings should be restored.

5. Finishing Up

After you install windows you need to install other software too, like drivers and Windows Updates from Microsoft’s web site. Check for any graphics drivers that you may need to install from a vendor CD.

Look for all of your old personal files and make sure that they are all there. If not, check the C:oldData folder and move the files to the correct location. Once you are absolutely sure that you have everything you can delete both the oldData folder and the Administrator folder.

Conclusion

It may have come as a surprise to you to learn that you can reinstall windows without having to wipe out your hard drive. With a fresh install of Windows you can restore to your computer the speed and efficiency which it had when you first bought it.

A fresh install will do wonders for your computer’s performance and will be better for your system than a simple repair. In order to save your personal files you simply need to create temporary folders as we outlined in this article and restore them back into the new installation.

Gary Hendricks runs a hobby site on building computers. Visit his
website at http://www.build-your-own-computers.com for tips and
tricks on assembling a PC, as well as buying good computer components.