Pages

Thursday, August 29, 2013

CS0002: Unable to load message string from resources



Symptom: - An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0002: Unable to load message string from resources.
Source Error:   [No relevant source lines]
Source File:    Line: 0
Show Detailed Compiler Output:

c:\windows\system32\inetsrv> "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\csc.exe" /t:library /utf8output /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\18f0b9ce\205e538f\assembly\dl3\888f84d6\2e57f359_b4b6ca01
fatal error CS0002: Unable to load message string from resources.
fatal error CS0002: Unable to load message string from resources.
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

Cause: –

This is a common problem which happens when you install ASP.NET 4.0, and it happens when ASP.NET 4 is not installed properly.

Temporary Workaround: -

Copy “C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\” directory from any other server and paste to the problem server will resolve the problem.  

Resolution: -

Uninstall and Reinstall ASP.NET 4.0 resolve this problem.

Reference: -

Faulting application w3wp.exe, version 6.0.3790.1830, stamp 42435be1, faulting module mscorwks.dll, version 2.0.50727.42



Description: - A .NET Framework 2.0 application that runs under a user account context when no user profile is associated with the user account context may crash, or you may receive an access violation error message
Symptom: -
Consider the following scenario: • An application is built by using the Microsoft .NET Framework 2.0.
• The application runs in the Microsoft .NET Framework 2.0.
• The application runs under a user account context.
• No user profile is associated with the user account context.
In this scenario, the application may crash, or you may receive an access violation error message. If you debug the crash, you find an access violation in the mscorwks!SecurityConfig::GetCacheEntry function.

If you experience this problem in a Microsoft ASP.NET application, you receive error messages in the event log that are similar to the following:

Error message 1

Event ID : 1023
Raw Event ID : 1023
Record Nr. : 14
Category : None
Source : .NET Runtime
Message : NET Runtime version 2.0.50727.42 - Fatal Execution Engine Error (7A05E2B3) (80131506)

Error message 2

Event ID : 1000
Raw Event ID : 1000
Record Nr. : 15
Category : None
Source : .NET Runtime 2.0
Error Reporting Type : Error
Message : Faulting application w3wp.exe, version 6.0.3790.1830, stamp 42435be1, faulting module mscorwks.dll, version 2.0.50727.42, stamp 4333e7ec, debug? 0, fault address 0x000e9f96.
Notes

• Error message 2 immediately follows error message 1.
• This problem occurs with ASP.NET 2.0 applications. This problem may occur with other types of applications that run under non-interactive accounts, such as Windows services.
Additionally, in Microsoft Windows SharePoint Services 3.0 or in Microsoft Office SharePoint Server 2007, you may be prompted for authentication when you connect to the Site Usage Report page of a Web site to view the usage data for that Web site. Then, you may recieve the following error message:
The request failed with HTTP status 401: Access Denied
The following event is logged in the event log:
Event ID : 1023
Raw Event ID : 1023
Record Nr. : 14
Category : None
Source : .NET Runtime
Message : NET Runtime version 2.0.50727.42 - Fatal Execution Engine Error (7A05E2B3) (80131506)
CAUSE

This problem occurs when a null reference is in the user policy cache.

RESOLUTION

Hotfix for ASP.Net 2.0 needs to be applied from Microsoft.

References

The IIS Admin Service service terminated with service-specific error 2148073478 (0x80090006).



Error: -
Source:        Service Control Manager
Event ID:      7024
Task Category: None
Level:         Error
User:          N/A
Computer:      Server
Description:
The IIS Admin Service service terminated with service-specific error 2148073478 (0x80090006).
Event Xml:
http://schemas.microsoft.com/win/2004/08/events/event
">
 
   
    7024
    0
    2
    0
    0
    0x80000000000000
   
    49238816
   
   
    System
    Server
   
 

 
    IIS Admin Service
    2148073478 (0x80090006)
 


Symptom: -
Windows could not start the IIS Admin Service on Local Computer.
World wide service may or may not start.
System can not find the file specified.

Cause and overview: -

The reason IISADMIN fails to start in this scenario is because of a failure to decrypt secure data (User ACLs, Passwords) in Metabase.xml file, and the connectivity with MachineKeys. The MachineKey is a file that IIS uses to decrypt secure data in the Metabase.xml. There can be many machine key files in machineKeys directory, but the Machinekey for IIS starts with “c23”.
We can see machinekeys in two locations:
The first location which is well known: -
%ALLUSERSPROFILE%\Application Data\Microsoft\Crypto\RSA\MachineKeys
The other location:-
 %windir%\Profiles\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys

