locked
trouble hosting on IIS (windows server 2003) RRS feed

  • Question

  • I have copied my customized MSMHelloWorld Health Vault Website under inetpub, under wwroot directory and also set this up as home directory using IIS manager. I can see the home page of this website when I access this from the same machine IE browser by putting the url as my server name http://ms-health (NOT view in browser from within Visual Studio), I get the following error:

    Configuration Error body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size: .9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

    Server Error in '/' Application.

    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: Unrecognized attribute 'restartOnExternalChanges'.

    Source Error:

    Line 8:  <configuration>
    Line 9:  	<configSections>
    Line 10: 		<section name="appSettingsUser" type="System.Configuration.AppSettingsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" restartOnExternalChanges="true" requirePermission="false"/>
    Line 11: 		<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
    Line 12: 			<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

    Source File: C:\Inetpub\wwwroot\MSMHelloWorld\web.config    Line: 10


    Version Information: Microsoft .NET Framework Version:1.1.4322.2407; ASP.NET Version:1.1.4322.2407


    "

    Note: The site works when I do View in Browser from within Visual Studio 2008.

    Thank you.
    Deep
    Thursday, February 12, 2009 5:54 PM

Answers

  • This error has something to do with your certificate install.  Have you given access to NETWORK SERVICE access to certificate using the application manager?

    When you run the code for VS.net it executes under your context (context of logged in user)  who has access to the certificate and you wont see the error.

    HTH

    Raj
    Raj HealthVault Developer Tool http://xray.getrealconsulting.com
    • Marked as answer by DKaur Friday, February 13, 2009 7:07 PM
    Friday, February 13, 2009 7:42 AM

All replies

  • You need to use ASP.net version 2.0 or above in the server...

    The error message shows

    :1.1.4322.2407; ASP.NET Version:1.1.4322.2407

    Raj
    Raj HealthVault Developer Tool http://xray.getrealconsulting.com
    Thursday, February 12, 2009 5:56 PM
  • I am actually using .Net 3.5 SP1, when I see Help in Visual Studio  and then click About Visual Studio it shows me "Microsoft .Net framework Version 3.5 SP1". Why is it using V1.1 when I run using IE7. It works fine from within Visual Studio.

    Deep
    Thursday, February 12, 2009 8:28 PM
  • I found a .net tab in IIS configuration manager, I changed the version to 2.0(It did not give me 3.5 option).

    Now when I access my site from IE 7 I get the following error:
    The handle is invalid.<br> body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size: .9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

    Server Error in '/' Application.

    The handle is invalid.

    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.Security.Cryptography.CryptographicException: The handle is invalid.


    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:

    [CryptographicException: The handle is invalid.
    ]
       System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer) +7712542
       System.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmType keyType, CspParameters parameters, Boolean randomKeyContainer, Int32 dwKeySize, SafeProvHandle& safeProvHandle, SafeKeyHandle& safeKeyHandle) +67
       System.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair() +83
       System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 dwKeySize, CspParameters parameters, Boolean useDefaultKeySize) +226
       System.Security.Cryptography.RSACryptoServiceProvider..ctor(CspParameters parameters) +9
       System.Security.Cryptography.X509Certificates.X509Certificate2.get_PrivateKey() +202
       Microsoft.Health.ApplicationConfiguration.GetSignatureCertRsaProvider(Guid applicationId, RSACryptoServiceProvider& rsaProvider, String& thumbprint) +383
       Microsoft.Health.Web.Authentication.WebApplicationCredential.SetupSignatureCertRsaProvider() +139
       Microsoft.Health.Web.Authentication.WebApplicationCredential.Initialize(Guid applicationId) +270
       Microsoft.Health.Web.Authentication.WebApplicationCredential..ctor(Guid applicationId, String subCredential) +217
       Microsoft.Health.Web.WebApplicationUtilities.GetPersonInfo(String authToken) +101
       Microsoft.Health.Web.WebApplicationUtilities.HandleTokenOnUrl(HttpContext context, Boolean isLoginRequired) +152
       Microsoft.Health.Web.WebApplicationUtilities.PageOnPreLoad(HttpContext context, Boolean logOnRequired) +56
       Microsoft.Health.Web.HealthServicePage.OnPreLoad(EventArgs e) +69
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +554
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082

    "

    Thanks in advance for your help.

    Deep
    Thursday, February 12, 2009 8:46 PM
  • This error has something to do with your certificate install.  Have you given access to NETWORK SERVICE access to certificate using the application manager?

    When you run the code for VS.net it executes under your context (context of logged in user)  who has access to the certificate and you wont see the error.

    HTH

    Raj
    Raj HealthVault Developer Tool http://xray.getrealconsulting.com
    • Marked as answer by DKaur Friday, February 13, 2009 7:07 PM
    Friday, February 13, 2009 7:42 AM