News Archives 
   
(click month to expand)
  

Recent Technology News Stories

Solentive News
ASP.NET Grid View Extension [Client Side Sortable/Dragable....] Part I  [click for more...]
Extension to ASP.NET Grid View control having built-in Client side sorting, Column Dragging, Fixed header
29/02/2008   [Link] Muhammad Abubakar Dar
A peek at iPhone software plans  [click for more...]
APPLE will next week give details of how outside programmers can create software for its iPhone, a move aimed at spurring demand for the multifunction device.
29/02/2008   [Link]
Custom MembershipProvider ConnectionStringName Usage  [click for more...]

By Nannette Thacker

This is an issue that seems to confuse a lot of new developers. How do you use the "connectionStringName" defined within the membership provider area of the web.config file within a custom membership provider? Big mouthful, eh? Okay, let's break it down.

Within the web.config file, you may define your connection strings. For our example, below I am setting up a connection string to a SQL Server database within my project's App_Data folder, but it could be a connection string to a remote database on a database server as well.

<connectionStrings>
    <add name="SSSDataMDFConnectionString" 
    connectionString="Data Source=.\SQLEXPRESS;
    AttachDbFilename=|DataDirectory|\SSSDatabase.mdf;
    Integrated Security=True;User Instance=True"
    providerName="System.Data.SqlClient" />
    </connectionStrings>

In the above example, I have named my connection string SSSDataMDFConnectionString. Now I want to setup my custom Membership Provider in the system.web section of my web.config:

<membership defaultProvider="SSSMembershipProvider">
      <providers>
        <clear/>
        <add name="SSSMembershipProvider" 
        type="SSSMembershipProvider" 
        requiresQuestionAndAnswer="false" 
        enablePasswordRetrieval="true" 
        enablePasswordReset="true" 
        description="Custom Membership Provider" 
        requiresUniqueEmail="true" 
        applicationName="/" 
        passwordFormat="clear" 
        userIsOnlineTimeWindow="15" 
        connectionStringName="SSSDataMDFConnectionString"/>
      </providers>
    </membership>

In the above example, I have inserted the connection string name within the "connectionStringName" property. Note that if your custom membership provider is defined within a namespace, to be sure to add that to the name of the provider itself. For instance, if your namespace is "SSS" then you would add the namespace to the definition:

<membership defaultProvider="SSS.SSSMembershipProvider">
      <providers>
        <clear/>
        <add name="SSS.SSSMembershipProvider" 
        type="SSS.SSSMembershipProvider" 

Now let's look at a few snippets from our custom membership provider class. In the snippet below, notice I have defined the connection string variable.

Public Class SSSMembershipProvider
    Inherits MembershipProvider

  Public connStr As String
        

Typically, you may obtain the value of various configuration file settings with the use of config():

config("enablePasswordReset")

However, we need to use the ConfigurationManager.ConnectionStrings Property to obtain the configuration setting. Within the initialize function of the class I now retrieve the value of the actual connection string that is associated with the name defined in the web.config:

Public Overrides Sub Initialize(ByVal name As String, _
ByVal config As System.Collections.Specialized.NameValueCollection)
        
connStr = ConfigurationManager.ConnectionStrings(config("connectionStringName")).ConnectionString

The above is a very long line, and just in case it is cut off on the right, I will break it on 2 lines so you don't miss it:

connStr = ConfigurationManager.ConnectionStrings(
config("connectionStringName")).ConnectionString

Now you're all set to use this in your class functions for accessing the connection:

Using conn As New SqlConnection(connStr)
    conn.Open()

May your dreams be in ASP.NET!

Nannette Thacker
"Almost there. Almost there. Almost there. There." - River Tam (Firefly/Serenity)

29/02/2008   [Link]
Adding Ajax Support To Cuyahoga Framework  [click for more...]
In this article we I will try to show you how add Ajax support to our Cuyahoga web site.
29/02/2008   [Link] Ali Ozgur
Detect if JavaScript is enabled in ASPX  [click for more...]
Check if the browser has JavaScript enabled in the Page_Load method
29/02/2008   [Link] ShawnDevin
A Great Day for Microsoft!!!  [click for more...]

Feb 27, 2008 is a great day for Microsoft with the release of 3 revolutionary products, Visual Studio 2008, SQL Server 2008 and Windows Server 2008. Check out all the excitement by registering for a launch event near you or even virtually from the comfort of your computer.

http://www.microsoft.com/heroeshappenhere/default.mspx

29/02/2008   [Link]
Microsoft Launch 2008 in Los Angeles was a blast!  [click for more...]

photo (7)

This morning I went all the way to LA to attend to the Microsoft Launch 2008 in LA. Where after a great presentation from Steve Ballmer on Visual Studio 2008, Microsoft SQL 2008 and Microsoft Server 2008, we were showered on marketing gifts and t-shirts.

photo (5)

The setup was awesome, you can find a room fool of double screen computers with the new software installed for you to play with. Never seen that many computers in one room. Thanks to Server 2008 vitalization that IT set up had to go smother, otherwise image to set up each computer with one image.

photo (3)

ESRI was a Gold Sponsor on the Microsoft 2008 Launch.

photo (4)

The presentations and the stories were simple and fast, there wasn't a dull moment, however the sessions after lunch were packed of people or they had a very long line to get in. Guessing the were more developers than any other kind of geek, as the room "404" (great name by the way) was the busiest, I missed Brad Abrams presentation that I was looking forward to.

