zoukankan      html  css  js  c++  java
  • .net 4.0中wcf在iis7中的配置过程

    我的环境是:windows server 2008 datacenter + IIS7.0 + VS2010 RC

    我用的是ms提供的sample,使用其提供的bat文件来设置环境的:bat内容如下:

    @echo off
    iisreset /stop
    mkdir %SystemDrive%\inetpub\wwwroot\ServiceModelSamples\bin
    VER | FINDSTR /c:" 6.0." >NUL
    IF NOT ERRORLEVEL 1 (
        IF EXIST %windir%\system32\inetsrv\appcmd.exe (
            %windir%\system32\inetsrv\appcmd.exe add app /site.name:"Default Web Site" /path:/ServiceModelSamples /physicalPath:%systemdrive%\inetpub\wwwroot\ServiceModelSamples
        ) ELSE (
            Echo "Could not find %windir%\system32\inetsrv\appcmd.exe.  Please ensure IIS is installed.  See 'Internet Information Service (IIS) Hosting Instructions' in the WCF samples Setup Instructions."
        )
    ) ELSE (
        IF EXIST %SystemDrive%\inetpub\adminscripts\adsutil.vbs (
            cscript.exe %SystemDrive%\inetpub\adminscripts\adsutil.vbs CREATE w3svc/1/root/ServiceModelSamples "IIsWebVirtualDir"
            cscript.exe %SystemDrive%\inetpub\adminscripts\adsutil.vbs SET w3svc/1/root/ServiceModelSamples/Path %SystemDrive%\inetpub\wwwroot\ServiceModelSamples
            cscript.exe %SystemDrive%\inetpub\adminscripts\adsutil.vbs SET w3svc/1/root/ServiceModelSamples/AppRoot "w3svc/1/Root/ServiceModelSamples"
            cscript.exe %SystemDrive%\inetpub\adminscripts\adsutil.vbs APPCREATEPOOLPROC w3svc/1/root/ServiceModelSamples
        ) ELSE (
            Echo "Could not find %SystemDrive%\inetpub\adminscripts\adsutil.vbs.  Please ensure IIS is installed.  See 'Internet Information Service (IIS) Hosting Instructions' in the WCF samples Setup Instructions."
        )
       
    )
    iisreset /start

    但是配置完成后,再浏览器中打开地址时却出现如下错误:折腾了好久,还是没搞定,如果有熟悉的请指教。

    解决方法:

    安装.Net FrameWork 3.5及其sp1

    然后安装IIS7.0功能,相关功能如下图:

  • 相关阅读:
    几个小地方
    數組鏈表
    目前比較常用的枚舉
    讀書筆記
    lambda的一個小用法
    單鏈表的實現
    fisher线性判别里的广义瑞丽商
    fisher线性判别里的广义瑞丽商
    pattern recognition and machine learning基本思想1:最大似然估计
    中国机器学习邮件列表
  • 原文地址:https://www.cnblogs.com/yulinlover/p/1911850.html
Copyright © 2011-2022 走看看