GVKun编程网logo

如何在Windows 8和Windows Server 2012上使用WiX刻录安装.NET Framework 3.5?(刻录的系统怎么安装)

1

本篇文章给大家谈谈如何在Windows8和WindowsServer2012上使用WiX刻录安装.NETFramework3.5?,以及刻录的系统怎么安装的知识点,同时本文还将给你拓展.net-3.5

本篇文章给大家谈谈如何在Windows 8和Windows Server 2012上使用WiX刻录安装.NET Framework 3.5?,以及刻录的系统怎么安装的知识点,同时本文还将给你拓展.net-3.5 – 在没有DVD的Windows Server 2012上安装Net 3.5 Framework、Net 4.5 WebSocket 在 Windows 7, Windows 8 and Server 2012上的比较、Net 4.5 WebSocket 在 Windows 7, Windows 8 and Server 2012上的比较以及问题、Windows Server 2008 R2上的.NET Framework 4 RTM等相关知识,希望对各位有所帮助,不要忘了收藏本站喔。

本文目录一览:

如何在Windows 8和Windows Server 2012上使用WiX刻录安装.NET Framework 3.5?(刻录的系统怎么安装)

如何在Windows 8和Windows Server 2012上使用WiX刻录安装.NET Framework 3.5?(刻录的系统怎么安装)

WiX手册包括“ 如何:使用刻录安装.NET Framework ”。 但是,这些说明似乎不适用于在Windows 8,Windows Server 2012和更高版本的操作系统上安装.NET Framework 3.5。 看到这个StackOverflow问题 ,尤其是这个wix用户邮件列表的讨论细节。 Microsoft .NET Framework 3.5 Service Pack 1(完整软件包)安装程序将无法运行,因为您需要使用部署映像服务和pipe理(disM.exe)或其他一些技术来将请求的框架作为Windowsfunction启用。 build议的命令行如下,假定Windows安装在默认位置:

C:Windowssystem32dism.exe /online /norestart /enable-feature /featurename:netfx3

有没有一个干净的方法来确保.NET Framework 3.5将被安装在Windows 8和Windows Server 2012上的WiX? 在安装链中包含这样一个步骤是否有很好的方法?

文件夹更衣室在C#

静态string使用File.ReadAllText

如何查看networking连接是否改变状态?

在我的新窗口安装Image.FromStream不以相同的方式工作

解决Excel的path

这是我所能想到的最好的。 我已经添加了一个片段,可以在Windows 8和Windows server 2012之前为操作系统安装.NET Framework 3.5.请注意,这需要NetFxExtension对NETFRAMEWORK35_SP_LEVEL定义的引用。

<?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"> <Fragment> <util:RegistrySearchRef Id="NETFRAMEWORK35_SP_LEVEL"/> <PackageGroup Id="NetFx35Redist"> <ExePackage SourceFile="{a path on my network}MicrosoftDotNetFx3.5dotnetfx35.exe" displayName="Microsoft .NET Framework 3.5 Full" InstallCondition="VersionNT &lt; v6.1" InstallCommand="/q /norestart" RepairCommand="/q /norestart /f" UninstallCommand="/q /norestart /uninstall" PerMachine="yes" DetectCondition="NETFRAMEWORK35_SP_LEVEL &gt;= 1" Id="dotnetfx35.exe" Vital="yes" Permanent="yes" Protocol="none" Compressed="yes" Name="redistdotnetfx35.exe"> <!-- Exit codes 0 = Successful installation. 3010 = Successful installation; however,a system reboot is required. --> <ExitCode Value="0" Behavior="success" /> <ExitCode Value="3010" Behavior="forceReboot" /> <ExitCode Behavior="error"/> </ExePackage> </PackageGroup> </Fragment> </Wix>

在我的托管引导程序代码中,我在应用阶段开始时处理Windows 8 / Windows server 2012:

model.Bootstrapper.ApplyBegin += this.ApplyBegin; ... private void ApplyBegin(object sender,ApplyBeginEventArgs e) { this.EnsureNetFramework35(); }

