.net

What are Scala's future platform concerns people should be prepared for?

At the moment Scala runs only on the JVM, with an outdated implementation for the CLR. But there are some voices at the moment, that Microsoft is interested funding an up-to-date Scala port for .NET. Considering the lack of any plan or oversight at Oracle's side what to do with Java/the JVM/the ecosystem, how can a Scala developer be p...

Optimal way to handle .dbf from C#

What data-provider can I use to update .dbf file from C#? I tried a few different .dbf providers to create a DataSource but I get a message like this: "Error Message: ERROR HYC00 Microsoft ODBC dBase Driver Optional feature not implemented." Or when I generated a dataset and a dataadapter with an update function I got: "Update requires...

Why does a trailing %20 (valid data in this case) kill asp.net mvc routing

Take the following controller action public ActionResult NextBySURNAME(int id, string data) { //code to process the data and edit the id accoringly not written yet return RedirectToAction("Edit", new { id = id }); } if I call it with /Mycontroller/NextBySURNAME/12/Smith%20Simon then it works fine (in this...

Windows Service "self hosted" WCF : compression?

Using compression with WCF in IIS I can find documentation for, but its oriented towards using IIS features. I can find people talking about how they've written their own compression handlers, but it all looks pretty custom. Is there a best practice around compressing WCF? We're using http bindings. Edit: setting this as a wiki. ...

Nesting WPF Paths

I'm trying to create a Venn diagram control for an application I'm working on in WPF. I just want to create a two way Venn at the moment, so two circles overlapping each other. There are two features I'm trying to get working: 1. The control must resize the Venn to fill the available space. 2. Each section of the Venn should take mouse ...

CommandConverter - Valid exception or .NET Bug

I'm getting an exception in my C#/.NET application that reads: 'CommandCoverter' is unable to convert 'MyNamespace.MyDerivedFromICommandSubclass' to 'System.String'. What I'm doing is fairly straight forward, as described by the MSDN ICommand documentation: public class MyDerivedFromICommandSubclass : ICommand { // Implement int...

Entity Framework - load data from table with 1:1 table involved using one query?

Hello, I have the following command: var query = from x in context.FirstTable.Include("SecondTable") where x.TestColumn == 5 && x.SecondTable.SecondTestColumn == 3 select x; Now I also want to load the entries from a third table named "ThirdTable". But I can only reference it via the SecondTable table. There is a foreign key from Fir...

Directly reading large binary file in C# w/out copying

I am looking for the most efficient/direct way to do this simple C/C++ operation: void ReadData(FILE *f, uint16 *buf, int startsamp, int nsamps) { fseek(f, startsamp*sizeof(uint16), SEEK_SET); fread(buf, sizeof(uint16), nsamps, f); } in C#/.NET. (I'm ignoring return values for clarity - production code would check them.) Specifi...

Redirecting to Secure Mobile Site

I have this .NET website, with an SSL. But when I try to see the Blackberry version of this site, the following message appears on my blackberry screen. "HTTP ERROR 403 FORBIDDEN" "You're not authorized to view this page. Please try loading a different page". It gives you two options then: "OK" and "DETAILS" Once I click on "Details" i...

Is DotNetNuke currently ADA 508 compliant?

Is DotNetNuke currently ADA 508 compliant? I realize that it depends on how you use it, but I'm talking about out of the box, core modules, etc. ...

Is putting data in cookies secure?

Hi I am using asp.net mvc 2.0 and I am wondering how secure is it to put information in a cookie? Like I put in my cookie a forms authentication ticket that is encrypted so can I put information that could be sensitive in there? string encryptedTicket = FormsAuthentication.Encrypt(authTicket) HttpCookie authCookie = new HttpCook...

.net 4.0 migration

Can a .net 3.5 c# project reference a .net 4.0 assembly and compile with it? What about run time? What about 4.0 compiling / running with 3.5? EDIT: in particular, I have a 3rd party .net assembly. It has extension points: I register my dll in app.config and it calls me (probably via reflection). Can I implement my dll in .net 4.0? wh...

Why do I have to add System.Data.Entity to use System.Data.Objects?

I am still learning about programming as you can probably tell by my question. How come I have to add System.Data.Entity as a reference to my project to use System.Data.Objects? Does Objects live in namespace System.Data.Objects? Wouldnt it make sense for Objects to live in System.Data.Entity.Objects? ...

How do I change the verification method when using the Google .net client library for Webmaster Tools?

var settings = new RequestSettings("appname", "googleusername", "googlepassword"); var service = new WebmasterToolsRequest(settings); var site = new Sites("http://www.mysite.com", "text/plain"); Sites resultSite = service.AddSite(site); resultSite.VerificationMethod.Type = "htmlpage"; resultSite.SitesEntry.Update(); .Update fails with ...

How does "Typemock Isolator" mock static methods?

As some of you will know, it is generally not possible to mock a static method in .net. By mocking, I mean to replace a method in a class with another method with the same signature, usually for testing purposes. The two main methods used for mocking a method are to declare it virtual or define it in an interface. Neither of these two...

Queries generated by group by vs group join

I have the following group by linq statement from c in Categories join p in Products on c equals p.Category into ps select new { Category = new {c.CategoryID, c.CategoryName}, Products = ps }; However this generates the following left outer join query and returns all categories even if there are no products associated. SELECT [t0].[C...

Upgrade to .net 4 produces breaks webservice .asmx

I was trying upgrading to .net 4 for my WebForms asp.net project. Now I'm getting this when I try going to the .asmx webservice. Server Error in '/' Application. Type 'Chickenweb.WebServ.WebServ' does not inherit from 'System.Web.UI.Page'. Description: An unhandled exception occurred during the execution of the current web request. Pl...

How to make a .net dll stored procdure using VS2010 and SQL Server 2005?

Hi Does anyone have a tutorial on how to first make .net dll solution in VS2010 that will work for SQL Server 2005? I heard they have a special solution but I am not sure which one it is. I am trying to write what I think they call an extended stored procedure. Then a tutorial on how to actually right these extended stored procedures ...

Process.Start with 'UseShellExecute = true' doesn't return for corrupt word documents

I am trying to print pdf, ppt, and word documents from my windows service using ShellExecute. Process printingProcess = new Process { StartInfo = { FileName = filePath, WindowStyle ...

DataGridView.Editmode = EditOnEnter. How to Select the row to Delete it ?

When I use EditMode = EditOnEnter, The cell enter on editmode when I select the row. It is hard to user to select the RowSelector to Delete the row. do you know any Trick ? ...