Posts in ASP.NET Categories

Using MySql as ASP.NET Session Store Provider

MySQL Connector/Net from version 6.1 has included a custom Session State Provider. This provider enables you to store session state in a MySQL database and is useful if you are running your site on a web farm and you don't want to use the build in MSSQL.

NHibernate with logging throws a Security Exception under Medium Trust

I am using NHibernate 3.2.0 under medium trust and all was going well until I turned on logging to try and trace a SQL error. It seems that when you set the log4net logging level to INFO that under a medium trust NHibernate throws a Security Exception. You can see from the stack trace exactly where the error was occurring, it's quite clear. In the NHibernate source the static constructor for the Environment you can see that the NHibernate Version is logged, I was picking that is where the error was occurring.

Problem getting log4net 1.2.10 working with ASP.Net 4

Just a quick note on getting log4net 1.2.10 working with ASP.Net 4. I had been working with log4net version in ASP.Net 3.5 and it had been working but after upgrading the project to ASP.NET 4 I noticed an odd behaviour. It would log only one message to the log file and refused to log any further messages until the application was restarted.

Running Lucene.Net under Medium Trust

I'm in the middle of moving a web application from a Full Trust environment to a Medium Trust environment. There were all sorts of things that wouldn't work under Medium Trust as they did under Full Trust. I updated the version of Lucene.Net I was using to Lucene.Net 2.9.2. Of course, it would work out of the box.

Using WSE 3.0 in VS 2010 with .NET 4.0

I had a project the used WSE 3.0 which I recently decided to migrate to .NET 4.0, it had previously

Resize RadSplitter to the size of its content

Working with the Telerik RadSplitter control I had the situation where I had dynamic controls in a panel inside a RadSplitter. If you are using any sort of tree control or expanding panel you will find the RadSplitter is only resized to the size of the contents when the page first loads and if you change the height of the content you get scroll bars. I have searched for a solution and all information from Telerik indicate this is by design and the control doesn't support this type of behaviour. But it is possible, if you look at the online help you will see they use the splitter control with this exact behaviour. Find a page with a little bit on content and expand the tree menu. You will find the height of the RadSplitter control is increased and no scroll bars appear. So how come it works here?

Custom Domain using nHibernate dynamic-component

I have been working on providing a user-defined domain object to my C# ASP.NET NHibernate project. I have been undecided on which approach to take. One difficulty is that the mapping files I am using are embedded so they cannot be changed. After some research, I had been considering two options. Using a one-to-many look-up table which contained all the custom attributes or using a dynamic-component mapping.

Creating a For Loop in XSLT

Today I wanted to create a for loop in XSLT based on the value of a variable similar to what you would do in any programming language. In XSLT it's a simple task to iterate through a number of elements using XSL for-each but it proved to be a bit trickier than I first thought to iterate over a variable.

Run Microsoft Ajax Minifier from the Visual Studio Tools Menu

Microsoft has created a great tool, Ajax Minifier a free tool that you can use to minify your JavaScript and Cascading Style Sheet files. So far I have had no problems with the minified JavaScript.

How to debug Javascript, JSON and ASP.NET WebServices with Firebug

Writing a JavaScript client-side interface backed by ASP.NET Web Services is a great way to create a rich responsive interface. A previous post on Client Side Binding Using Ajax Page Methods and jQuery demonstrates some of the first steps to do this. It can be a bit tricky when it's not working figuring out what is wrong. Is it the JavaScript the Web Service or something else.