eWorld.UI - Matt Hawley

Ramblings of Matt

Custom Web App and Reporting Services Integration: Part 1, Authentication

November 17, 2004 23:27 by matthaw

Preface:
The following will be a series on integrating your custom web applications with SQL Server Reporting Services. It is intended to provide useful information for other developers posed with the same problem of integrating these two seamlessly.

Situation:
A new project came up at work, where we had to develop our own custom web application where users will be prompted to easily select reports, their parameters, and view them seamlessly all from one interface. This means, that we couldn't just direct the users to the interface provided by Microsoft and assume they'd know what to do. Also, due to requirements by the client, the reports should be available to only certain users with authentication resorting back to Windows / Active Directory.

Notes:
In part 1, I will discuss the method we took to integrate these two applications seamlessly by only being prompted once for windows credentials, or no prompt at all (using your signed on domain credentials). In our situation, the client is still running Novell, so Active Directory integration was out of question, so windows authentication will need to be handled by the reporting / web server.

An important item to note is when integrating the two items on different servers and not using active directory, seamless integration is not possible unless you manage to keep the users / groups in sync with each server (a challenge upon its own). Therefore, due to this requirement, the rest of the article will be based on single server or Active Directory authentication.

Authentication Methodology:
When developing your application, it is best to use windows groups to control authorization to the various reports and different sections of your web application. In our instance, we needed two different groups - Users and Admins. Users in the Admins group would have access in our application the ability to enter new information, while users in both groups had the ability to view all the reports.

Our first step was to create our groups and add the various users to the appropriate groups through the standard windows management console. Once our groups were setup, configuration of Reporting Services to allow the two groups access to view reports only was our next step (Note, this entry will not describe the methods for doing this as there are lots of resources to help you). Now that we're all ready to go, and the authorization to the reports have been tested properly using the Microsoft user interface in Reporting Services, its now onto configuring our custom web application to use windows authentication (again, we will not go into too much detail, but examples will be shown).

Okay, so open your Web.Config file for your custom web application, and add the following entries under your system.web node:

<authentication mode="Windows" />
<authorization>
    <allow roles="<SERVER_NAME or DOMAIN>\Users" />
    <allow roles="<SERVER_NAME or DOMAIN>\Admins" />
    <deny users="*" />
</authorization>
<identity impersonate="true" />

For any subdirectories that you wish to have different authorization on, follow the same template listed above, but leaving out the "authentication" and "identity" elements. In our instance, we needed a subdirectory called "Administration" that only users in the Admins group can gain access. So, after creating the sub directory, we created another Web.Config file in that subdirectory and added the following to the system.web node (Note that there are other methods of doing this type of configuration using a single Web.Config however for ease of example two Web.Configs are used):

<authorization>
    <allow roles="<SERVER_NAME or DOMAIN>\Admins" />
    <deny users="*" />
</authorization>

To briefly explain what we've done for authentication is told our web application to use the Windows mode of authentication. We then authorized only users in the Users and Admins roles access, and denied everyone else. Lastly, the application will impersonate the user that is currently logged in. This is a key concept since we'll be using credentials in part 2 and sending them with the Reporting Services API.

So, now our custom web application is setup - however there are still some settings within IIS that we need to set. The following settings were those that I found to work with our single server setup with no Active Directory verification, so you may need to fiddle with these if using Active Directory. To set the IIS permissions properly, open up IIS, find your Web Application, and view the properties. Click on the "Directory Security" tab, and hit the "Edit..." button for Authentication control. Once the new dialog has opened, uncheck "Anonymous access", ensure "Basic authentication" is checked, and "Integrated Windows authentication" is checked.

Launch your favorite flavor of an internet browser, go to your custom web application and see the magic work. You should immediately be prompted (unless using Active Directory & Digest mode, in which case if your currently logged onto the domain will pass directly through) for your username and password. After typing your credentials, you should be able to log in successfully to your web application. So, go ahead, take a deep breath and pat yourself on your back.

Part 2 will discuss using the Reporting Services API and your custom web application to provide that seamless look to your application.



Categories: .NET
Actions: E-mail | Permalink | Comments (1) | Comment RSSRSS comment feed

Microsoft is using MY Controls

November 15, 2004 18:56 by matthaw
I was working with one of our engineers getting our company information completed after we just passed an ISV competency test through Microsoft, and while I was filling out the page, I noticed there's a Calendar control on it. So I clicked it, and hey - it looks like mine. Examining the source of the page reveals that it IS mine. Woah, talk about cool...Microsoft is using MY calendar popup control and MY numeric textbox. That gave me a high for the day, and its only 10AM.

Find in Firefox