调用dism.exe来启用.NET Framework 3.5的方法如下所示。 一些类似Progressviewmodel的代码引用类不会在每个托管引导程序实现中,但是我希望这可以为实现自己的版本提供一个有用的起点。

/// <summary> /// Make sure we have the .NET Framework 3.5 when we're on Windows 8,Windows server 2012,or later. /// </summary> private void EnsureNetFramework35() { // Don't worry if we're on an older OS. We don't need disM.exe in that case. if (Environment.Osversion.Version < new Version(6,1) && this.root.Model.Engine.NumericVariables.Contains("NETFRAMEWORK35_SP_LEVEL")) { return; } // Don't worry if .NET Framework 3.5 is already installed. if (this.root.Model.Engine.NumericVariables.Contains("NETFRAMEWORK35_SP_LEVEL") && this.root.Model.Engine.NumericVariables["NETFRAMEWORK35_SP_LEVEL"] >= 1) { return; } // Enable .NET Framework 3.5. this.root.Model.Engine.Log(LogLevel.Standard,"Enabling .NET Framework 3.5."); this.root.Progressviewmodel.Message = "Enabling .NET Framework 3.5."; // Get the path to disM.exe. string windowsPath = Environment.GetFolderPath(Environment.SpecialFolder.Windows); string systemPath = Path.Combine(windowsPath,"System32"); if (Environment.Is64BitOperatingSystem && !Environment.Is64BitProcess) { // For 32-bit processes on 64-bit systems,%windir%system32 folder // can only be accessed by specifying %windir%sysnative folder. systemPath = Path.Combine(windowsPath,"SysNative"); } string dismPath = Path.Combine(systemPath,@"dism.exe"); string arguments = "/online /enable-feature:NetFx3 /quiet /norestart"; if (!File.Exists(dismPath)) { this.root.Model.Engine.Log(LogLevel.Error,"Could not find file: " + dismPath); return; } this.root.Model.Engine.Log(LogLevel.Standard,dismPath + " " + arguments); this.root.Progressviewmodel.DetailMessage = dismPath + " " + arguments; Process process = new Process(); process.StartInfo.FileName = dismPath; process.StartInfo.Arguments = arguments; process.StartInfo.UseShellExecute = false; process.StartInfo.CreateNowindow = true; process.StartInfo.RedirectStandardOutput = true; process.StartInfo.RedirectStandardError = true; process.Start(); process.WaitForExit(); // Check to see if we encountered any errors. if (process.ExitCode == 0) { this.root.Model.Engine.Log(LogLevel.Standard,".NET Framework 3.5 enabled."); this.root.Progressviewmodel.Message = ".NET Framework 3.5 enabled."; this.root.Progressviewmodel.DetailMessage = string.Empty; } else { this.root.Model.Engine.Log(LogLevel.Error,".NET Framework 3.5 Could not be enabled. Exit code: " + process.ExitCode); this.root.Progressviewmodel.Message = ".NET Framework 3.5 Could not be enabled."; this.root.Progressviewmodel.DetailMessage = string.Empty; } }

这个如何使用wix bootsrapper安装网点http://wixtoolset.org/documentation/manual/v3/howtos/redistributables_and_install_checks/install_dotnet.html

.net-3.5 – 在没有DVD的Windows Server 2012上安装Net 3.5 Framework

.net-3.5 – 在没有DVD的Windows Server 2012上安装Net 3.5 Framework

我试图在 Windows Server 2012上启用Net 3.5 Framework.但是,我在Internet上找到的所有说明都说我必须拥有Windows Server 2012的DVD.

http://en.community.dell.com/techcenter/os-applications/w/wiki/4146.installing-net-3-5-framework-on-microsoft-windows-server-2012.aspx

由于我没有DVD,我一直在搜索在哪里下载此功能.

提前致谢

要在没有磁盘(或磁盘映像)的情况下在服务器2012上安装.net 3.5:

