We have a function in a VS2005 project that loads assembles and get type information from them . It does not instantiate these types though. We tried to load some assembles that are compiled in 2010, but keep getting the following exception.
"Could not load file or assembly '2010ClassLibrary' or one of its dependencies. This assembly i...
I'm in the process of upgrading an asp.net v3.5 web app. to v4 and I'm facing some problems with XSLT transformations I use on XmlDataSource objects.
Part of a XSLT file:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HttpUtility="ds:HttpUtility">
<xsl:output method="xml" indent="yes" encoding="u...
I have converted my web application from 3.5 to 4.0. I have been getting the issue on update panel post back method. I have linkbutton and textboxes inside the same update panel, when clicking on linkbutton for fill the values system throw below JS error.
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6...
What new validation attributes do we have in .net-4?
...
Hi,
Can anyone tell me if the following query calls the database multiple times or just once?
var bizItems = new
{
items = (
from bl in db.rc_BusinessLocations
orderby bl.rc_BusinessProfiles.BusinessName
select new BusinessLocationItem
{
BusinessLocation = bl,
BusinessProfile ...
I am starting to take advantage of optional parameters in .Net 4.0
The problem I am having is when I try to declare an optional parameter of System.Drawing.Color:
public myObject(int foo, string bar, Color rgb = Color.Transparent)
{
// ....
}
I want Color.Transparent to be the default value for the rgb param. The problem is, I k...
I am building a site using WebFormsMvp and Entity Framework 4.
The site is a bit slow and when i profile in dotTrace these three methods take 75% of the time. (My first method takes about 3%)
System.Threading.WaitHandle.InternalWaitOne(SafeHandle,
Int64, Boolean, Boolean)
Microsoft.Samples.Runtime.Remoting.Channels.Pipe.PipeNative....
Hello,
I'm getting Invalid expression term ":" error if I use <%:%> with VWD2010 Express, which I believe works with .NET4 framework. Only <%= %> or <% = Html.Encode()%> work. Is there any other configuration to apply or VWD2010 doesn't support that syntax?
EDIT
Here's a sample code I'm using
<th><% : Html.LabelFor(x=>x.registrationD...
I have a VB.NET solution, just upgraded from 3.5 to 4.0. One of the classes has a private field:
Private _Projection As ICalculatedPath
At runtime, any time the class containing that field accesses that field, I get a FieldAccessException. The first time that field happens to get accessed is a null check in a method, and one of the th...
what is the ActionFilterAttribute equivalent in WCF?
I have a rest service which looks like below
[WebInvoke(Method = "POST", UriTemplate = "/")]
public User CreateBookMark(BookMark bm)
{
User authenticateUser = GetUserSomeHow();
//do stuff
}
I want to change this to follwoing
[WebInvoke(Method = "POST", UriTemplate = "/")]
p...
That title is quite a mouthful. Let me try to be as clear as I can...
I have a WCF REST Service written in .NET 4 that uses the entity framework to pull some data from SQL Server into a list of objects. The objects are then returned as XML to the client. The problem is that the XML have references to each other due to my model's rela...
I'm following a tutorial on MVC on the .NET 4 framework. The tutorial created a function like this...
using System.Web;
using System.Web.Mvc;
namespace vohministries.Helpers
{
public static class HtmlHelpers
{
public static string Truncate(this HtmlHelper helper, string input, int length)
{
if (inpu...
Hi, I have been unable to figure out how to keep a context menu open after handling a click event past the first level. Here is an example of where I have a context menu with a menu of checkable menus. I open up the context menu after handling the click event, but I have to manually return to the inner menu. Is there a way to open up the...
I have the listBox and a ObservableCollection. The listBox.ItemSource (listNotify.ItemSource) is set to that ObservableCollection (errosList).
The problem that i have is that i don`t know how to remove the correct element from errorsList when the user click on the button with content x from listBox. For the item of the listBox i use a I...
I have the following code:
public static class ScraperMasterUriDetails
{
public static Dictionary<Guid, string> MasterUriDetails;
}
However I've decided that I need to add an integer to the dictionary Dictionary<ScraperMasterUriDetails>, so I thought I'd add properties and a few parameters to the constructor.
But,...
I'm using C#/WPF, and generated a console programmatically using the WinAPI's Alloc/FreeConsole. When this is done, the standard System.Console class interacts wih it fine. Except, when you close the console by clicking the X rather than using FreeConsole(), it closes the rest of the app too. I'm using .NET 4- how can I override this beh...
I just finished an app to import a fairly simple XML data file into a db. The app works fine but I'd like to know how I should handle a bad XML file. For example, the user selects an XML file that has a different layout than what is required for my app. Eventually, I'd also like to add the ability the select multiple files to be imported...
I'm trying to create a flexible security infrastructure for our WCF services on our intranet, but I'm not quite sure where I should be putting this code... there are so many different ways to extend WCF that I don't know for sure where to begin...
The basic idea: every time my service is called - for any operation - I want some code to ...
I have a solution with 3 projects and i have a reference between two of the projects and a reference to a .dll from a project in all 3 projects. The project are in Silverlight.
I want to make a multi-project template and when i create a new project from that template the references doesn't work anymore. It make the modification to the na...
I am debugging the live process (not dump) of PresentationHost.exe. It used to works fine, but suddenly few days ago I get the above error message. !Threads, !pe, virtually all SOS command doesn't work.
All I remember is that I installed Visual Studio 2010 and .NET framework 4.0 before I'm getting that error. Is it related?
UPDATE:
I ...