纯正绿色版,无任何微软信息
1.修改过程
把WebDev.WebServer40.EXE拖到ILSpy.exe里进行反编译成项目(本人比较支持免费软件) 同样也反编译应用的WebDev.WebHost40成项目 把server里对host的引用删了,重新引用刚反编译的项目。 修改Microsoft.VisualStudio.WebHost.Server里的方法Start(),修改的代码如下:
if (Socket.OSSupportsIPv6) { try { this._socketIpv6 = this.CreateSocketBindAndListen(AddressFamily.InterNetworkV6, IPAddress.IPv6Any, this._port); } catch (SocketException ex) { if (ex.SocketErrorCode == SocketError.AddressAlreadyInUse || !flag) { throw; } } } if (flag) { try { this._socketIpv4 = this.CreateSocketBindAndListen(AddressFamily.InterNetwork, IPAddress.Any, this._port); } catch (SocketException) { if (this._socketIpv6 == null) { throw; } } }
private bool TryParseRequest() { this.Reset(); this.ReadAllHeaders(); //if (!this._connection.IsLocal) //{ // this._connection.WriteErrorAndClose(403); // return false; //} if (this._headerBytes == null || this._endHeadersOffset < 0 || this._headerByteStrings == null || this._headerByteStrings.Count == 0) { this._connection.WriteErrorAndClose(400); return false; }
fixed (SecHandle* lptr = (&this._securityContext)) { IntPtr* ptr = (IntPtr*)lptr; fixed (SecBuffer* lptr2 = (&this._inputBuffer)) { IntPtr* ptr2 = (IntPtr*)lptr2; fixed (SecBuffer* lptr3 = (&this._outputBuffer)) { IntPtr* ptr3 = (IntPtr*)lptr3; fixed (byte* lptr4 = (&array[0])) { IntPtr* ptr4 = (IntPtr*)lptr4; fixed (byte* lptr5 = (&array2[0])) { IntPtr* ptr5 = (IntPtr*)lptr5; IntPtr phContext = IntPtr.Zero; if (this._securityContextAcquired) { phContext = (IntPtr)((void*)ptr); }
lock (this._lockObject) { host = this._host; if (host == null) { //复制当前dll到站点目录 Assembly myAss = Assembly.GetExecutingAssembly(); string assUrl = myAss.Location; if (!File.Exists(this._physicalPath + "\bin\" + myAss.FullName.Split(',')[0] + ".dll")) { if (!Directory.Exists(this._physicalPath + "\bin")) { Directory.CreateDirectory(this._physicalPath + "\bin"); } File.Copy(assUrl, this._physicalPath + "bin\" + myAss.FullName.Split(',')[0]+".dll"); } string text = (this._virtualPath + this._physicalPath).ToLowerInvariant(); string appId = text.GetHashCode().ToString("x", CultureInfo.InvariantCulture); this._host = (Host)this._appManager.CreateObject(appId, typeof(Host), this._virtualPath, this._physicalPath, false); this._host.Configure(this, this._port, this._virtualPath, this._physicalPath, this._requireAuthentication, this._disableDirectoryListing); host = this._host; } }
近来在各种房贷、老婆贷的压力下接了各种私活,各种加班,各种被坑,不过数钱时还是比较爽的~~~当今物价都在上涨,唯独工资不涨,那钱都去了哪里了呢???