So for the third and final part of this series, I want to walk through how I ported a very small project I posted on CodePlex awhile back called SiteManager. It is an extremely simplified CMS application that I wrote using Linq to Sql and MVC in order to provide a very basic and easy website tool. It uses membership provider for authentication and Linq to Sql Classes with its database in MS Sql Server. For this walkthrough, I’ll be converting the database to MySql and adapting Linq to Sql to Dblinq so it can completely run on Mono and Linux.
Read more…
Nathan Bridgewater Mono ASP.Net, Mono, MVC, MySql
So the other day, I wanted to build a confirmation dialog using jQuery with an existing Asp.Net web forms Button control. I wanted this dialog to be modal; and upon confirmation, I wanted it to postback using the Button’s server-side click event. After toying with the jQuery dialog, I realized that its dialog doesn’t suspend the process while waiting for user input. So it also causes problems with confirmation since clicking the original button will always postback. So with a few tweaks, you can prevent the postback and emulate the click event pretty easily.
Read more…
Nathan Bridgewater ASP.Net, jQuery ASP.Net, dialog, jQuery, modal, postback
So you have an Asp.Net application that needs to authenticate its users to Active Directory, and you also want to use their credentials for connecting to a database server. It’s pretty logical thing to do in an enterprise environment where you would normally control all your user privileges using Active Directory. This is especially nice since you also don’t have to put sensitive credentials in your web.config file. Read more…
Nathan Bridgewater .NET, ASP.Net, Sql Server Active Directory, ASP.Net, Delegation, security, Sql Server, Windows
While developing in Visual Studio using the ASP.NET Development Server, all your requests are handled by the asp.net handler. So when you’re playing with things like url redirection or custom handlers, it will work fine while you’re developing. But when you deploy it to IIS, you need to add the handler for the extension so IIS knows that ASP.NET is processing the request.
I just ran into this while building an image handler for custom_folder/*.jpg. I wanted all requests for jpg files here to be handled by my custom handler. My IIS Server wasn’t responding properly because it wasn’t configured to pass that request to asp.net. Unfortunately, I’m working with a shared hosting environment and Medium Trust, so I have to change this to something that is handled by asp.net by default like *.ashx, aspx, etc.
In a full trust environment where you have acess to the IIS server, you can add a new ISAPI handler for any extension you want to override in asp.net. Just go to the application configuration for the website or virtual directory and add a new ISAPI filter for your extension. When adding a new extension filter, point it to the same path as the other asp.net ISAPI handlers. If you want it to just handle for a single folder, it might be a good idea to set it up as its own virtual directory with a filter for that virtual directory alone. This will allow asp.net to handle the requests for that file type, then you can use your custom handler as you normally would in the development environment.
If anyone is interested, I can provided more information.
Nathan Bridgewater .NET, ASP.Net ASP.Net, http handlers