I have implemented a custom UrlAuthorization module as shown here
The code is as follows:
public class CustomUrlAuthorizationModule : IHttpModule
{
public void Init(HttpApplication context)
{
context.AuthorizeRequest += new EventHandler(context_AuthorizeRequest);
}
void context_Author...
What ORM frameworks for .NET and Oracle Do You Like Best?
...
I'm having to write a TCP Server for a project at work and I googled around how to. I got an MSDN answer and managed to get it working, but I have no clue how to get data to be able to receive back and forth. The sockets aren't going to be connected more than about 30 seconds MAX (because my boss doesn't want sockets staying open on the ...
I have a bunch of DAO classes that do something similar for an Entity.
I was wondering if anyone can help me with ways to:
1) Simplify this code
2) Stop from duplicating code like this for each entity.
public IList<IUser> GetAll()
{
IList<IUser> users = new List<IUser>();
using (var myConnection = new SqlConnect...
Hi,
We're using IIS7 and ASP.NET 3.5.
We have updated our website with new pages. Now, there are many links on the internet pointing to our website, however many of those links are now broken due to a change in our directory structure for our new website.
I need to have a number of requests, 301 redirected to the "new page." Many of...
I have the following sample code (used for C# 3.5 study purpose only !).
I am making a call to the Sort function that accepts an IEnumerable and a sort function. If I call it using a lambda expression (Case A) the compiler can derive the return type TResult, however when I pass the func SortInt (Case B) the compiler throws an error !
...
Look at the line "THIS LINE ####" in following example.
<ListBox Grid.Row="0" x:Name="listBoxServers">
<ListBoxItem HorizontalContentAlignment="Stretch">
<StackPanel>
<TextBlock><Run Text="My computer"/></TextBlock>
<TextBlock Foreground="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}">
<Te...
Hello.
I have a question. I would like to serve a series of services made with WCF. The client that consumes the services is also .NET with WCF. I would like to have high speed of access, fast response, transport medium to small Data Contracts (primary .net basic data types). The distribution will be over internet, I´m looking for reli...
The following line:
string url = HttpContext.Current.Request.Url.AbsolutePath.ToLower();
results in an unauthorizedaccess exception.
This is odd to me, especially since I can hover over the variable and see its value.
This is inside a custom class inherited from IHttpModule that runs as aspx are loaded.
I'm using this to get the use...
How are you supposed to dispose of a BitmapSource ?
// this wont work because BitmapSource doesnt implement IDisposable
using(BitmapSource bitmap = new BitmapImage(new Uri("myimage.png")))
{
}
...
I have a client who's interested in utilizing Windows Workflow technology in a web-driven application. I'm a .Net developer but have no experience with either WF or SharePoint workflows. Most of what the client wants to do seems to be straight-forward except that they want the ability for end users to be able to create/edit their own c...
After reading the wikipedia article on WPF architecture, I am a bit confused with the benefits that WPF will offer me. (wikipedia is not a good research reference, but i found it useful). I have some questions
1) WPF uses d3d surfaces to render. However, the scenegraph is rendered into the d3d surface by the media integrated layer, whic...
Hey, I am trying to create an Expression<Func<T, bool>> in which a string property is converted/cast to a DateTimeOffset so that DateTimeOffset operations can be performed on it.
We are using Linq2SQL as our data provider, which does support converting strings to the SQL equivalent of DateTimeOffset. Ideally I want the expression to be...
Hello.
My asking is quite simple and is about asynchronous sockets, working with TCP protocol.
When I send some data with the "BeginSend" method, when will the callback be called?
Will it be called when the data is just sent out to the network, or when we are ensured that the data as reached its destination (like it should be regardin...
I am writing a C# WinForms app using VS2008. Is there a way I can view all of the objects that my application has loaded into memory?
...
I will have a TreeView control where the user can add/delete nodes, then click the Save button, which will save the data entered into the database.
Normally, I would be saving the TreeView data inside session object while the user is editing it, but the way our web servers work, the session can not be relied on (I have been told NOT to ...
I have downloaded the current version of Db4Objects (7.4) and installed it. It appears to be missing the Client Server assembly Db4objects.Db4o.CS.dll
Does anyone know if Client Server has changed with this version? If it has, does anyone have some details about creating a simple Server?
...
Hi all,
I have a small queary,
i have a sample application, which is developed in c# using .net 3.5 CF.
if the .net CF is not installed in the device an exception will rise, saying that latest
.net CF is not installed in machine.
i dont want this error message at all. I mean,i want to handle this exception.
i tried it doesn't even com...
Okay guys, I have an asp.net website set up to target the 3.5 framework, using Linq to Sql. However, the site won't build, and i get missing namespace and assembly exception whenever i try to.
Here's the catch, I have installed 3.5 SP1, and I have added the System.Core, System.Data.Linq, System.Xml.Linq, and System.Data.DataSetExtensio...
Hello, I have problem, when converting Windows application from .NET2.0 to .NET3.5.
I do this like so:
1. In Win XP I start VS2008 and open my solution project which consists of 4 projects;
2. On all of these 4 project Properties window in tab "Application" I select target framework value ".NET Framework 3.5"
3. I rebuild the solution,...