>确保服务器没有看到WSUS服务器进行更新(必须查看Windows Update才能使其正常工作)
>确保任何代理/防火墙将允许从有问题的服务器到Windows更新服务的连接
>从命令行运行:

dism.exe /online /enable-feature /featurename:NetFX3 /all

源切换的消除是有目的的完成的,因为这将强制服务器在自己的SxS文件夹中查找,而不是找到所需的文件,然后转到Windows Update的文件(因此第1步,它不指向WSUS服务器).

Net 4.5 WebSocket 在 Windows 7, Windows 8 and Server 2012上的比较

Net 4.5 WebSocket 在 Windows 7, Windows 8 and Server 2012上的比较

.Net 4.5 WebSocket Server Running on Windows 7?

Net 4.5 WebSocket Server 可以运行在 Windows 7,但是Net 4.5的 ClientWebSocket 不支持 Windows 7,只支持 Windows 8 and Server 2012,但是可以使用第三方类库来支持Net 4.5 WebSocket 在win7,Windows 7上使用,如:

  • https://github.com/statianzo/Fleck
  • http://vtortola.github.io/WebSocketListener/
  • http://superwebsocket.codeplex.com/
  • https://archive.codeplex.com/?p=websocket4net
 
下面 来自   .Net 4.5 WebSocket Server Running on Windows 7?的相关讨论,
原文  https://stackoverflow.com/questions/12073455/net-4-5-websocket-server-running-on-windows-7
 

I know the ClientWebSocket class of .Net 4.5 is not supported on Windows 7, but is it possible to create a WebSocket server running on Windows 7 using the .Net 4.5 API?

To make myself clearer, according to both here and here, it looks like the server side part of the .Net 4.5 WebSocket implementation should be supported even on Windows 7, yet running a HttpListener and trying to access it using an open-source WebSocket implementation got me a "Portocol not supported" error

  •  
    While it is an interesting question, it doesn''t show much effort. What have you tried? According to MSDN indeed only Windows 8 and Server 2012 are supported. Do you require .NET built-in support? Otherwise there are various third-party libraries that suit your requirements. – CodeCaster Aug 22 ''12 at 12:54
2 Answers
 
 
up vote 34down voteaccepted

The OS-level HTTP.SYS support for websockets is limited to Win8 / Windows Server 2012 - which I agree is silly (it should be part of a windows-update, or a service-pack at most, IMO).

This means that you can''t use the framework support for WebSockets from HttpListener or ASP.NET directly.

But: as for "is it possible to create a WebSocket server" - sure... but only if you handle the TCP/IP comms yourself, or use a 3rd-party library for the same. This is a little annoying, but is not as bad as it might sound.

Edit: after some checking, I can confirm that the server-side components for this do not work on Windows 7 (etc); the IsWebSocketRequest returns false even though it is a web-socket request with Connection: Upgrade and Upgrade: websocket (etc) headers (from a Chrome session, as it helps).

I am, however, very surprised to find that the client-side pieces don''t work, because: that is simpler and doesn''t (or at least, doesn''t need to) involve HTTP.SYS. Trying to use them throws a PlatformNotSupportedException.

  
answered
  • 1
    @sternr I don''t think they are; I think it''ll error at runtime. What is even more interesting: I was under the impression that ClientWebSocket was supported on Win7 etc, since it doesn''t depend on HTTP.SYS! – Marc Gravell Aug 22 ''12 at 13:18
  • 1
    @sternr did some more research / testing on that; answer stands. – Marc Gravell Aug 22 ''12 at 13:49
  • 7
    @sternr it is bizarre from my point of view too. I''m very disappointed by this, especially the client-side pieces. Meh, no actually I''m disappointed by the server-side pieces too. – Marc Gravell Aug 22 ''12 at 13:52
  • 2
    Both the client-side and the server-side pieces depend on an OS-level component (websocket.dll), and this component only ships with Windows 8 / Server 2012. I am unsure of why this component cannot run downlevel, but the dependency explains the behavior you are seeing. – Levi Aug 24 ''12 at 6:13
  • 4
    Yeah, honestly, who thinks this is really a technical issue. – Craig Dec 3 ''13 at 1:58
 
