Hey everyone,
Quick question; I've recently upgraded to VS2010, and got the new version of ReSharper.
Now, when ReSharper is giving me autocomplete options for a variable, it give me the option of <variableName>:
What does the : stand for?
For example; I have this:
var productIds = new List<int>(inventoryItemsToProcess.Keys);
And ...
I would like to be able to inject named dependencies into a class using StructureMap if that is at all possible. The main reason I want this right now is for connection string injection.
I may be doing this the wrong way, but here's how I've got it (just need to add injection now):
psuedo:
public class MyServiceClass
string conne...
I am trying to use inherited types with EF, which has been all cool and gravy until now.
I have a base type (Person) and two types that inherit person (Employee & Customer). I run into a problem when I want a person to be an Employee and a Customer at the same time. For example:
Person person = db.Persons.Single(p => p.id == id);
if (...
Hello,
I am trying to get a WCF .Net 4.0 client to work with a NuSOAP/0.7.2 (1.94) Web Service. First thing, the web service is not based on current SOA standards so I had to create a custom encoder to handle the ISO-8859-1 message encoding. When I get the response, WCF throws the following exception
"Error in deserializing body of ...
hi, i want to know which approach is better to saving Webpage content to database for caching?
Using ntext data-type and save content as flat string
Using ntext, but compress content and then save
Using varbinary(MAX) to save content (how i can convert flat string to binary? ;-))
An other approach which you are suggest to me
UPDATE
...
I'm doing like this:
entities.AsParallel().ForAll(o => repository.Insert(o));
is this good, am I going to have more performance with this ?
...
I am using ChannelFactory to create a proxy at run-time for a WCF service. I would like to use the DynamicProxy Castle project to create a dynamic proxy on top of the WCF proxy so that I can intercept calls and do impersonation.
I'm getting an error when I try this though... the error message is:
'this' type cannot be an interface i...
I have a website that is hosted on IIS6 and set to use .NET 4.0, but I still have a WCF service on the site that is using 3.5. When i browse my svc file, i get the error:
unrecognized attribute 'targetFramework'
and it point to the websites root web.config. I have tried this MSDN article and still get the same error. My site is usi...
I don't know why it's is error on SaveChanges(), i search in google, some body say using EF, the database's table such have primary key, i have this, but still error. The error message is not enough clear,it just throws System.Data.UpdateException.
The Code:
public static void AddAccount(int _acc_id,string _name)
{
dataEntities de =...
Hello,
I am trying to cache a selectlist which is not null but I get a null exception error. The line of code causing the error is: (note item is created using Cache item = new Cache(); and tripVM.friendDropDown holds the selectlist
item.Insert("friendDropDown", tripVM.friendDropDown,null,DateTime.Now.AddMilliseconds(10000), TimeSpa...
I was checking 2nd edition of Professional ASP.NET MVC and realized EF replaced LINQ to SQL. I am familiar to LINQ to SQL from the first book but I know nothing about EF. Anyway while reading the code, it seems like nothing has changed except the name. Same old repository, same old functions.
I did a little research. I know LINQ is not...
I'm moving an ASP.NET project from .NET 3.5 to .NET 4.
Everything works beautifully if I'm debugging under web.dev (ie. in Visual Studio [2010]) but as soon as I try and run this under IIS7[.5] the debugger fails to attach. Running the project directly under IIS just causes it to throw back 403s (no subcode, so not much help there).
I...
My code is as bellow ,i have a xml file in xml folder in root i get an error type or namespace Movie not found.
I think i am following what wrox book has said i get this error,can anyone help me out.
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System...
We were using WIX 3.5 (Build Number 1811) and built a custom action built using Visual Studio 2008 and with target framework as .Net 3.5. This used to work great, until we built the custom action using Visual Studio 2010 and with target framework as .Net 4.0.
WIX is unable to invoke the custom action, the error that we get is this:
S...
hi,
can anyone tell me whether i can use EnableDynamicData for textbox or dropdown list??
From what i can find i cant? Perhaps i can add this functionality by inheriting specific class??
thanks
NIall
...
Immediately after we upgraded to visual studio 2010 and the 4.0 framework our trunk build started breaking with the Could not load file or assembly error.
We determined that a 3.5 project couldn't reference a 4.0 project else we'd get this error because, as the error states, This assembly is built by a runtime newer than the currently lo...
Hello,
I have some projects based on NHibernate 1.2 and I'd like to add them to a .NET 4.0 solution, but I get an AmbiguousMatchException.
No matter if these projects are targeted to 2.0 or 4.0 framework.
It works if I add them to a .NET 3.5 solution.
Does anyone have experience with that?
Here is the exception:
[AmbiguousMatchExcep...
I am new to RESTful web services. We are taking the REST route for building our public web services to be consumed by out clients.And i had a few questions.
Are there any kind of limitation with pure REST webs services? and if yes then would a hybrid REST web service take care of those limitations?
I am thinking about using SSL + Hash...
Is there any way to use the new dynamic features in the 4.0 framework like ExpandoObject in VB.NET without setting Option Strict Off? With C#, you lose type safety only with the variables you specifically declare as dynamic. But with VB, the only way I've found to use these features is with the old Option Strict Off trick that's been in...
My following code fails with "...has already been registered as a source on the local computer" even though I'm doing checks first:
lock ( eventLock )
{
string eventLog = Constants.EventLogPL;
string eventSrc = Constants.EventSrcPL;
if (!EventLog.Exists(eventLog))
{
if (!EventLog.SourceExists(eventSrc))
...