Monday, January 28, 2008

HTTP Error 500.19 - Internal Server Error

This is the problem I faced when I copied IIS 6.0 web application on to IIS 7.0. The steps that I executed are:
1. Copied the web application on to a different folder, C:\Users\Name\....\myWebSite.
2. In IIS 7.0, created a new 'Application' (please note that I haven't created virtual directory).
3. The physical folder location is same as defined in step 1 above.

I thought that I am done with my configuration, but when I tried to open 'Default.aspx' in the browser, I get this error.
Description: The requested page cannot be accessed because the related configuration data for the page is invalid.
Error Code: 0x80070005
Notification: BeginRequest
Module: IIS Web Core
Requested URL: http://localhost/MyWeb/Default.aspx
Physical Path: C:\Users\LoggedOnUser\...\Default.aspx
Logon User: Not yet determined
Logon Method: Not yet determined
Handler: Not yet determined
Config Error: Cannot read configuration file
Config File: file:///?\C:\Users\loggedOnUser\...\web.config
Config Source:
-1:
0:

More Information... This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
--------------------------------------------------------------------------------
Server Version Information: Internet Information Services 7.0.

Seeing this error, it striked in my mind that definitely it is related to configuration settings in IIS 7.0. I checked the following settings:
1. Authentication - It was disabled for 'Windows Authentication'. I enabled it for the web application.
2. But then also, when I tried to open the default page, i get the same error.
I was thinking that why it is not working, then thought to do some hit and trial versions. The very first step I did is to create a new application pool and instead of using 'NetworkService' as Identity, I set the identity to machineName\userName, in my case because I am not the domain user, so I used machineName\LocalAdministrator. And finally, I set the application pool of the web application to this new application pool.

Bingo! It worked!
I need to explore more of IIS 7.0 features, and actual differences / advantages.

Thursday, January 10, 2008

Required file alink.dll with IAlink3 could not be found

I copied the VS.NET 2005 application from a machine running Windows XP Professional on to another machine with configuration [Dell XPS Intel core 2 Duo, 2.2 GHz processor with 3GB RAM and 160GB HDD (7200rpm)] and Windows Vista Ultimate operating system. Well when I copied the files on to the local XPS machine the challenge was to execute the console application. The very first error I was facing (a) Required file alink.dll with IAlink3 could not be found.

Problem: Required file alink.dll with IAlink3 could not be found.
Solution: I thought that definitely it is something related to either operating system or orcus (VS.NET Studio 2008). As usual the very first thing a developer does is to look for a probable solution in google, and thats what I did too. The very first link was talked pretty well about the solution.

The URL is:

http://codebetter.com/blogs/sam.gentile/archive/2007/04/29/workaround-for-orcas-beta-1-compile-problem-required-file-alink-dll-with-ialink3-could-not-be-found.aspx.

In this if this URL is out of service or content is not available, the details are given here too (courtsey to the URL author).
URL Content

------------------------------------------------------------------------------------
Required file 'alink.dll with IAlink3' could not be found.
I am very grateful to two very fine Microsoft gentlemen that heeded my cry and came to my aid. The first was Tim Ng, who pointed me to the existing forum thread where the problem and a first workaround was posted by Pat Long:
The MSUs are located on the Install CD under \WCU\dotNetFramework\dotNetMSP\x86 and they are called
Windows6.0-KB110806-x86.msuWindows6.0-KB929300-x86.msuWindows6.0-kb930264-x86.msuThey needed to be run manually in order. The problem was when I tried to run the 3rd update it would always fail. At that point, Tim brought in another Softie, Jared Parsons, who came up with the solution and the workaround. We're still working on the issue but if you encounter this problem, the following will get you working!

Another update. This error message occurs because the C# compiler is trying to embed a Vista manifest into your DLL. I believe you can also work around this problem by doing the following.
Navigate to the properties page for the project. At the bottom of the Application tab (should be selected) there is an label called "Manifest" and a combo box underneath that says "Embed manifest with default settings". Switch that to "Create Application without a manifest". I know that will work around the warning in VB and I'm pretty sure it will with C# as well.
Thanks Guys!!!!
-----------------------------------------------
I read this post and then recalled that Gosh! I dont have the operating system DVD handy. A sudden thought "Am I stuck?". Can't I proceed without it. Then I read further in the given solution where it talks about the "vista manifest". I just changed the manifest option from "Embed manifest with default settings" to "Create application without a manifest", and compiled my application (which was an exe). Bingo! Application ran without any problem.

Now my next action item is to investigate on this "Manifest" option, what is the difference and what are the advantages and disadvantages.