up vote 6down vote

As Marc says, the Microsoft APIs do not work on Windows 7. However there are several open source libraries that support WebSockets on Windows 7, and in some cases even cross platform via Mono.

  • https://github.com/statianzo/Fleck
  • http://vtortola.github.io/WebSocketListener/
  • http://superwebsocket.codeplex.com/

Net 4.5 WebSocket 在 Windows 7, Windows 8 and Server 2012上的比较以及问题

Net 4.5 WebSocket 在 Windows 7, Windows 8 and Server 2012上的比较以及问题

Net 4.5 WebSocketWindows 8, Windows 10, Windows Server 2012可以,但是在Windows 7, 就会报错。

错误1、“一个文件正在被访问,当前无法使用该文件

错误2、“参数无效

错误3、throws a PlatformNotSupportedException.

 

解决方法:

Net 4.5 WebSocket Server 可以运行在 Windows 7,但是Net 4.5的 ClientWebSocket 不支持 Windows 7,

只支持 Windows 8 and Server 2012,

但是可以使用第三方类库来支持Net 4.5 WebSocket 在win7,Windows 7上使用,

具体参考如下:

  • https://github.com/statianzo/Fleck
  • http://vtortola.github.io/WebSocketListener/
  • http://superwebsocket.codeplex.com/
  • https://archive.codeplex.com/?p=websocket4net

Windows Server 2008 R2上的.NET Framework 4 RTM

Windows Server 2008 R2上的.NET Framework 4 RTM

我刚刚在 Windows SErver 2008 R2 x64上安装了.NET 4,并且我使用ASP.NET MVC应用程序获得了500内部服务器错误,该应用程序以前在3.5上运行正常.该应用程序已从目标3.5升级到目标4,我个人今天在我的开发机器上构建它(在VS中更改 – 属性到.NET Framework 4).

在服务器上,我通过Web Platform Installer自动安装了.NET Framework 4 Client profile和Full. ASP.NET MVC 2也通过Platform Installer安装.我在IIS中创建了一个新的.NET 4应用程序池,并将Web应用程序放入其中.

此外,我在web.config中关闭了自定义错误,但即使这样也没有显示详细错误 – 只是普通的IIS 7.5 500内部服务器错误.

有什么建议?

解决方法

嗯,这是一个非常奇怪和有趣的问题..但我渴望尽可能多地提供帮助.
我目前使用Server 2008 R2获得了VPS,并且我已经安装了.NET 4 RTM和MVC 2.不要以为我遇到了配置问题,但我不得不帮助设置其他人.

最初,您可以检查..在您的IIS管理器,Isapi和Cgi限制,你有.NET 4吗?哪个版本?他们启用了吗?

如果您转到IIS中的应用程序池,您的应用程序池是否已服务于.NET 4,即新版本?仔细检查一下,您的应用程序池可能被设置为.NET 4框架的不同版本,此后已被删除/禁用.您可以尝试使用新的干净应用程序池创建一个新网站,以测试它是否有效.

如果还没有任何工作,您可以尝试使用aspnet_regiis -i在IIS中重新注册.NET

如果这些都不起作用,我会尝试回来提供更多选项/想法

关于如何在Windows 8和Windows Server 2012上使用WiX刻录安装.NET Framework 3.5?刻录的系统怎么安装的介绍现已完结,谢谢您的耐心阅读,如果想了解更多关于.net-3.5 – 在没有DVD的Windows Server 2012上安装Net 3.5 Framework、Net 4.5 WebSocket 在 Windows 7, Windows 8 and Server 2012上的比较、Net 4.5 WebSocket 在 Windows 7, Windows 8 and Server 2012上的比较以及问题、Windows Server 2008 R2上的.NET Framework 4 RTM的相关知识,请在本站寻找。

本文标签: