Search This Blog

Wednesday, March 31, 2010

Application Development: technorati like - News Scroller with jQuery

Application Development: technorati like - News Scroller with jQuery

Monday, March 29, 2010

Failed to access IIS metabase. An unhandled exception occurred during the execution of the current web request. Please review the stack ...

Hit below error when try to setup and new application in IIS.

Server Error in '/encelabs' Application.

--------------------------------------------------------------------------------

Failed to access IIS metabase.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.

The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC). For information on modifying metabase permissions, please see http://support.microsoft.com/?kbid=267904.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:

[HostingEnvironmentException: Failed to access IIS metabase.]
System.Web.Configuration.MetabaseServerConfig.MapPathCaching(String siteID, VirtualPath path) +3492170
System.Web.Configuration.MetabaseServerConfig.System.Web.Configuration.IConfigMapPath.MapPath(String siteID, VirtualPath vpath) +9
System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) +163
System.Web.CachedPathData.GetConfigPathData(String configPath) +382
System.Web.CachedPathData.GetConfigPathData(String configPath) +243
System.Web.CachedPathData.GetApplicationPathData() +68
System.Web.CachedPathData.GetVirtualPathData(VirtualPath virtualPath, Boolean permitPathsOutsideApp) +3385679
System.Web.Configuration.RuntimeConfig.GetLKGRuntimeConfig(VirtualPath path) +189


Version Information: Microsoft .NET Framework

________________________________________________________

Solution:
For my case, the reason hit above error is because.NET Framework was installed before IIS server. To solve the problem, register .NET framework to IIS will do.

How to do that? (please be aware that the sample using for.NET Framework V1.0)

Steps:

1. Click on Start -> Run






2. Type in cmd and click OK





3. Command prompt screen will appear. go to"C:\Windows\Microsoft.NET\Framework\
v2.0.50727" folder by using command cd C:\Windows\Microsoft.NET\Framework\v2.0.50727 and hit enter. Please refer screen below:





4. Type in
aspnet_regiis -i and hit enter.




5. Screen below will be shown and dotnet user installed.




aspnet_regiis -i

alternatively you can copy and paste this command into windows command prompt

%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i

Ping a port

Well, sometimes we need to know whether the port in open or block, we need to do some checking or troubleshoot through ping/telnet. We cannot ping a IP with port but we can telnet certain IP together with Port no.

For example:
Go to open command prompt, if we want to check whether port 21 is working for IP 203.166.87.9 what we need to do is
> telnet 203.166.87.9 21

please tell me it's work. thanks

Thursday, March 25, 2010

Could not load file or assembly 'CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependenci

Deploy a web application that uses crystal report basic 10.5 and hit below error when try to access to the application.

"Could not load file or assembly 'CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified."

This is because we dont have crystal report basic runtime installed in the server.

Where do I get the basic (10.5) runtime? It's on your machine:
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\CrystalReports10_5

My server is a 32 bit machine, so i install CRRedist2008_x86.msi in the machine.

Now what? I still can the same error? Wait, we need to restart the IIS to make it work. After restart the IIS, it's work perfectly.

STOP: c000021a (Fatal System error) The windows subsystem system process terminated unexpectedly with a status 0xc0000005

I hit below error/blue screen when trying to install MSSQL 2005 Express in a Microsoft XP pro SP2 machine:

STOP: c000021a (Fatal System error)
The windows subsystem system process terminated unexpectedly with a status 0xc0000005 (0x7c9106c3 0x0053ec24)

Try for 3 times to reinstall windows and no luck. Hit the same error when installing MSSQL 2005 Express.

Finally found an forum
http://blogs.msdn.com/petersad/archive/2009/01/20/sql-server-2005-sp3-sql-server-2005-sp2-cus-or-sql-server-2008-may-cause-xp-sp2-to-restart.aspx

And hotfix in http://support.microsoft.com/kb/943232

We have to register our email and the hotfix link come with password with send to our email.

After apply both hotfix. My problem solved.

Wednesday, March 24, 2010

Status of package 'Crystal Reports Basic for Visual Studio 2008 (x86, x64)' after install is 'InstallFailed'

