Ajax-Enabled WCF on IIS7

Last post 04-22-2009 1:46 PM by trans642. 3 replies.

Sort Posts:

  • Ajax-Enabled WCF on IIS7

    04-06-2009, 2:37 PM
    • Member
      44 point Member
    • trans642
    • Member since 05-01-2006, 4:18 PM
    • Posts 26

    Hello,

     

    Can someone please tell me how I should tweak IIS7 so that ajax-enabled wcf calls are enabled and I can call them from client side? On IIS6 everything is working as it should but on IIS7

     it gave me the following errors

    1) error 500 when trying to access svc from browse

    2) added svc extention to the iis, then it gave me 403

    3) web.config changes... it gave me the following error

    Server Error in '/TEnterprise' Application.

    Unable to cast object of type 'System.Web.Compilation.BuildResultCustomString' to type 'System.Web.Compilation.BuildResultCompiledType'. 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.InvalidCastException: Unable to cast object of type 'System.Web.Compilation.BuildResultCustomString' to type 'System.Web.Compilation.BuildResultCompiledType'.

    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:

     

    [InvalidCastException: Unable to cast object of type 'System.Web.Compilation.BuildResultCustomString' to type 'System.Web.Compilation.BuildResultCompiledType'.]   System.Web.UI.WebServiceParser.GetCompiledType(String inputFile, HttpContext context) +71   System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath) +180   System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +307   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
     

    Thank you,

     

     

     

  • Re: Ajax-Enabled WCF on IIS7

    04-09-2009, 11:23 PM

    Hi,

    Deploying WCF on IIS 7.0 is similar to deploying ASP.NET application. But you need to run command prompt as administrator, and run the following command to work with IIS 7 OOTB.

    "%windir%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -r -y

    For more information about hosting WCF on IIS 7.0, see http://blah.winsmarts.com/2008-4-Host_a_WCF_Service_in_IIS_7_-and-amp;_Windows_2008_-_The_right_way.aspx

     

    I look forward to receiving your test results.

    Thomas Sun
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
  • Re: Ajax-Enabled WCF on IIS7

    04-12-2009, 1:25 PM
    • Member
      44 point Member
    • trans642
    • Member since 05-01-2006, 4:18 PM
    • Posts 26

    hello,

    Executing :

    "%windir%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -r -y

    on developement machine worked ; I still have to hear from our QA for production test-server; Will this regsitration work for https protocols or there are extra steps to be taken for https ?

     

    Thank you

  • Re: Ajax-Enabled WCF on IIS7

    04-22-2009, 1:46 PM
    • Member
      44 point Member
    • trans642
    • Member since 05-01-2006, 4:18 PM
    • Posts 26
     

    Server Error in '/TEnterprise' Application.

    Could not load type '%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll'.

    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.HttpException: Could not load type '%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll'.

    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:

    [HttpException (0x80004005): Could not load type '%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll'.]
       System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +8823813
       System.Web.Configuration.HandlerFactoryCache.GetHandlerType(String type) +21
       System.Web.Configuration.HandlerFactoryCache..ctor(String type) +19
       System.Web.HttpApplication.GetFactory(String type) +78
       System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +229
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
    

     

    I am getting this error on windows 2008 server when trying to browse the wcf service with https. My .Net application is working fine only the wcf fails. 

     

Page 1 of 1 (4 items)