Hi to all.
I'm developing a ASP.NET MVC 2 web application. So far, I managed to define access rules for every controller function, using "RequiresRole" attribute.
Suddenly, this way of defining access rules stopped working (now every user can invoke any of the controller methods). :S. I tried debugging, and it seems that user-roles are...
I've noticed in Visual C# 2010, whenever you change the target framework version away from the default 4.0 client profile (and even if you change it back afterwards), the IDE creates a. config file that it clearly thinks ought to be shipped with the program. The .config file basically just says what the supported/target framework version...
I'm creating an error list control similar to the in Visual Studio. Each error is represented by a class with three values: type (enum: Error/Warning/Message), text (string) and time (DateTime). The class has also two more read only getters: TimeString (returns time as HH:MM) and Icon (returns icon path based on type).
I have an ItemsCo...
I am well aware of how to convert BGR to RBG "manually" using Bitmap.SetPixel or unsafe code, but is there a .NET function which directly allows me to create a Bitmap from BGR data or to convert an BGR Bitmap to an RGB Bitmap?
The scope of this question is, that I want to display image data in a user interface. But creating the Bitmap f...
The Problem:
NpgsqlCommand.Text: INSERT INTO mytable (id, name) VALUES (:id, :name)
Parameter 1: name=id, value=42
Parameter 2: name=name, value="whatever"
command.ExecuteScalar() does not fail, but there is no new row. No duplicate id either.
The Code:
using (var command = connection.CreateCommand()) {
command.Transaction = t...
I'm developing C++.net 2.0 under Win7 with VS2008. I am working with several layers of UserControls.
I have a DLL Names "MyControls.dll" that contains a control, derived from a control in "BaseControls.dll".
Every time I attempt to load any controls in MyControls that derive from BaseControls, the designer breaks with the error:
Cou...
Is there a tool that converts .NET 4.0 assemblies to Silverlight assemblies (with assembly mapping configuration)?
...
Hello
I have a Win Mobile 6.0 .NET CF application that uses a reference to a WebService in order to call web methods on it. In normal situations where the device is in WLAN coverage, the web methods can be executed synchronously by the device. The issue is when the device goes off-line (no WIFI or GPRS coverage). I want that the applic...
Sorry folks, my search fu was low when looking for a version of this question. It's asked and answered here:
http://stackoverflow.com/questions/3004210/app-config-transformation-for-visual-studio-2010
Basically, the question above. The new config transformations that are provided for a web.config file for different environments are re...
I was looking at Microsoft for a setup package for .NET 1.0 that includes SP3, so I don't have to install the framework first and then the service pack. But I didn't find any. Then I looked for the newer versions of the .NET framework and noticed that service packs are always an extra download/setup.
It seems there is no full setup incl...
Hi guys,
I get the following error after moving aspx page to some folder.
Error: Unhandled Error in Silverlight Application
Code: 2104
Category: InitializeError
Message: Could not download the Silverlight application. Check web server settings
Environment: Win7 x64, VS2010, SL 4.0.50524.0, IE8, IIS7.5
Steps to reprod...
Is there any way of identifying (at run time) if my application is running in partial-trust mode or not? I'm considering deploying two versions of my ClickOnce application - one full trust and the other partial trust and there are some things I want to do differently depending on the deployment mode (such as caching downloaded images on ...
Question: I want to define a global exception handler for unhandled exceptions in my console application. In asp.net, one can define one in global.asax, and in windows applications /services, on can define as below
AppDomain currentDomain = AppDomain.CurrentDomain;
currentDomain.UnhandledException += new UnhandledExceptionEventHandler(M...
I'm using Visual Studio 2010 Ultimate. I have a C# WCF service application I want to target for Windows 2008 R2 Server Core. In the assembly framework dropdown, I see .NET 3.5, .NET 4.0 and the respective client profiles, but no profile listed for .NET 3.5 Server Core. Likewise, on the setup project launch conditions, there is no .NET 3....
One simple way to add some configuration is to define a configuration section which is not much more than some object that can be (de)serialized based on the XmlSerializer classes.
Now, XAML is at its heart more or less a hierarchy of objects but provides things like naming of elements, binding, etc.
Has anyone ever used XAML outside i...
I have a .net service that runs an HTTPListener on port 8080.
In this scenario, we are running a client on the same machine as the server, connecting at localhost:8080.
On our demo machine (great!), when the internet is not connected, all connections to the server fail.
I do have two errors in my logs:
The I/O operation has been abor...
I would like to use the WPF and Silverlight toolkit's TreeView control, but have it be in the same xaml file that I share between 2 projects as a link. In silverlight, the class is in the System.Windows.Controls.dll and in WPF it is in PresentationFramework.dll. So for my xaml namespace, they need to be declared differently which cause...
Hello, I have a windows service that runs 24x7 and the memory usage climbs steadily and about once a week we have to restart it.
I'm looking for information on understanding memory usage in .NET so that I may get a clear understanding of why our service is doing this.
I'd also like to gain a better understanding of this in .NET going f...
I m giving a string that contains several different combination of data.
For example :
string data = "(age=20&gender=male) or (city=newyork)"
string data1 = "(job=engineer&gender=female)"
string data2 = "(foo =1 or foo = 2) & (bar =1)"
I need to parse this string and create structure out of it and i have to evaluate this to a condi...
I'm trying to understand and implement the sample presented in this MSDN forum thread.
The sample involves implementing a global hook to catch mouse movement and click events, and act on them under certain circumstances.
I know C# pretty well, but I don't know C++ enough to understand what this sample code is doing. The contributor of ...