windows-server-2003

Windows Service or Task Scheduler for maintenance tasks?

I have a C# Application that does some maintenance tasks. It needs to run roughly every hour, although it's not too important if it's a bit off. And it has to run on a Win2003 Server with no one logged in. Basically I wonder if I should write a Windows Service, and if yes, if Thread.Sleep() is a proper way to pause the Thread for an hou...

Error when impersonating a user in .NET in a scheduled task

I have a .NET console app running on Windows Server 2003, as a scheduled task. This uses the Process class to run another little console app, but it uses Process.StartInfo.Username to impersonate a user to run it as. If the account that is impersonated in the scheduled task in an Administrator, then it works perfectly, but if not then ...

Can I change the owner of the file saved through IIS (with ASP.NET)

Is there a way to change owner of saved file using IIS on Windows Server. The easier the better. It doesn't matter either this will have to be done during saving or changing file owner after file is already saved to disc. An example in ASP.NET is highly apriciated. ...

Does the 'Enable Advanced Performance' override FILE_FLAG_WRITETHROUGH on Win 2k3/SQL Server 2005

SQL Server opens files with FILE_FLAG_WRITETHROUGH, which appears to force writes to the physical disk. In SQL Server-speak this is called 'Forced Unit Access (FUA)'; a white paper discussing this can be found here. Many SANs appear to honour this and this might explain slow performance of an ETL process I am developing on a server con...

SocketException on Windows Server 2003

I am trying to get an FTP application up and running on Windows Server 2003, before this application was on windows XP professional running with no problem. I have tried googling around for answers, but the only "workaround" I can seem to find on Microsoft’s website didn’t correct the problem (being edit the registry and add a new field...

Mail() problem in windows server2003

Hi all, I installed PHP in windows server 2003. All the files are working fine except the mail issue. There is no problem in SMTP. Because I run the JSP project in the same server.In that mail function working fine. So where is the problem? And how can i manage? I set the SMTP server in PHP as ; For Win32 only. SMTP = localhost smtp_po...

c# windows service causes entire machine to hang indefinitely/crash

I have a C# 2.0 windows service (100% managed code) and occasionally when it is started/restarted it causes the entire machine (Windows Server 2003) to hang indefinitely. When I click “Start the service” the service control progress bar gets halfway then the machine becomes completely unresponsive at the local terminal and remote deskto...

Giving full trust to a site in a medium trust host

I have admin access to a Windows 2003 server. The trust level is set to medium trust with allowOverride=false. I was wondering if there's a way to add an exception in the configuration files so that one site can run in full trust. By using the location tag? What if the AppPool has an identity in the admin group or the medium trust trum...

MbUnit cannot recognize test assemblies compiled with MSBuild on Windows Server 2003

I've recently installed MbUnit version 2.4.2.355 on our build server which runs via Cruise Control.NET and NAnt, on a Windows Server 2003 machine with .NET Framework 3.5 SP1 installed. I've checked every nook and cranny of the build scripts, and the NAnt output report on CC.NET tells me that the test project builds fine. This is the NA...

Unable to map serial port when using virtual PC 2007 SP1

I'm writing an application that communicates with the serial port to control a device. The development environment is on a virtualized Windows 2003 R2 machine hosted on a Windows Vista machine. When I try to map the COM ports through virtual PC so they can be use in the virtual machine, I get the following error right after the machine...

Figuring out if a server you are connecting to is virtualised?

Is there a way to figure out if a win 2003 server server you are connecting to is virtualised? I tried asking but not 100% sure of the answer is correct. ...

Connecting to a remote server using Visual Studio

I am trying to add a remote server to "server explorer" (not a data connection) so I can view Event Logs, Services etc. I keep getting the following error: "Could not reconnect to 'mail'. Make sure the machine name and path are valid." 'mail.domain.com' is what the IP address I enter resolves to (this is due to the email server being ...

netstat says 443 is open, but I cannot connect to it with telnet .. why ?

I've built a self hosted wcf server, using wsHttpBinding. I'm running win 2003 server R2 SP2 If in configure it to listen on http://localhost:443/MyService, everything works fine. I can connect to http://localhost:443/MyService with Internet Explorer, and I get the standard "Bad Request" message Now, if I try to switch to https, I'm wi...

powershell exchange 2003 : query ActiveDirectory for activesync, office, and description?

I'm using powershell to pull a list of exchange 2003 users and based on the user's mailbox "LegacyDN", I was hoping to use an LDAP query to pull their activesyncenabled property (msExchOmaAdminWirelessEnable), description, and office; however, it doesn't seem to be coming up for me. any ideas? here is how i'm querying for the AD attri...

Access denied when trying to move files with xp_cmdshell

Hi Im trying to use some T-SQL to move some files from one directory to another. Im using xp_cmdshell to call the move command Just like this: create table #output(line varchar(2000) null) insert into #output exec master..xp_cmdshell 'move /y "D:\files\*.txt" "D:\oldfiles"' But the files inst move and the #output table contains this o...

Commerce Server: Custom counters file view is out of memory.

Commerce Server seems to be adding a ton of counters for each catalog/site, and we are currently pushing 45 of them. I tried upping the size in the machine.config which helps, but not enough. Does anyone know how to programmatically clear out the commerce server counters? baring that, disable them? ...

Changing an IIS6 website directory remotely

First, the prior situation: We have this project with a one-click build script. It's cobbled together with TFS Deployer + PowerShell + VB Script. TFS Deployer sits on the production machine, copies the new website files into a brand new directory, and then calls a VB Script that changes the IIS website to the new directory. Now, I'm ...

Setting up internet printing from win2003

who can help me get this up and running. i already installed it through the control panel, add windows component, but i cant access my printers ...

Batch Script to Install or Uninstall a .NET Windows Service

I have no experience writing batch scripts, but I was wondering if there was a way to install a .NET Windows service using installutil.exe using such a script, or uninstall the service if it is already installed, ideally with some kind of confirmation that I actually would like to perform the uninstall (e.g. press y to uninstall). Here ...

What is the root cause of a .NET 3.5 Windows Service having its Number (#) of GC Handles constantly growing?

I have a C# Windows Service running on the .NET Framework 3.5 that is exhibiting a constantly growing number of GC Handles (seen using System Monitor on Windows Server 2003). I have ensured that all resources are disposed of correctly, and have no Finalisers in my code. The 'Large Object Heap size', and '# Bytes in all Heaps' are compa...