November 12, 2004 22:55 by matthaw

Everytime I need to find something in a wepage, I hit Ctrl-F. Most applications have a dialog that opens up and allows you to search for the word, phrase etc. However, Firefox took an old feature and made it awesome. See what I mean by opening up Firefox and clicking Ctrl-F ... don't see anything? Well, look towards the bottom of the browser. A new toolbar opens up allowing you type your search phrase. The really awesome part is that as soon as you start typing, it starts finding all instances and brings your browser to the first instance. Cool man cool.

BTW - clicking enter will "Find Next" and clicking Shift-Enter will "Find Previous".



Categories: General
Actions: E-mail | Permalink | Comments (9) | Comment RSSRSS comment feed

Framework Oddity

November 12, 2004 17:38 by matthaw
Can someone explain to me why the choice was taken to have SqlDbType under System.Data instead of System.Data.SqlClient like OleDbType is under System.Data.OleDb, or vice versa? Anyone ever notice this oddity?

Categories: .NET
Actions: E-mail | Permalink | Comments (1) | Comment RSSRSS comment feed

Updated Utility: Unleash It 2.3 - Now with Plugins!

November 8, 2004 19:11 by matthaw

Exactly 1 month from the last release, Unleash It 2.3 is now officially released with the gold stamp of approval. This release has some more major improvements in the application, however the biggest announcement for this release is the introduction of plugin support. Now, you have a way of writing managed code to do custom processes before, during, and after a deployment. With this release, I've also built and supplied the source code for 4 plugins:

  • File Exclusion Plugin - supply a file name to exclude during a deployment.
  • Visual Source Safe retrieval - retrieve VSS files prior to a deployment.
  • Vault retrieval - retrieve Vault 2.x files prior to a deployment
  • NAnt Execution - execute NAnt scripts prior to a deployment.

The installer also includes a PDF document outlining the plugin creation process, however feel free to start discussing anything in the forums. I've also created a new forum for posting your own plugins for others to download, discuss, and supply comments towards them.

So, here's the changelog for things that have changed:

  • Added: Ability to have N number of multiple deployment profiles.
  • Added: Tooltips for most controls on the main user interface.
  • Added: Ability to multi-select profiles to move in the multiple deployment.
  • Added: Ability to specify which build actions are to be included for VS.NET deployment. Configured in Tools->Options.
  • Added: Plugin functionality for deployments, with ability to disable plugins via Tools->Options.
  • Added: Ability to force the saving of selected file / folder masks via Tools->Options.
  • Added: Ability to globally remove file and folder masks.
  • Added: Ability to define command line parameters for pre/post commands.
  • Added: GUI now aware of the location when it was shut down and restores that.
  • Added: Splash Screen on startup.
  • Fixed: Invalid characters in VS.NET project files were throwing exceptions.
  • Fixed: Progress bar did not increment properly for UNC deployments.
  • Fixed: Logfile for UNC deployment showed the same path for both source and destination.
  • Fixed: Profile name was not being updated on form and on the combo box through quick editing of profile.
  • Fixed: File / Folder masks have to be clicked twice in the configuration to check them.
  • Changed: Updated VisualStyles component to 1.5.3
  • Changed: Files / Folders to be Deployed dialogs are now resizable.

To update your version of Unleash It (or just plain download it and try it out), go to http://www.eworldui.net/UnleashIt and grab your copy now. Enjoy all!



Categories: Unleash It
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Are You Sure?

November 5, 2004 00:44 by matthaw

So, here's the oddity of the day for me:

Now, I didn't go to C:\Windows and press delete, I noticed my recycle bin was full. So, Right Click -> "Empty". Boy its a good thing I don't want to delete that... "No".

Opening the Recycle Bin shows absolutely no files or directories. Could this be a message to switch to Linux? Gosh I hope not, I couldn't do any programming with VS.NET anymore.

Update: It seems to have fixed itself. Now I can successfully empty my recycle bin. Still a little leary about rebooting though.



Categories: General
Actions: E-mail | Permalink | Comments (2) | Comment RSSRSS comment feed

Managing Version Information in VS.NET

November 4, 2004 22:32 by matthaw

I was reading this weeks Code Project newsletter, when I came across an updated article named Versioning Controlled Build. The description so eloquently puts it: "A Visual Studio add-in that automates AssemblyVersion control."

One word, AWESOME! I downloaded the installer from the article, installed it, and launched VS.NET. Talk about an easy way of updating your version numbers for X number of projects. I know this is a daunting task for any developer that has more than 1 project that the version number needs to get updated.

Truly a great Add-In that will come handy for everyone!



Categories: .NET
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed


Copyright © 2000 - 2024 , Excentrics World