At work, we have the UI layer (CSS, HTML, JavaScriptall executes in the browser), middle-tier (ASP.NET MVC and our C# libraryall executes server-side) layer, a service layer (WCF services that the middle-tier calls as-needed), and a DBO layer that WCF services use instances of.
When the middle-tier (e.g. a static .cs class) calls a WCF ...
Hi All,
I want to expose a web method over web services like this,
public bool AddApple(string colour);
The trouble with strings is that you can pass a value of null.
Is there a way to say that that string is non nullable?
For instance in the entity framework the property has an attribute like this,
[EdmScalarPropertyAttribute(Ent...
I want to know about Which language is best for long term career and How?
Which language should I choose among Java and .NET Platform or Should I choose Oracle like DBMS Language (SQL/PLSQL)? I am confused?
Detailed answer would be appreciated.
...
Hi Everyone,
I'm creating a windows desktop application using .NET Framework (Visual Studio '08). As you know, when we build our application all references which we used in our application their dll copied into the Debug/Release folder with an executable file of application. Is it possible when you build only a single executable file pr...
I want a browser to go full screen as soon as my page loads. Is it possible in javascript.
I know the shortcut key for this F11 but requirement is on page load only.
After reading the solution provided below. I achieved full screen but here i got a trap. I was using timer to make my page postback to get fresh data after every 5 second. ...
I'm running a .NET 2.0 executable with a .com extension from a command line and receiving the following error:
System.BadImageFormatException : The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018)
I'm pretty sure it's trying to load a DLL from the .NET 2.0 Global Assembly Cache.
I only get thi...
We are designing a .net web application that has an external and internal site.
Both sites need to encrypt data only the internal site needs to decrypt data.
We are wondering what are the best practices for:
Which encryption method to choose?
Where to store the encryption / decryption key?
...
When a hash table is initialized how is memory is allocated for it? When we add new members to it how does the memory used by the hash table get extended? Does it ever happen that a hash table is not able to store objects after a fixed size?
...
Is there a free, easy and quick tool which can generate class diagrams or maybe even a simple table containing the list of class and methods inside an C# assembly or a project? Basically what I need is just the list of class and methods in a readable format. It would be better if it takes the xml documentation as well, but it's not requi...
Any advice how to fault find to work out why the Grid.Resources styles in this XAML is not making any difference it seems to the end result?
Note I'm using Charting from the WPFToolkit so to adjust how a chart looks it seems one has to apply the style areas (suggested by someone on the forum).
So my question is generically, noting...
Having a look at this code
http://msdn.microsoft.com/en-us/library/ee862406%28VS.85%29.aspx
It says "Add the Microsoft.GroupPolicy.Management assembly to your project" but i cant seem to find out where to get Microsoft.GroupPolicy.Management from.
...
I am having a strange caching problem and I believe it might be related to the fact that I am using a Entity Data Model as my data source.
The problem is that I can update the database directly and it doesn't reflect on the actual site until I republish the project. The data does display properly when viewing the project locally.
The o...
Hello, I have a DB and a mapping framework which was written by the company Im working for. So I have a class for each table in the DB and those classes allow to call the DB and get various information in DataSets or DataTables for example. Now I am supposed to write that information to a TXT file in a certain format (I have the specs ho...
The MSDN page for the DataContext class says:
Represents the main entry point for the LINQ to SQL framework.
Yet it looks like the constructors will take any ADO.NET IDBConnection. Am I right in thinking that a DataContext can wrap any ADO.NET connection? Or are there special things that need to be considered when using a connecti...
Acorrding to the document I just read, global Windows compatibility for .NET Framework 3.5 is 10%:
link
This is not good news for my project where the installer is built in .NET and my application is C++. What are ways to combat this problem without having to require users to install any additional framework manually?
...
When adding a new control to the designer in Winforms, the modifier on the control is set to Friend, but the default modifier is Private (right clicking the property and resetting the modifier).
Does anyone know why?
Is there a setting to set the modifier to default (Private)?
...
The following piece of code
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
OperatingSystem os = Environment.OSVersion;
Console.WriteLine( os.Version.Major.ToString());
Console.ReadLine();
}
}
}
Outputs 6 on both Vista and Win7
Ho...
Hi,
I'm wondering what is the difference for application between those two calls, in means of resulting DateTime object, whether TryParseExact will succeed, and result of ToString operation:
DateTime.TryParseExact(value, "MMM yyyy", DateTimeFormatInfo.InvariantInfo, DateTimeStyles.None, out conversionResult)
DateTime.TryParseExact(val...
I would like to open a PE file (which i know is a .Net assembly) and find where the .Net bytecode is (ideally starting at the entrypoint). I know that the PE header data (entrypoint RVA) take me just to a stub which calls CorExeMain from mscoree.dll.
This is not what i'm looking for though. I would like to find the bytecode that gets ru...
In c# I can use default(T) to get the default value of a type. I need to get the default type at run time from a System.Type. How can I do this?
E.g. Something along the lines of this (which doesn't work)
var type = typeof(int);
var defaultValue = default(type);
...