windows-server-2008

Extracting columns from text file using PowerShell

▼魔方 西西 提交于 2019-12-09 14:54:32
问题 I have to extract columns from a text file explained in this post: Extracting columns from text file using Perl one-liner: similar to Unix cut but I have to do this also in a Windows Server 2008 which does not have Perl installed. How could I do this using PowerShell? Any ideas or resources? I'm PowerShell noob... 回答1: Try this: Get-Content test.txt | Foreach {($_ -split '\s+',4)[0..2]} And if you want the data in those columns printed on the same line: Get-Content test.txt | Foreach {"$(($_

.NET Ionic.Zip : Compressed or Uncompressed size, or offset exceeds the maximum value

北战南征 提交于 2019-12-09 09:32:20
问题 I have the following set up: Win2008 server Ionic.zip reference module A seperate drive for building the zip files .NET 4.0 The web app builds zip packages, on the fly, and allows the client to download the package. This system has worked wonderfully... until now. Recently we added some larger files (2GB to 11GB) that all need to be wrapped up in a package before downloading to the client. Originally I had this system set up to happen all on the C: (a mistake). Right away, especially with the

IIS 7 Windows Server 2008 / CSS file not loading within aspx

耗尽温柔 提交于 2019-12-09 06:44:54
问题 I've found out several topics related to this issue yet I couldn't find an answer which worked for my problem, which is following: I moved my Asp.Net 4.0 site to a new server (IIS 7, Windows Server 2008). The server side is working fine but the CSS style sheet is not loading. When I use firebug, I see the following on the part where css should be loaded 404 - File or directory not found. The resource you are looking for might have been removed, had its name changed, or is temporarily

MariaDB not allowing remote connections

陌路散爱 提交于 2019-12-09 06:07:36
问题 As the screenshots show, I have the accounts setup to allow remote connections but as shown in the second screenshot I still cannot connect remotely. 回答1: Mysql by default binds to 0.0.0.0 which is all interfaces on your system. Which means you can already connect from another computer. The issue is perhaps permissions. You can enable remote connections by running the following command: GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.%' IDENTIFIED BY '' WITH GRANT OPTION; 回答2: I use for

exit fails to set error code

半城伤御伤魂 提交于 2019-12-08 17:30:20
问题 I have a C++ Windows program that fails to set the exit code. The program is very complex and I'm currently unable to reproduce this with a simple test case. I do know that the program calls exit(1) because I have a breakpoint on that line. Immediately after I step over it, the debugger (VS2010) prints The program program.exe has exited with code 0 (0x0). When I run it from the shell, %ERRORLEVEL% is also set to 0. I use subsystem:console and plain old main (no WinMain). This only happens on

Unable to load DLL 'mqrt.dll'

家住魔仙堡 提交于 2019-12-08 15:20:51
问题 I've developed a WCF Service which is hosted as a Windows Service and exposes a MSMQ endpoint. I have the client app on SERVER1, and the MSMQ and WCF Service on SERVER2. When the SERVER1/ClientApp attempts to push a message on to the SERVER2 MSMQ, I get the following errror: System.TypeInitializationException: The type initializer for 'System.ServiceModel.Channels.Msmq' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'mqrt.dll': The specified module could not be found

Checking if port is open [closed]

折月煮酒 提交于 2019-12-08 08:03:42
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . I want to see if port 1878 is open on my Windows Server 2008 R2. I use VPS server, so i talked with the VPS servers company and asked them to open all ports. When i'm running telnet 172.0.0.1 1878 i get that the port is not reachable. Is there another way to see if the port is open or open it? 回答1: Use may use

python fdb, trying to connect to an external firebird 1.5 super server

纵饮孤独 提交于 2019-12-08 07:42:35
问题 I'm trying to connect to a Firebird 1.5 database that is located on a server, from my local machine with Python fdb libary. but I'm having no luck. the server is windows 2008 server R1 running Firebird 1.5.6 as a service. It also has a System DSN called firebird . How can i connect to it via python? I'm using this code: import fdb db = fdb.connect(host='192.168.40.28', database="C:\databases\database12.GDB", user='admin', password='admin') but it generates this result: Traceback (most recent

System.DirectoryServices.AccountManagement not working on the server

丶灬走出姿态 提交于 2019-12-08 06:16:55
问题 I am using System.DirectoryServices.AccountManagement to find the logged-in user's AD entry. It is working great in the VS2008 WebDev server on developers machines. But when we installed the code on the development server (windows server 2008), we get an access error. Both the developer's machine and the development server are members of the same domain. We have Impersonation turned on, so we are connecting to AD with the same user credentials. What are we missing here? Why is it working on

ASP.NET Chart Control errors in Event Viewer

元气小坏坏 提交于 2019-12-08 05:42:19
问题 I have been using the ASP.NET chart controls for a while on win2k3 (32bit) setups without any issue but have noticed that on our new win2k8 (64bit) box I am getting a warning message showing up in the event viewer from the chart control. In my web.config file I have the following tag telling the Chart Control where I can store the Temp Files: <add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" /> Below is the warning message produced by the control: Event code