Archive

Archive for the ‘ASP.Net’ Category

How to Setup and Configure MySql Membership Provider 6.2.2 – Porting to Mono Part 2 of 3

February 1st, 2010

As the second part of this series, I’ll look at building a website that can use the MySql Membership Provider. This is one of the main hang-ups I’ve run into while porting one of my ASP.NET applications to Mono. With the latest MySql Connector, this turns out to be a very easy thing to do. It’s nearly as simple as setting up your web.config with the correct parameters and getting the right connector version.

Read more…

Nathan Bridgewater ASP.Net , , , ,

Using jQuery Modal Dialog Confirmation with an ASP.NET Server Control

December 1st, 2009

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 , , , ,

Announcing SiteManager – A Simple Open Source, MVC Based CMS

October 27th, 2009

While playing and learning with MVC, I designed a simple little CMS (content management system). My goals for the project were to keep it simple, use MVC, and make it SEO optimized as possible. Well finally the first version of that application is published on CodePlex. Feel free to go check it out. Don’t forget to peek at the setup documentation.

Nathan Bridgewater ASP.Net , , ,

Connecting to Sql Server using Impersonation from Asp.Net

June 16th, 2009

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 , , , , ,

Unable to Find Valid Certificate Path for Google Checkout Notification on IIS6

May 4th, 2009

Well this was a fun one. For onelittlebow.com, we’re using Google Checkout as one of our checkout methods. Recently we just switched to using a virtual dedicated server rather than the normal shared hosting environment at GoDaddy. Their shared hosting never really supported Google Checkout notifications because their shared IIS servers were configured to use Basic Authentication with Windows and always pre-authenticated the request. Since the merchantID and key wasn’t a valid NT account on the server IIS would always kick back a 401 response and ASP.NET wouldn’t even touch the request.

Now with the virtual dedicated environment, we are finally able to use these callbacks and handle the authentication header ourselves in code (or by setting up an account on the server).  But in production, we must use fully trusted SSL. That’s not a huge deal; we just purchased one of their SSL certs and installed in on our server. Easy peasy right?  Well if you’re like me and you’re not super familiar with the nitty gritty details of SSL and certificate validation, then you might be getting this error in the Integration Console on Google Checkout’s admin page.

We encountered an error trying to access your server at https://somewhere.com/callback_endpoint — the error we got is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Read more…

Nathan Bridgewater .NET, ASP.Net, Google Checkout , , , ,

Did you know? Custom Http Handlers and IIS vs ASP.NET Development Server

January 24th, 2009

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 ,