i need to retrieve a single cell instead of Excel.Range in my method.
using Excel = Microsoft.Office.Interop.Excel;
...
public object vReadNumber(Excel.Range targetRange)
{
...
Doing Something With targetRange
...
}
any idea?
...
Trying to start process with another access token, without success, it runs as the non-impersonated user.
using (WindowsIdentity identity = new WindowsIdentity(token))
using (identity.Impersonate())
{
Process.Start("blabla.txt");
}
How to make this work properly?
...
I'm writing a Visual Studio add-in and have a 16x16 bitmap resource that I would like to use as the button image for my menu item.
Following these instructions from the MSDN, I renamed the resource 1 and the file 1.bmp, then edited Resources.resx accordingly:
<data name="1" type="System.Resources.ResXFileRef, System.Windows.Forms">
...
I have a HTTPS Java Web Service, I am trying to access the web service with .NET[.NET 2.0 style client / WCF client]. I am getting back this error from WS.
"HTTP Status 401 - This request requires HTTP authentication ()."
How do I find out what kind of security this WS has?
Besides SSL, I have user name and password to send it to WS, ...
I'm having to do some weird things with gcroot, but I get the following error on the dynamic cast line: "cannot use 'dynamic_cast' to convert from 'gcroot' to 'IMyInterface^'. In C#, you could easily cast a generic object to any interface. You may get a runtime error if the object doesn't implement the interface but it would compile.
...
I have a .net app that needs to spawn a console process (a java app) and capture the output in order to respond to it in various ways.
I'm not having much trouble getting the process spawned, and getting most output, but some of it is missing. I am assuming it's somehow not going to "standard output", but I need to find out how to capt...
We have two separate web applications for a site: One for the site itself, and one for the cms/administration side. I'm not sure why the original developer designed it this way, but whatever.
I am tasked with adding some functionality to the administration side that uploads files. These files then need to exist within the folder stru...
Hi all,
I've been a ASP.NET/WCF developer for most of my .NET developer career so I'm very used to the idea of just having all DLLs sitting in the bin folder of the IIS directory.
However, in a recent project we have to share several DLLs (around 50) between a WCF web service and several .exe programs so one of our team member suggeste...
I have a Sharepoint 2010 feature that contains several custom actions in it. I added a Custom Control to the elements xml and a new ascx file in the controltemplates folder. Pretty simple. However, I can see that the ascx file is not inside the bundle file after I package the solution and get the WSP distribution file. The modifications ...
i'm using the BlockingCollection for a Producer Consumer pattern and i got an excecption i think to write a patent on it- only two results in google!
the expection is "CompleteAdding may not be used concurrently with additions to the collection" and it happens when i TryAdd on th BlockingCollection as Follows:
public void EnqueueTask(T...
We are using Visual Studio 2008 and .Net 3.5. we can build our C# projects in build machine by using MSBuild from SDK because we don't have visual studio installed on the build machine.
Now we are trying to build the Setup project with similar settings. It looks like the MSBuild doesn't like .vDProj. any idea how can we do that?
thanks...
I have a form class called MDIParent that has IsMdiContainer = true.
The form load handler enumerates this.Controls to find the MdiClient container window and assign it to the clientWindow class variable. The handler also disables the AutoScroll property in an attempt to preserve the scroll bars once I manually update them with this cod...
I'm using following DropDownList event to select an employee from MS SQL Server 2005 and showing the employee's information on TextBox.
protected void employeeDropDownList_SelectedIndexChanged(object sender,
EventArgs e)
{
EmployeeDAL employeeDAL = new EmployeeDAL();
...
I have the following classes that I need NHibernate to play nicely with. How do I do it?
public class Customer
{
public int ID { get; set; }
public string Name {get;set;}
}
public class Product
{
public int ID { get; set; }
public string Name {get;set;}
}
public class CustomerPricing
{
public int ID { get; set; }
pub...
the cases are listed below;
82&?
82,9
abse82,9>dpkg
After Regex
82
82,9
82,9
Please help me to do it on c# with using Regex
...
Typically a dynamic linq query with string can use a substitution value such as:
result =
db.Persons.Where("Name == @1", "John");
I have an unknown number of strings that I want to pass into the Where clause. I have no problem with integers, but the API cannot seem to handle a string without a substitution value.
Does anyone kno...
I am struggling trying to pick apart the OAuth Service Provider example which is included in DotNetOpenAuth. I searched SO and found a few similar/related posts, but nothing really useful. Is there any open-source project or really simple/primitive example of an ASP.NET MVC 2 OAuth Service Provider? All I want to use OAuth for is auth...
I have a generic class which could use a generic OrderBy argument
the class is as follows
class abc<T> where T : myType
{
public abc(....., orderBy_Argument ){ ... }
void someMethod(arg1, arg2, bool afterSort = false)
{
IEnumerable<myType> res ;
if ( afterSort && orderBy_Argument != null )
res = src.E...
I'm trying to automate assembly generation from netmodules.
I tried to use "al.exe" tool with this commande line : al module1.netmodule module2.netmodule /target:library /out:assembly.dll.
My problem is that my assembly does not embed my netmodules but only references them :
- if I open my assembly with "ildasm.exe" tool, I can only see...
I am using System.Threading.Timer in my Windows service and locking the callback method using Monitor.TryEnter, so it's non-reentrant. Inside the callback, I am looping over some database objects (Linq to SQL entities) and performing some IO tasks. On each iteration of the loop, I am changing some properties of entity to flag it as proce...