Rolling Your Own Website Administration Tool - Part 1 23 May 2007 00:00 GMT
Forms-based authentication combined with ASP.NET 2.0's Membership and
Roles systems makes creating and managing user accounts incredibly easy. I continue to be amazed at how
the login-related Web controls encapsulate the array
of tasks that I had always had to code by hand in classic ASP.
To help administer users, roles, and authorization settings, ASP.NET 2.0 includes the Web
Site Administration Tool (WSAT). WSAT is available from the Visual Studio 2005 Website menu via the ASP.NET Configuration
menu option. Launching the WSAT from Visual Studio, however, allows only local websites to be administered.
Such restrictions are limiting when hosting a website remotely with a web hosting company. (Granted, the WSAT's files
are available in the %WINDOWS%\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles folder and can be
deployed from there.)
Rather than move the existing WSAT tool to my remote host, I decided to build my own WSAT-like tool from the ground up.
My version duplicates all features inside the Security section of the WSAT and adds a useful "Access Rules Summary" view
of the website security as applied to any given user or role. The complete code can be downloaded from the end of this
article and added to your site within a matter of minutes. This article provides an overview of my custom WSAT implementation
and explores the user list and add and edit user pages in detail. A future article will explore the role management
and access rules sections in detail. Read on to learn more!
Read More >
Source: 4GuysFromRolla Debugging SQL Server 2005 Stored Procedures in Visual Studio 16 May 2007 00:00 GMT
With Microsoft SQL Server 2000 it was possible to debug stored procedures from directly within Query Analyzer (see
Debugging a SQL Stored Procedure from inside SQL Server 2000
Query Analyzer for more information). With SQL Server 2005, however, this functionality was moved out of SQL Server Management
Studio and into the Visual Studio IDE. Using this technique, it is possible to step into your stored procedures, one statement
at a time, from within Visual Studio. It is also possible to set breakpoints within your stored procedures' statements and
have these breakpoints hit when debugging your application.
All editions of SQL Server 2005 include debugging support (including the Express Edition). However, only the Team Systems and Professional
editions of Visual Studio enable stored procedure debugging from within the IDE. In short, if you are using
Visual Web Developer or
Visual Studio Standard Edition then you cannot
step through a stored procedure or enter the stored procedure via application debugging.
In this article we will examine how to debug SQL Server 2005 stored procedures through the Visual Studio IDE. We will
look at both stepping into a stored procedure directly from the IDE as well as how to set breakpoints within the stored
procedure that are then hit when debugging the application. Read on to learn more!
Read More >
Source: 4GuysFromRolla Deploying a Local Database to a Remote Web Host 09 May 2007 00:00 GMT
Microsoft Visual Web Developer and SQL Server 2005 Express Edition make it easy to design, develop, and test ASP.NET web
applications locally. In my books,
tutorials, and classes,
the explanations, examples, and assignments often use these tools to develop web applications locally. After creating a usable,
interesting web application, readers and students invariably ask, "How do I get this website on the Internet?"
Web applications designed for personal use, as a hobby, or for small- to medium-sized businesses are typically hosted
by a web host provider. A web host provider is a company that has a plethora of computers that are accessible from the Internet.
For a monthly fee, you can upload your web application to a web hosting company's servers to make your site available.
Deploying a web application from your local development machine to the web host company's servers requires uploading the
files and information needed to serve your site. Many of these files can simply be uploaded to the web hosting company's
servers using FTP or
FrontPage Server Extensions (FPSE). What is more challenging
is uploading a Microsoft SQL Server database from the local development machine to the remote web host. This challenge
stems in part from the fact that most web hosting companies disallow use of Microsoft SQL Server 2005 Express Edition and
instead require that you use a database on their database server (which might be SQL Server 2000 or 2005). Therefore,
to deploy your site you will need to somehow duplicate your database's schema and data on the web hosting company's database server.
In short, duplicating a database's schema and data often means obtaining the T-SQL
scripts to create the schema and add the data and executing that script on the remote database server. Fortunately, this
process is greatly simplified by Microsoft's SQL Server Database Publishing Wizard. This wizard allows you to create the
script needed to publish a database directly from within Visual Studio. Read on to learn more!
Read More >
Source: 4GuysFromRolla