Trying install Crystal Reports Basic for Visual Studio 2008 in XP Pro SP2 and hit bellow error.

The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [ProcessorArchitecture] = Intel {string}
Property: [VersionNT] = 5.1.2 {version}
Running checks for package 'Crystal Reports Basic for Visual Studio 2008 (x86, x64)', phase BuildList
Running MsiProductCheck with ProductCode '{AA467959-A1D6-4F45-90CD-11DC57733F32}'
MsiQueryProductState returned '-1'
Setting value '-1 {int}' for property 'CRVSInstalled'
Running MsiProductCheck with ProductCode '{CE26F10F-C80F-4377-908B-1B7882AE2CE3}'
MsiQueryProductState returned '-1'
Setting value '-1 {int}' for property 'CRVSRunTimex86Installed'
Running MsiProductCheck with ProductCode '{2BFA9B05-7418-4EDE-A6FC-620427BAAAA3}. '
MsiQueryProductState returned '-2'
Setting value '-2 {int}' for property 'CRVSRunTimex64Installed'
The following properties have been set for package 'Crystal Reports Basic for Visual Studio 2008 (x86, x64)':
Property: [CRVSInstalled] = -1 {int}
Property: [CRVSRunTimex64Installed] = -2 {int}
Property: [CRVSRunTimex86Installed] = -1 {int}
Running checks for command 'CrystalReports10_5\CRRedist2008_x86.msi'
Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'Intel': false
Result of running operator 'ValueGreaterThan' on property 'CRVSInstalled' and value '0': false
Result of running operator 'ValueGreaterThan' on property 'CRVSRunTimex86Installed' and value '0': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false
Skipping FailIf because Property 'Version9x' was not defined
Result of running operator 'VersionLessThan' on property 'VersionNT' and value '5.00': false
Result of checks for command 'CrystalReports10_5\CRRedist2008_x86.msi' is 'Install'
Running checks for command 'CrystalReports10_5\CRRedist2008_x64.msi'
Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'AMD64': true
Result of checks for command 'CrystalReports10_5\CRRedist2008_x64.msi' is 'Bypass'
'Crystal Reports Basic for Visual Studio 2008 (x86, x64)' RunCheck result: Install Needed
EULA for components 'Crystal Reports Basic for Visual Studio 2008 (x86, x64)' was accepted.
Copying files to temporary directory "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\VSD1.tmp\"
Copying from 'C:\Documents and Settings\Administrator\Desktop\XinInvoiceSetup2_new\XinInvoiceSetup2\CrystalReports10_5\CRRedist2008_x86.msi' to 'C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\VSD1.tmp\CrystalReports10_5\CRRedist2008_x86.msi'
Verifying file integrity of C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\VSD1.tmp\CrystalReports10_5\CRRedist2008_x86.msi
WinVerifyTrust returned 0
File trusted
Running checks for package 'Crystal Reports Basic for Visual Studio 2008 (x86, x64)', phase BeforePackage
Running MsiProductCheck with ProductCode '{AA467959-A1D6-4F45-90CD-11DC57733F32}'
MsiQueryProductState returned '-1'
Setting value '-1 {int}' for property 'CRVSInstalled'
Running MsiProductCheck with ProductCode '{CE26F10F-C80F-4377-908B-1B7882AE2CE3}'
MsiQueryProductState returned '-1'
Setting value '-1 {int}' for property 'CRVSRunTimex86Installed'
Running MsiProductCheck with ProductCode '{2BFA9B05-7418-4EDE-A6FC-620427BAAAA3}. '
MsiQueryProductState returned '-2'
Setting value '-2 {int}' for property 'CRVSRunTimex64Installed'
The following properties have been set for package 'Crystal Reports Basic for Visual Studio 2008 (x86, x64)':
Property: [CRVSInstalled] = -1 {int}
Property: [CRVSRunTimex64Installed] = -2 {int}
Property: [CRVSRunTimex86Installed] = -1 {int}
Running checks for command 'CrystalReports10_5\CRRedist2008_x86.msi'
Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'Intel': false
Result of running operator 'ValueGreaterThan' on property 'CRVSInstalled' and value '0': false
Result of running operator 'ValueGreaterThan' on property 'CRVSRunTimex86Installed' and value '0': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false
Skipping FailIf because Property 'Version9x' was not defined
Result of running operator 'VersionLessThan' on property 'VersionNT' and value '5.00': false
Result of checks for command 'CrystalReports10_5\CRRedist2008_x86.msi' is 'Install'
'Crystal Reports Basic for Visual Studio 2008 (x86, x64)' RunCheck result: Install Needed
Verifying file integrity of C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\VSD1.tmp\CrystalReports10_5\CRRedist2008_x86.msi
WinVerifyTrust returned 0
File trusted
Installing using command 'C:\WINDOWS\system32\msiexec.exe' and parameters ' -I "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\VSD1.tmp\CrystalReports10_5\CRRedist2008_x86.msi" -q /norestart'
Process exited with code 1603
Status of package 'Crystal Reports Basic for Visual Studio 2008 (x86, x64)' after install is 'InstallFailed'

