We have a .NET application running in production for over a year. It is a background service and the way it is written is that if it crashes for whatever reason it will be automatically restarted. Till recently it did not give us any headaches despite a heavy load it handles daily, but now every once in a blue moon it crashes with OutOfM...
Is it possible to check if an account has "Logon as service" right programatically. I know how to setup and check this manually but I would like to check it from C# code.
I need to check if this right is enabled on domain level, not just on that particular server.
Edit: I am looking to find out if user "Logon on as a service" is define...
In ant scripts and MS build files you can set properties at the top how do I do this in the CruiseControl file ccnet.config?
...
I work for a company which is developing a media asset management website. We've decided to modify our web app to host our media on the cloud. We will license this web application to our customers and allow them to choose whatever cloud service they want. Currently we are using Amazon S3 and I manually upload the files using cloudberry. ...
What is most efficient way (code example) to do an XSL transformation on a DataSet in .NET 2.0?
...
Let's say I have a class like the following:
public class Test{
private RemoteDoc.Documentation docService = new RemoteDoc.Documentation();
public Test(){}
}
So this makes it difficult to unit test because there is a dependency on the proxy class. You can pass in the object via the constructor like so:
public class Te...
Okay, I'm accessing the fields of a data row inside a data set using indexers, but let's consider this as just a syntactical feature. Would you go so far and call it a duck typed thing that is reduced to getters and setters, in other words a data transfer object?
...
Hi
I want to have some viewData info across all my views so I am following this tutorial
http://www.asp.net/LEARN/mvc/tutorial-13-cs.aspx
So I made my own applicationController but I need to get the UserName from the user.
Yet when I do this "HttpContext.User.Identity.Name" in the constructor it is always null. I am not sure why thou...
I'm having trouble using properties in a WCF service. I can define a property in the interface as:
[ServiceContract(Namespace = "http://some-url.com/")]
interface ISomeInterface
{
[OperationContract]
int SomeMethod(string someArg);
int SomeProperty
{
[OperationContract]
get;
}
}
But when consumed by a client, the pr...
Does anyone know of a good piece of C# code or assembly that supports the following:
Find the 1st Tuesday of June 2012
Find the last Friday of March 2008
Find every Saturday in January 2013
Find the 3rd Friday in July 2009
Find every Saturday over the next 3 months
Find every day in March 2018
The results should come back as...
Having the next .net code, I want to stop it correctly so that the jvm executes it's ShutdownHooks.
System.Diagnostics.Process p = new Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
p.StartInfo.Worki...
I am making my own base controller since I want to pass some data to a master page. Now since this is like adding this code to every view in that controller it gets run every time.
By the time it loads up the first time I think it has hit my code at least twice. So I was thinking about caching it. But in my book it says don't cache priv...
I'm trying to avoid creating the same properties in all ActiveRecord classes, so I am coding this:
Have a base class where I have my common properties: Id, Version, LastUpdate, etc...
public class IdentityBase<T> : ActiveRecordValidationBase<T> where T : class
Then my "child" class would have his own properties and should inherit fro...
Creates a webbrowser in a background thread, then is supposed to navigate to a url and return a htmldocument, but the navigate fails for some reason, any idea why?
NOTE: this is part of a class where you see ME.url or me. ...
me.isrunning = boolean false by default
me.url = uri of location to navigate to
Public Function GetDOC(ByVal ...
I have a stylistic question about the choice of background thread implementation I should use on a windows form app. Currently I have a BackgroundWorker on a form that has an infinite (while(true)) loop. In this loop I use WaitHandle.WaitAny to keep the thread snoozing until something of interest happens. One of the event handles I wait ...
Versions
Excel 2007, Windows Vista, VB.NET, Visual Studio 2008 with .NET 3.5 sp2, MSI setup package.
What I am trying to do
I have an Excel UDF that is written in VB.NET. It is exposed as a COM Server because you cannot create Excel UDFs in .NET languages directly. Installation is a real pain because none of the installation settings ...
Hi guys
Just wondering if anyone knows whether its possible to gzip results before putting the data in the cache...Note I am wanting to use a CompressAttribute I have and the built-in OutputCacheAttribute. I'm pretty sure its possible, because I have heard Jeff A. talking about it on a couple of podcasts...
I know I can sort of change...
In .NET, pretty much all collections have the .Count property.
Sometimes I wonder if it would be better to have it on Array as well, directly though, not through ICollection.
It's just something you make an exception in your mind only for arrays.
So is it better to be "more correct" or "more uniform" in this case?
...
I have some types that I want to serialize/deserialize and generate a UI based on the selected object. The UI will also change the object which in turn I will have to serialize to store it in my app.
So:
[obj_apple stored in the app] -> select obj_apple -> deserialize -> show in UI -> use the UI to change obj_apple -> deselect obj_appl...
We have a financial product that has built in scheduling capabilities to run over night batches. This product can also use web services to kick off each batch as required.
I want to know if it is possible to call the web services from a .bat file or another type of batch/script file. If this is possible then we can call the batch file ...