Is it possible to delete a private message queue that was created by the service user? During uninstallation, we would like to clean up any message queues created by our application. For security purposes, access to these queues has been restricted to the current user (ServiceUser). During uninstall, we have admin privileges, but still get an…
I'm interested in any common routine/procedures/methods that you might use in you Program.cs when creating a .NET project. For instance I commonly use the following code in my desktop applications to allow easy upgrades, single instance execution and friendly and simple reporting of uncaught system application errors.
using System;
using…
Hi,
I would like to test the validation of submitted DTO. This is the bare bone of a controller create action:
[AcceptVerbs(HttpVerbs.Post)]
public RedirectToRouteResult Create(SomeDTO SomeDTO)
{
SomeObject SomeObject = null;
try
{
SomeObject =…
I am working on a Java project for class and have not worked much with incorporating databases into Java. I can't find much on the initializeDB() method, but if I could get some help I would really appreciate it.
Below is the code being used for the intializeDB() method:
private void…
I am trying to delete a folder in sdcard.
I can delete normal directories, but a directory that starts with period cannot be deleted.
(ex. ".helloDir")
if (dir.isDirectory()) {
String[] children = dir.list();
for (int i = 0; i < children.length; i++) {
…
Hi there,
I'm trying to make a program which listens to the client input stream by using socket programming and timer
but whenever timer executes..
it gets hanged
Please help me out
here is the code...
private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {
//…
how can i conver result set to list? i am using following code but its not working properly
private List<User> convertToList(ResultSet rs) {
List<User> userList = new ArrayList();
User user = new User();
try {
while (rs.next()) {
…
In my understanding a singleton object will destroy only when the application is about to terminate. So in C++ I write a Singleton class to log my application and in that Singleton logger's destructor I log the time when my application was terminated. Things worked perfectly in C++.
…
Maybe I am crazy but how that could be? some == null is always false but debugger goes into if-statement body anyway. Any ideas?
I have restarted visual studio
I have cleaned every bin/obj folder
It is not the case that i don`t understand that WindowsIdentity.GetCurrent() may…
I have a project that need to be deployed into multiple environments (prod, test, dev). The main differences mainly consist in configuration properties/files.
My idea was to use profiles and overlays to copy/configure the specialized output. But I'm stuck into if I have to…
Hi guys,
I am learning Windows Forms in C#.NET 2008 and i want to build a class to work with SIMPLE xml files (config file like INI files), but i just need a simple class (open, getvalue, setvalue, creategroup, save and close functions), to substitute of ini files.
I…
When I add the first item in the datagridview its ok but when i add the second one it replace the last item being added.
here's my code
Private Sub add()
Dim i As Integer
For i = 0 To DataGridView1.Rows.Count - 1
'DataGridView1.Rows.Add()
…
I'm supporting an old vb.net program whose database it connected to was moved from SQL Server 2005 to SQL Server 2008. Is there a setting on SQL Server 2008 which will allow ODBC connections to access the database but not allow VB.NET to connect to it…
I have this peice of code in my handler.js, I'm getting the correct serverData value throught ajax, ( Well it's echoed correctly un the alert box) but no matter what, i just cant seem to enter either of the 'if' blocks. I have double checked the type…
Hello. Received data in my C# application is getting lost due to the collector array being over-written, rather than appended.
private void serialPort1_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
try
{
…
i want a feature look like an browser
I need a feature in c# WPF
ex:- when user press enter after typing in textbox the button'click event is automatically fired
Now I use the following code:
Public Function SetACL(ByVal filename As String, ByVal account As String, ByVal sender As Object, ByVal e As System.EventArgs) As Boolean
Try
Dim rule As FileSystemAccessRule = New…
I want to show an image as it is downloading, I have the URL, and I am trying to get the image parts like this:
InputStream openStream = url.openStream();
DataInputStream dis = new DataInputStream(new…
I am working on Entity frame work, i have created a method which is returning List of my Table,
I am retrieving data on base of grpID(which is foreign key, so i can have multiple records)
I have saved these…