Fix:
Install .NET 2.0 Framework will solve the problem

Sunday, March 21, 2010

Parser Error Message: Section or group name 'system.web.extensions' is already defined.

facing below error in my development machine when i try to access to one of my application that running in ASP.NET framework 2.0

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Section or group name 'system.web.extensions' is already defined. Updates to this may only occur at the configuration level where it is defined.

Source Error:

Line 2:   Line 3:    Line 4:     Line 5:      Line 6:      

Source File: C:\Inetpub\wwwroot\xxxxx\web.config Line: 4



Section or group name 'scripting' is already defined. Updates to this may only occur at the configuration level where it is defined. (C:\Inetpub\wwwroot\formlookup_ajax2\web.config line 5)
Section or group name 'scriptResourceHandler' is already defined. Updates to this may only occur at the configuration level where it is defined. (C:\Inetpub\wwwroot\formlookup_ajax2\web.config line 6)
Section or group name 'webServices' is already defined. Updates to this may only occur at the configuration level where it is defined. (C:\Inetpub\wwwroot\formlookup_ajax2\web.config line 7)
Section or group name 'jsonSerialization' is already defined. Updates to this may only occur at the configuration level where it is defined. (C:\Inetpub\wwwroot\formlookup_ajax2\web.config line 8)
Section or group name 'profileService' is already defined. Updates to this may only occur at the configuration level where it is defined. (C:\Inetpub\wwwroot\formlookup_ajax2\web.config line 9)
Section or group name 'authenticationService' is already defined. Updates to this may only occur at the configuration level where it is defined. (C:\Inetpub\wwwroot\formlookup_ajax2\web.config line 10)


Situation:

In My IIS setting
My Default Web Site Location path point to an application that running asp.net framework 3.5
When i access to one of my application that park under Default Web Site that running in asp.net framework 2.0, it hits error above.

Solution:
Remove the Default Web Site Location path solve my problem.

Monday, March 15, 2010

Exception Details: System.UnauthorizedAccessException: Access to the path C:\xx\aa.xml is denied. ASP.NET is not authorized to access the requested re

Access to the path 'C:\xxx\aa.xml' is denied.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path 'C:\xxx\aa.xml' is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via , the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[UnauthorizedAccessException: Access to the path 'C:\xxx\aa.xml' is denied.]    System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +651    System.IO.File.Delete(String path) +157    Admin_PropertyEdit.GenerateXML(Int64 pPropertyID, String pPropertyTypeName) +124    Admin_PropertyEdit.btnRemove_Click(Object sender, EventArgs e) +248    System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746 

Hit above error when trying to write a xml file in the web server. I've tried to set write permission for both internet guest user & also ASP.NET user but still the same.

Finally, i add into web.config and the problem solve.
<identity impersonate="true"/>

syntax

<configuration>
<system.web>
<identity impersonate="true"/>
</system.web>
</configuration >



I'm not sure why, to know more, please check on

http://msdn.microsoft.com/en-us/library/72wdk8cc.aspx