I got it! Phew did I have to dig.
It has very weird syntax with a backtick and brackets. Initially I tried following the MSDN guide on GetType (two-thirds down the page: http://msdn2.microsoft.com/en-us/library/w3f99sx1.aspx) which told me to do the following but still came up with a null...
Just to add to my original post, I even tried hardcoding everything like this and still gave me a null exception:
MyBaseClass<Customer> customerProvider =
Activator.CreateInstance("MyClass<Customer>");
And just to make sure I wasn't doing anything stupid somewhere, doing this...
I have a class that has a generic type and I'm trying to create an instance using the activator but having trouble with it. This is what I have:
public abstract class MyBaseClass<T> where T : new()
{
...
public abstract T DoSomething();
}
public class...
Right now my app uses InProc to handle the sessions, but I want to use the Session State Server that's in Windows services. I've read that I need to serialize my classes. Is all I have to do is put [Serialize] on top of EVERY single class in my app (seems too easy)?? Also what do i have to do to...
I'm wanting to implement an authentication model based on an XML file for storing the username, password, role, profile, etc. Is there any native XML authentication provider or one out there that I can use (ASP.NET 2.0)? I plan on using a format like this:
<?xml version="1.0"?>
<admin>
<john>...
Just to give an idea, below is a first draft. As you can tell, I'm not really good at RegEx but I hope someone can see what I'm trying to do. I need to hardcode the domain because there will be one entry per domain like below. Notice each domain is assigned a destination site:
<rewrite...
I have a url rewriter on my website and need help making a tight RegExp so I can reroute requests based on the domain name. My website has a root folder called "/userfiles" which is where all the sub websites go under. So the structure is like this:
/userfiles/site1
/userfiles/site2...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.