如题,就是想用asp.net程序来设定网站的asp.net版本,因为默认为1.1,想改成2.0的。我的运行环境是win2003 server+VS2005。
目地简单,就是为了实现以下帖子中的效果。
http://community.csdn.net/Expert/topic/5728/5728241.xml?temp=4.249209E-02

解决方案 »

  1.   

    用installshield来制作安装包不行么?
      

  2.   


    我想问下如果你这个程序没有在这个版本里就不能运行,那如何用asp.net程序来设定网站的asp.net版本,都不能运行怎么设定,不符合逻辑,除非另外弄个小程序设定
      

  3.   

    @sendling(心随我动)谢谢您回贴,请您看看
    http://community.csdn.net/Expert/topic/5728/5728241.xml?temp=4.249209E-02
    就知道我的用意了。我也是没有办法的办法
      

  4.   

    try ->// using System.Diagnostics;// targetSite: 网站
    // targetVDir: 虚拟目录
     void RegisterScriptMaps(string targetSite, string targetVDir)
            {
                // Calculate Windows path
                string sysRoot = System.Environment.GetEnvironmentVariable("SystemRoot");            // Launch aspnet_regiis.exe utility to configure mappings
                ProcessStartInfo info = new ProcessStartInfo();
                info.FileName = Path.Combine(sysRoot, @"Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe");
                info.Arguments = string.Format("-s {0}/ROOT/{1}", targetSite, targetVDir);
                info.CreateNoWindow = true;
                info.UseShellExecute = false;            Process.Start(info);
            }
      

  5.   

    In additional,u would extract the 'v2.0.50727' as a parameter for speficied version.
      

  6.   

    @Jinglecat您的意思是调用aspnet_regiis.exe来注册一下那个网站,这样那个网站就成了2.0的了??
      

  7.   

    In additional,u would extract the 'v2.0.50727' as a parameter for speficied version.
    =======================================
    您的意思还要看看具体的版本是吧??
      

  8.   

    这帖子一下结,但是,那是在我解决了问题后,各位也一定会得到分的。谢谢,各位了,也希望更多的朋友,给我帮助,特别谢谢Jinglecat(晓风残月 >> 问题需简洁,错误要详细,需求得明确) (
      

  9.   

    我整理了一个文章LZ看看吧
    http://blog.csdn.net/octverve/archive/2007/08/26/1759529.aspx
    希望对你有用
      

  10.   

    你自己去参考吧,太难了,我也还没有看懂
    http://blog.csdn.net/net_lover/archive/2007/08/26/1759880.aspx利用C#创建 IIS 站点并设置.NET Framework版本为ASP.NET 2.0 的方法(二) http://blog.csdn.net/net_lover/archive/2007/08/26/1759877.aspx利用C#创建 IIS 站点并设置.NET Framework版本为ASP.NET 2.0 的方法(一)
      

  11.   

    ldap或wmi均可以做到
    实际是你的msdn上就有现成的例子,请详细查看你的msdn的iis编程相关章节
    http://msdn2.microsoft.com/en-us/library/ms525041.aspx
    http://msdn2.microsoft.com/en-us/library/ms525791.aspx