photo (6)

Even that, I catch a few people I wanted to see and I talked to the experts about Server 2008 and SQL 2008. I feel I missed a few things.

Time to open the DVDs and install the freebies.

Cheers

Al

29/02/2008   [Link]
Five New Security Tutorials!  [click for more...]
Scott Mitchell created five more tutorials in the Security series that present creating the membership schema in SQL Server, creating user accounts, validating user credentials against the membership user store, user-based authorization, and storing additional user information. Tutorials are available in both VB.NET and C# versions.
29/02/2008   [Link]
Using Localization in ASP.NET  [click for more...]
Outlines two useful methods for implementing localization in ASP.NET
29/02/2008   [Link] SubKamran
SQL Server 2008  [click for more...]
If you haven’t seen it, SQL Server 2008 February CTP is available for download ....(read more)
29/02/2008   [Link]
Silverlight Web Site Updated  [click for more...]

You may have noticed that the Silverlight web site at Microsoft.com has been updated. Well, I looks nicer than before, I like it. The system requirements are available here.

WindowClipping

For those of you that are trying to watch the virtual launch event (Heroes Happen Here) of Visual Studio 2008, SQL Server 2008 and Windows Server 2008 at http://www.microsoft.com/virtualevents/: if you have installed the Silverlight 1.1 alpha plugin you get an JavaScript error. The developers are working on that, but it seems that it doesn't work only on 1.1. The Silverlight 1.0 and 2.0 beta is working fine. Your solution could be to uninstall Silverlight 1.1 alpha and install the 1.0 again. The 2.0 beta will be available next month.

29/02/2008   [Link]
Tips, Tricks and Best Practices for .NET Developers - take the evening off today!  [click for more...]

I had one of my regular catch ups with local MVP, Nick Randolph yesterday.  He brought a great community site for Visual Studio developers to my attention.  It's well worth checking out if you are falling into the occasional "pot hole" or two with your favourite IDE..., particularly if you've been lucky enough to get access to VS08!  It's also a great place to share your own tips and help out a fellow developer in need.  Thanks to all who have contributed to this site, it's a great cause so check out the link and get out of the office a little earlier today!  Fin

29/02/2008   [Link]
UrlMappingModule  [click for more...]
Bringing MVC Framework-style URL redirections to classic ASP.NET 2.0 WebForms development
29/02/2008   [Link] Mike Ellison
SharePoint programming and permission problem  [click for more...]

Hi,

 

Last few days I was playing with SharePoint server 2007 and programming with it. All I was trying to do was add a list item in a simple list created in the SharePoint through a web part. The code to do the job was simple enough.

SPWeb site = SPContext.Current.Web;
SPList list = site.Lists["Vikram Site List"]; SPListItem newItem = list.Items.Add();
newItem ["Title"] = "http://www.VikramLakhotia.com";
newItem.Update();

But when I deployed the code it started giving me Permission error. It was very difficult to know from the error itself on what was the actual problem. The actual error was

 

Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, ' Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed.

 

I could not follow what problem can be there with permission in the line of code that I wrote. Later on googling the error code I found that the error was caused if you are running the SharePoint application with security policy WSS_Minimal. To be able to program against SharePoint Object model we need to change the security policy to WSS_Medium. This can be done by changing the trust level in the web.config file.

<trust level="WSS_Minimal" originUrl="" />

to

<trust level="WSS_Medium" originUrl="" />

This will solve the problem. Also note the medium trust level policy allows you to program against SharePoint object model and access NT event log.

Vikram

29/02/2008   [Link]
ASP.NET Data Grid Extension [Client Side Sortable/Dragable....] Part I  [click for more...]
Extension to ASP.NET data grid control having built-in Client side sorting, Column Dragging, Fixed header, Check All, Un Check All, Highlight selected row and more...
29/02/2008   [Link] Muhammad Abubakar Dar
The SharePoint Developer – New Job  [click for more...]
I joined the SharePoint Product Management team at Microsoft in late November 2007 and I've been learning lots about software development on the SharePoint Developer Platform. My new job is Sr. Technical Product Manager for SharePoint Developer. I think...(read more)
29/02/2008   [Link]
Five New Videos!  [click for more...]
Joe Stagner continues his AJAX series with videos on retrieving values from server-side AJAX controls and on using the AJAX Control Toolkit's Reorder Control. We’ve also added videos to the How Do I section to help you work with Master Pages, and the ObjectDataSource control.
29/02/2008   [Link]
NCover Basics: Improving Json.NET's Test Suite with NUnit and NCoverExplorer  [click for more...]
One of the easiest ways to master NCover is simply to dive into some code and improve tests, so in this article we'll be looking at improving the test quality for an open source project, Json.NET.
29/02/2008   [Link] Peter Waldschmidt
Load and display page contents asynchronously with full postback support  [click for more...]
An AJAX UpdatePanel with less communication overhead and better performance
29/02/2008   [Link] iucon
Microsoft relaunched the IIS website while launching Windows Server 2008  [click for more...]

Hi,

With the launch of Windows Server 2008 today Microsoft also relaunched the website for IIS.  Do check the newly relaunched website of IIS here

 

Vikram

29/02/2008   [Link]
Copyright © 2007 Solentive | Disclaimer | Contact | Home