How to locate correct location for MachineKeys:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
And from this path we can confirm the correct location for MachineKeys

Checks for resolution: -


1)      Make sure we’ve a metabase.xml file at C:\windows\system32\inetsrv folder
2)      Make sure we’ve a C23 MachineKey file at the location found in above path
3)      Ensure we’ve necessary permissions as per http://support.microsoft.com/kb/278381/en-us
4)      If you’ve only one instance, then check and make sure that the date on the key matches the date from the time when IIS was installed on the server. If the date is newer than the last IIS install date, then the MachineKey that was used to encrypt the metabase got lost and you’d have to reinstall IIS (if you don’t have the MachineKyes backup anywhere)
5)      Or else you could look at the suffix of C23 key (the entire length that follow “_” in the C23 key) and check if it is different from any of the suffixes for other keys in the container. This means that the machineKey (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptographic\MachineGUID) for the machine has changed since the IIS was last installed on the machine. If you don’t have a second instance of the “C23” key, then replace the suffix of the older key with the MachineGUID value found the the registry and delete the newer key. You should be able to restart IIS admin at this point. Also remember that this does not fix IISadmin service startup problem, but prevents the C23 duplicate issue from happening again (which might be the cause of IISAdmin startup issue).
6)      Finally if it does not help to get the service start then you can use MSConfig to disable all the third party (Non-Microsoft) service and see if it help to get the service start.

***Additional Recommendation

Ensure that you backup IIS with password secure option on regular basis, you can use this copy to transfer as well. The full procedure to perfrom that can be found here
Ensure that the machine keys are also backed up in the full system backup jobs.

References

Enabling HTTP Compression on IIS 6.0



HTTP Compression can be enabled server-wide or on a website or on a web application. It improves bandwidth utilization and speed up website performance. Also, you may compress static or dynamic files.

Procedures

Here steps are given to enable the http-compression using IIS management console. These are applicable only to IIS 6.0.
1.       Open IIS management console, expand Computer, right-click the Web Sites folder, and go to Properties.
2.        Select Service tab, under HTTP compression section
a.       Check Compress application files.
b.      Check Compress static files.
3.       In the Temporary directory box, type the path to a local directory, cached response will be stored in this temp dir until content gets expire or change. Requisites for temp dir are: -
a.       It must be a local directory
b.      Must be NTFS
c.       IIS_WPG group musthave full permission
d.      Compression/Encryption must not be enabled for that directory on file level.
4.       Click Apply, and then click OK.

How Configure the State Service and Session State Persistence (IIS 6.0)


This is an article about how to configure the State service on the ASP.NET State Server and Session State persistence on IIS 6.0.

 

Configure the State Service on the ASP.NET State Server (IIS 6.0)
Description: - The ASP.NET state service is used to manage session state on a computer. The ASP.NET state service is installed by default when Microsoft® Windows® Server 2003 is installed. The file aspnet_state.exe is installed on the remote server that will store session state information; the default location is systemroot\Microsoft.NET\Framework\version\aspnet_state.exe.

Procedures

To configure the ASP.NET state service

1.
On the remote server that will store session state information, open Administrative Tools, and then click Services.
2.
In the details pane, right-click ASP.NET State Service, and then click Properties.
3.
On the General tab, in the Startup type list box, click Automatic.
4.
Under Service status, click Start, and then click OK. The state service starts automatically when the Web server is restarted.
Enabling Session State Persistence (IIS 6.0)
Description: - You can enable session state persistence for ASP applications. If you enable session state persistence, the server will create a new Session object for each connection and session state will be accessible, session storage will be allowed, Session_OnStart and Session_OnEnd will occur, and ASPSessionID cookie will be sent to the client. If you do not enable session state persistence, state access and storage are not allowed, events are not processed, and no cookie is sent. By default, session state persistence is enabled with the session timeout at 20 minutes. The corresponding metabase property is AspAllowSessionState Metabase Property.

Procedures

To enable session state persistence for an ASP application

1.
In IIS Manager, expand local computer, Go to Web site/Web Application’s Properties.
2.
Click the appropriate tab: Home Directory, Virtual Directory, or Directory.
3.
In the Application settings area, click Configuration, and then click the Options tab.
4.
On the Options tab, in the Application configuration section, select the Enable session state check box.
5.
In the Session timeout box, click the up or down arrow to set the number of minutes until the session expires.
6.
Click OK.