Hey i have an mvc app that i have published in my azure server. I get an error when i try it in the server. In localhost in works fine. But in the server i get an error that looks like this So my question is how can i remove that custom error. I want
I have classes A and B as follows: public class A { private List<B> myList; public List<B> MyList { get { return myList; } set { myList = value; } } private bool allComplete; public bool AllComplete { get { return allComplete; } set { allCompl
What dotnet target .NET Platform Generations would the Mono and Xamarin iOS & Android runtimes support? This chart is currently missing them and needs some help to complete it: The post has since been updated to include xamarin and mono. https://gith
If I serialise an object to Json with new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.All } then the Json includes the type names. E.g. { "$type": "MyDomain.Customers.SubscribedToNewsletter, MyDomain", "Newsletter
I want to create a WinForms application. However, the application I want to run it with only supports Iron Python scripts. Is there a way I can create the form in C#, and then call that exe from Iron Python? I would build the form in Iron Python, but
I'm trying to figure out how to use FakeItEasy with the HttpClient, given the following code: public Foo(string key, HttpClient httpClient = null) { .. } public void DoGet() { .... if (_httpClient == null) { _httpClient = new HttpClient(); } var resp
I've searched around and I want to abort a thread and restart it, something who should be really simple but no one is answering. Basicly I have an user who conenct throught a form, when the user is authenthified it raise an event to connect the user
I was wondering how could I save the user input for the duration of the program. My Code: struct client { public string points;//to collect the points from a textbox public int x;//variable used to temporarily save the input from the textbox public i
I was wondering if it is possible to persay 'link' two winforms together in C#. In a way that I can just call Variables like: ApplicationProperties.ApplicationPort.BaudRate instead of having to make an instance for everything I want to call? Similar
In a .Net Web Application, a xls file needs to be uploaded. The required scenario is like: when the user clicks on a button (say, Browse button) on a page, it'd open the file browse window. Here, is it possible to show only the available excel file(s
Can I add more than one validator to an object? For example: public interface IFoo { int Id { get; set; } string Name { get; set; } } public interface IBar { string Stuff { get; set; } } public class FooValidator : AbstractValidator<IFoo> { public F
Some issues with .NET reflection here ... I have a scenario working with reflection in .NET: I have a class say, ClassA, which inherits a method from another class ClassA_Base. Both are in the same assembly. The method in question takes a parameter,
I have method calls that take different inputs, i.e: public Authors GetAuthors(string name, string sortBy, string sortDir, int startRow, int numRow) { // Get authors based on filters } public Books GetBooks(string id, string year, string sortBy, stri
For the last couple of years I have worked with Silverlight (from version 2 to 4) and never seriously used WPF. Are there any quick tours/links/tutorials that explains and introduces WPF: differences to Silverlight and its unique features?A possible
I recently had the need to look into controlling a serial port so I turned to .net for this. I thought, since I'm using visual studio, this would easy...i was wrong... After figuring out what the "^" and "gcnew" ment, I stumbled upon t
I'm using Windows Vista and Visual Studio 2010. Create a .Net 4 Windows Forms Application. Drop a progress bar on the default form, add code to handle the form load event and do a progressBar1.Value = 100; there. Start debugging and you see an animat
I am trying to bind data with 2 dropdowns. I am have 2 tables created in SQL Server 2008: 1) country: country_id (primary key) country_name 2) state: state_id(primary key) state_name country_id(foreign_key) Now I tried to bind the data with 2 dropdow
I have a main window in my project, and numerous other child widows inside the main. I have noticed that. When I open the main window occupies 1500K of memory, when open one child window then adds in occupied memory 6000K. When I open the second wind
Is there a way I can develop a sample C# program, and make it a DLL, and use it in my C program? Say, C# DLL has a function add(int a, int b) which returns or prints the result. I want to use this in my C program. Any example link should be a good he
I've created a simple application .net Class that converts an excel spreadsheet into a pdf file. I then get an Excel 2007 application to call this dll which works fine on my development machine. However, when I deploy it on to a Vista machine, that h
How can I make the Enter key behave in a Winforms DataGridViewTextBoxCell like it does in a normal Winforms TextBox (add a new line to the text, instead of changing the current cell)?Well, I found out how to solve the problem. First, create a class c
I have my own asp.net cookie created like this: var authTicket = new FormsAuthenticationTicket( version, userName, DateTime.UtcNow, DateTime.UtcNow.AddMinutes(30), createPersistentCookie, userData, "/"); string encryptedTicket = FormsAuthenticat
I was about to ask this question...but since it has already asked I will ask a different one. I have never created a production website and I am thinking it is time for me to learn how. (I have simple one I can do for a customer.) I personally LOVE t
Is there any approach to convert an application developed in .NET into a native executable (sources are included)? Installing the whole framework (up to .NET Framework 3.5 SP1) takes a lot of time - not always the computers are updated from the inter
The directory 'C:\temp' has two files named 'GZ96A7005.tif' and 'GZ96A7005001.tif'. They have different length with the same extension. Now I run below code: string[] resultFileNames = Directory.GetFiles(@"C:\temp", "????????????.tif")
Apologies if this has been asked before. Had a quick search and there's nothing that answers my question 100%. I've got some XSL stored in the database which I want the user to be able to edit within my .NET Windows application. I could just stick it
I'm designing a client-server chat application (in fact I'm not, but let's pretend I am:)), and I'm a bit puzzled by some race conditions I've experienced. Let's say I've got the following code: public interface IServer { [OperationContract(IsOneWay
I know this may sounds like a pointless question, but hear me out... I basically want to know if I can trust the GUID to generate a value which will be unique 100% of the time and impossible to predict. I'm basically rolling my on login system for a
We are using LINQ very widely in our system. Particularly LINQ-to-objects. So in some places we end up having a LINQ query in memory build up from some huge expressions. The problem comes when there's some bug in the expressions. So we get NullRefere
According this MSDN article HttpApplication.EndRequest can be used to close or dispose of resources. However this event is not fired/called in my application. We are attaching the handler in Page_Load the following way: HttpContext.Current.Applicatio