.net

Custom MembershipProvider Initialize method

When overriding the MembershipProvider and calling it directly, is there a way to fill the NameValueCollection config parameter of the Initialize method without manually looking through the config file for the settings? Obviously this Initialize is being called by asp.net and the config is being filled somewhere. I have implemented my...

BindingFlags for Type.GetMethods excluding property accesors

Suppose I've got the following program: namespace ReflectionTest { public class Example { private string field; public void MethodOne() { } public void MethodTwo() { } public string Property { get { return field; } set { this.field = value; } } } ...

XmlReader - Read Current Node as string

In the following snippet, using XmlReader, when I encounter an element. I would like to read it as-is, including all attributes and namespace decoration in the element. Using the oXml.Name property, I am only able to get the tag name. Is there a function to get the tag itself? oXml = XmlReader.Create(path, oXmlSettings) While oXml.Read(...

Limiting assembly execution number of cpu cycles

I have a project that dynamically loads in unknown assemblies implementing a specified interface. I don't know the contents or purposes of the assembly, other than it implementing my interface. I need to somehow restrict the amount of processing power available to these assemblies. Processor priority is not what I'm looking for. I can't...

Dynamic where clause in LINQ - with column names available at runtime

Disclaimer: I've solved the problem using Expressions from System.Linq.Expressions, but I'm still looking for a better/easier way. Consider the following situation : var query = from c in db.Customers where (c.ContactFirstName.Contains("BlackListed") || c.ContactLastName.Contains("BlackListed") || c.Add...

How do I fix a Binding Failure in Soap?

I reloaded an old project, and tried to run it only to run into the Binding Failure MDA Assistant: BindingFailure was detected Message: The assembly with display name 'SoapTest.XmlSerializers' failed to load in the 'LoadFrom' binding context of the AppDomain with ID 1. The cause of the failure was: System.IO.FileNotFoundException: C...

Can I setup an IIS MIME type in .NET?

Can I setup a custom MIME type through ASP.NET or some .NET code? I need to register the Silverlight XAML and XAP MIME types in IIS 6. ...

Restricting access to objects in an application

One problem that I come across regularly and yet don't have a solution to is to restrict or permit access to specific entities in a system. Some companies (banks, for example) have very strict policies regarding which employees may access certain information. For example, an employee at a specific branch may access account information fo...

Save a message from exchange 2003 in .msg format using WEBDAV, C#

Hi, in C# .net 2.0, is there a quick and easy way to retrieve a message (including its possible attachments) from exchange 2003 and save it to disk in .MSG (outlook) format. Thanks, ...

Use OCX without registering it

Is it possible to use an ocx (ActiveX Control) on a winform (probably adding it programatically) without first having the ocx registered with regsrv32? What I'm trying to achieve is to enable xcopy installation. I've had the "AxInterop..dll" and "Interop..dll" file generated from my dev machine. I've seen the possibility of calling a C...

ASP.NET 2.0 IIS Setup

Good afternoon, This should be an easy one. I've done the cookie-cutter default ASP.NET 2.0 installation, but I have a couple of programming errors in my application. When I access the webpage on the server itself, I get a detailed ASP error message. However, when i try to run the same thing from a client machine, I just get a no-des...

custom button captions in .net messagebox?

Is there an easy way to display a messagebox in VB.Net with custom button captions? I came across this, in the SO archives, but it's for managed C++ http://stackoverflow.com/questions/77293/what-is-an-easy-way-to-create-a-messagebox-with-custom-button-text-in-managed-c ...

Product Development on .NET

Would it make good business sense to create web based software on the .net framework. Microsoft comes out with a new version of .net every 10 months or so... The support for the older versions of .net will be fading away gradually ... ...

Is basicHttpBinding the only option for connecting a .Net 2.0 client to a WCF Service?

This is a follow on to this question. I am trying to avoid using the x509 certificate method as that makes my client installs more complex. If basicHttpBinding is not the only option, where are some samples of other binding methods. My clients are on .Net 2.0, I don't have access to System.ServiceModel namespace as that didn't come ...

Abstracting data connection layers and presentation layers in an enterprise application

We are building an enterprise application in which we will incorporate multiple platforms for user interfaces (i.e. ASP.net webapp, Windows Application, and someday, Mobile Apps) and multiple platforms for back-end databases (i.e. SQL Server, XML, Oracle). An additional neccesity is that these back-end DBs either be centralized and acce...

Best way to reverse-engineer a web service interface from a WSDL file?

I've inherited a WSDL file for a web service on a system that I don't have access to for development and testing. I need to generate a web service that adheres to that WSDL. The wrapper is .NET, but if there's an easy way to do this with another platform, we might be able to look at that. The production web service is Java-based. What'...

What is the best way to compare .NET performance vs. VB 6 performance at a customer site?

Two questions: Can someone point me to unbiased data that compares .NET performance to VB 6 performance? I have searched but it is surprisingly difficult to find. What is the best way to compare .NET performance to VB 6 performance as an app behaves at a customer's site? We have a WindowsForms, client-server app (written for 2.0, upg...

How would you approach, in .NET, allowing the tenants of a multi-tenant SaaS app to arbitrarily add properties to the entities of the model?

So, we're building a multi-tenant system to run as a service. We're starting from the ground up. We're following DDD; the domain has (at the moment) ~20 entities in it, and later there will be more. It is to be hosted by us, geographically redundant (n+1 of everything except SQL queries ;-) ), and of flexible design (well, that last ...

ToolStrip Overflow

I need to replace the standard Overflow function in a ToolStrip to a "More..." button which would then pop up a menu with the overflowed items. Does anyone have any ideas about how to accomplish this? ...

Redirect .NET StreamWriter output to a String variable

I'd like to know if it is possible to redirect StreamWriter output to a variable Something like String^ myString; StreamWriter sw = gcnew StreamWriter([somehow specify myString]) sw->WriteLine("Foo"); then myString will contain Foo. The reason I would like to do this is to reuse a complex function. I should probably refactor it into ...