SharePoint 2007 -- Built on ASP.NET 2.0

One of the things we did with ASP.NET 2.0 was to work very closely with the SharePoint and CMS teams within Microsoft to enable much richer architectural and developer integration than we had with previous releases.

 

Specifically, we tried to drive many of the core architectural requirements and scenarios they and other portal/CMS vendors had into the ASP.NET 2.0 runtime (for example: web parts, virtual path providers and compilation, site navigation, membership and role management, personalization, etc).  The SharePoint/WSS/CMS Teams are then building their new releases on top of these ASP.NET 2.0 APIs -- and will have the Beta2 versions of these apps out shortly.  This will enable .NET developers to learn and master a single core set of APIs and then easily re-use this across any type of web application they are building – whether it is a SharePoint Portal, a CMS application, or a totally custom ASP.NET web application.

 

A few of the many cool extensibility scenarios this enables:

 

1) You can now build a web-part control that supports drag/drop user-personalization and customization and use it within any vanilla ASP.NET 2.0 application, or host it within a SharePoint 2007 or Windows SharePoint Services (WSS) site.

 

2) You can build a class library, control, or page that uses the Membership, Roles, Profile, or Site Navigation APIs and re-use it across both a custom ASP.NET application and a SharePoint/CMS site.  SharePoint will ship with a bunch of SharePoint providers that plug-in using the standard ASP.NET 2.0 Provider API (for example: they ship a SharePoint provider that integrates the SharePoint Page and List models under the ASP.NET 2.0 Site Navigation API).  This means you get *a lot* more mileage with your code, and can re-use your API knowledge for a lot more projects.

 

3) You can plug-in your own custom providers to extend SharePoint and WSS solutions just like you would vanilla ASP.NET 2.0 sites.  Because SharePoint uses the standard ASP.NET 2.0 APIs for things like Membership, this means you can now easily change the authentication mode and membership storage for SharePoint solutions (previous versions required Windows Credentials).  Sahil Malik posted last week here about how to-do this.  In Sahil’s post he was using the default ASP.NET Membership Provider to enable Forms Authentication for a SharePoint site.  What is cool is that you could actually plug-in *any* ASP.NET membership provider and have this scenario work.  You can also now download the source-code to the built-in ASP.NET providers, customize them or write your own, and then add them to a SharePoint or WSS solution.

 

We think all of this unification is going to enable a bunch of really cool scenarios for .NET developers going forward.  It also helps validate and drive requirements down to the APIs we ship in ASP.NET and the .NET Framework, and ensures that they provide all the hooks needed to build big feature-rich applications on top of them (having the Office Division starting to build on top of the new ASP.NET 2.0 APIs two years ago really drove a bunch of great enhancements and improvements to their extensibility and capabilities).

 

Best of all, it means you can also start more projects using SharePoint or WSS (note: Windows SharePoint Services is a free download and can be deployed totally free on Windows Server), and quickly create a solution with rich document management and collaboration support already built-in (including client Office tool support) – and then be able to customize and enhance it further using the ASP.NET 2.0 and VS 2005 skills you already know. 

 

This should enable you to build and deploy really great solutions even faster, and make your customers (whether internal or external) even happier. 

 

Hope this helps,

 

Scott

47 Comments

  • I am quite thrilled by Sharepoint V3. The only reason I plugged in the AspnetSqlMembershipProvider instead of my custom - was laziness :), but for our production application, we will be writing a custom membership provider.

  • Where is this Sharepoint v3/2007 ?



    Not beta yet is it?

  • Ignore my last post - I see the above mentioned.



    This is very very good news - I think having the custom provider is a major step forward in making SP more accessible for companies.



    Great work - I think having CMS a part of SP 2007 is another fantastic move.



    Will portal and team sites be the same technology?

  • It looks like you guys are making some great strides in the right direction.



    I am looking forward to the day they make reference to SharePoint dropping the table-based structure to lean toward CSS.

  • Scott,



    Will we be able to show information stored in SharePoint 2007 in a non-SharePoint ASP.NET 2.0 web site?



    Jeff

  • Scott,



    That is great, but I have an interesting question.



    My understanding with Windows licensing and IIS Web Apps (ASP.NET apps) is that if you authenticate against Active Directory then *every user* needs a Windows CAL to access the server. So if you have 100,000 remote users of your site you would need 100,000 CALs; You might instead be able to buy a per-CPU license which is much more expensive (but cheaper than 100,000 CALs) - I cannot remember the details.



    So with WSS 2, I always considered it *impossible* to use on public web sites due to these licensing issues. It is great for internal intranet scenarios, and also for extranet scenarios (Office Live is doing a great job with this in their essentials pack).



    So if WSS 3 allows authentication against any backend store rather than Active Directory, does this mean we can finally use WSS 3 on a public web site without the licensing issues (provided you are not authentication against Active Directory?).



    I would love to know the answer to this question, as it would make me evaluate where we can make use of WSS 3 in a hosting environment supporting possibly hundreds of thousands of customers.

  • Great! Software reusability is a simple and powerful concept. Factoring out the commonalities accross domains and build them into API's greatly improves software reusability, maintenance and reduce programmers learning time. We have built a procurements tracking web-app with asp.net 2.0 and SQL Server with default providers in a short time. I plan to add the collaboration and workflow capabilities later. I definitely will look into WSS and sharepoint servers. Hope they will help us to shorten development time as ASP.NET 2.0 does

  • Hi Scott, just wondering if Sharepoint V3 is supporting Atlas. Would be great to spice up SharePoint a bit! Maybe Atlas can provide a way to solve some of the unneccesary page refreshes in SharePoint.

  • Great news !!!



    I can't wait to get the Beta 2 !!!



    Bye from Spain

  • That's fantastic! Everything I've heard about Sharepoint v3 sounds amazing and I can't wait. Any chance the new WSS will render xhtml/css instead of the 400kb+ html soup that v2 does?



    Do you think the new WSS would be useful for internet sites (public access) as a CMS, rather than just used for private intranets? I dream of a CMS for asp.net that compares in price and flexibility to drupal or joomla.

  • Will beta 2 be publically available? Or do we need to sign up?

  • Jeff,



    I am sure Scott will have something to add, but AFAIK the answer is "Yes".



    You can very easily query anything over the WebService interface that Sharepoint 2007 offers and render information practically anywhere. ... theoretically .. you could do that in 2003 as well, but 2003 web service interface required you to pass in a NetworkCredential, which wasn't easily possible over an ASP.NET app. 2003 on the other hand can leverage WCF/WSE3.0 and offer a flexible set of credentials.



    Sahil

  • I think i tried the beta build and had issues while conencting to sql, not sure if it was 2007 beta build though, anyways i have just told my college friends and juniors about your and brian's blog and we all think its very informative, especially when one is serious abt his career then i think there is nothing like blogs, its like mentoring the whole developer community.



    thanks for your efforts !!



    saurabh

  • Hi David,



    I unfortunately don't know too much about SharePoint CAL based licensing -- so that is a good question. I think WSS can be deployed without CALs in internet scenarios though.



    Hope this helps,



    Scott

  • Hi Dion,



    I don't think SharePoint 3.0 built-in features are using Atlas yet (although they definitely plan to going forward). The good news, though, is that you should be able to use Atlas with custom pages and web-parts that you build -- and these can now be used with both SharePoint as well as regular ASP.NET sites.



    Hope this helps,



    Scott

  • Hi Dylan,



    You will definitely be able to use the new WSS and SharePoint for Internet sites (public access). It is explictly being designed to support that.



    Hope this helps,



    Scott

  • A few people above have asked when Beta2 will be and if it will be public. I think Beta2 is happening either this month or early June. I'm not sure yet whether it will be fully public - although I'm almost sure MSDN subscribers will be able to download it directly.



    Hope this helps,



    Scott

  • can u send me a clear example adout ajax with asp.net

  • For the guys, who keep harping on drupal or joomla on ASP.NET, have you tried out DotNetNuke ? It offers so much for the ASP.NET community but is so under rated. And you can just join in and add all your XHTML/CSS and Atlas stuff you want to, without waiting for Sharepoint portal server 2007 - i mean SPS 2007 beta OR next version of CMS.

  • I do think this is a good idea but unless I'm doing something wrong but when I export my user control to import in Sharepoint I have to provide the *ascx file etc and the *.cs exposing my code to customers. Is that right??

  • Hi Jon,

    You will need to publish your .ascx file, but you can compile your code-behind and other utility classes into an assembly, and install that within the \bin directory of the SharePoint application. That way you don't need to give your customers any source code.

    Hope this helps,

    Scott

  • I have published my ASCX file and got the dll put it in the bin directory of my site on Sharepoint 2007 beta 2 and modified the web.config for safecontrols but its a no go! Any ideas?



    Thanks

  • Hi Jon,

    If you want to send me email (scottgu@microsoft.com) I can put you in touch with someone who can hopefully help.

    Thanks,

    Scott

  • hi

    i am developing a sharepoint 2007 webpart

    can i use atlas update panel in this webpart

    thanks

    reddy

  • Hi Reddy,

    You can't currently use the UpdatePanel within a WebPart. But that is a feature that is coming soon.

    Hope this helps,

    Scott

  • So, is it possible to have a User Control in an ASP.NET 2.0 Web Part and use it in Sharepoint 2007, without using SmartParts?





    If so, how?

  • Hi Colin,

    I am following up to get the exact steps for how to load an ASP.NET user control within SharePoint 2007. I know you can do it, but don't have the exact steps yet.

    Hope this helps,

    Scott

  • hi Scott I want to add the information about the users in aspnetdb(such as user name and password,etc)to my database, that is, I want the aspnetdb to be a part of my system's database, can I do this? and how? many thanks

  • Hi Joy,

    Here is a blog post that describes how to configure the built-in ASP.NET providers in a SQL database: http://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx

    Hope this helps,

    Scott

  • Has anyone played around with adding custom provider ROLES to WSS/MOSS?

    I got the SqlMembershipProvider working fine on my WSS box, but i cant seem to figure out how the custom roles hook into WSS?!

    Any help appreciated

    AndersR

  • Hi Larkin,

    I have some mail out to the SharePoint team to get exact details of how you use user-controls with SharePoint 2007. I'll let you know once I hear back more in a few days.

    thanks,

    Scott

  • Thanks for the back up, Larkin!

    If you can get the info on this Scott, I'm sure lots of people will appreciate it.

  • Hi Scott,

    could you maybe drop them a line about my problem with custom role providers (read above)?

    That would rock...!

    AndersR

  • Any news on using user-controls with Sharepoint 2007? I am in complete agreement with Larkin & Colin.

  • Hi Jon and Colin,

    The person I sent mail to origionally is away on vacation at the moment, so I haven't heard back from him yet.

    But I sent mail to two other people yesterday and hope to hear back from them soon.

    Stay tuned!

    Scott

  • I'm trying to port a CMS site developed in ASP.NET 2.0 which makes heavy use of user controls as web parts... the thought that I would have to rewrite from scratch because SharePoint 2007 does not wrap with GenericWebPart is a HUGE (read: show stopper!!!)difference for me

  • Hi Andrew/Colin,

    The guys from SharePoint just got back to me, although I am still following up on some details.

    What I've heard is that it looks like you need to deploy user controls in a different way than compiled controls -- specifically via a webpart wrapper. If your webpart doesn't access any MOSS (sharepoint specific object model pieces), then it should work fine without modification in a vanilla ASP.NET 2.0 site and SharePoint.

    If you do want to access the specific SharePoint object model, then there are a few extra steps you need to take. I don't have the complete list of those right now (and am a mail thread with someone to get them). I'll let you know what I find out.

    Thanks,

    Scott

  • Scott,

    Could you also let us know how to wrap user controls that don't use the Sharepoint object model.

  • Sorry - how do you deploy using a webpart wrapper?

  • Would love to know the answer to this question (posed a few months ago)

    "That is great, but I have an interesting question.

    My understanding with Windows licensing and IIS Web Apps (ASP.NET apps) is that if you authenticate against Active Directory then *every user* needs a Windows CAL to access the server. So if you have 100,000 remote users of your site you would need 100,000 CALs; You might instead be able to buy a per-CPU license which is much more expensive (but cheaper than 100,000 CALs) - I cannot remember the details.

    So with WSS 2, I always considered it *impossible* to use on public web sites due to these licensing issues. It is great for internal intranet scenarios, and also for extranet scenarios (Office Live is doing a great job with this in their essentials pack).

    So if WSS 3 allows authentication against any backend store rather than Active Directory, does this mean we can finally use WSS 3 on a public web site without the licensing issues (provided you are not authentication against Active Directory?). "

    What are the disadvantages of a forms based authentication?

    Can we combine forms-based with windows-based authentication (i.e. forms based + everyone uses the same Windows account for authentication)

  • Hi Frank,

    If you host WSS on the Internet then you don't need a CAL for each user. We are actually working on some hosting programs right now to support this -- where the prices should be very low indeed. If you want to send me email in about a month (scottgu@microsoft.com) I will be able to loop you into these pilot programs and connect you up wiht the right folks to work with on this.

    Thanks,

    Scott

  • Thanks for the reply Scott.

    Ok, lets say the scenario changes a bit:

    Lets say we set up Sharepoint using FORMS-BASED authentication. Now, Lets say we have a seperate 'intranet' that authenticates users and then when users click a link, an application hosted by Sharepoint 2007 launches.

    Now, we don't want these users to authenticate themselves again (SSO), so when this user clicks the link to launch the application, we automate the users login into Sharepoint (by bypassing the login form using a hard-coded password).

    So essentially, the sharepoint website is DB driven and does not use any windows authentication (no need for CAL). The DB stores the usernames, the roles, permission settings, etc.

    Do you see any issues with this?

    It might be too early to tell...

  • Hi Frank,

    In theory I believe you could do that - although you want/need to be careful with how you fake authenticate the user onto the Internet site (make sure you never send an unencrypted username/password in cleartext).

    Hope this helps,

    Scott

  • Hi AndersR,

    Any chance you could send me email (scottgu@microsoft.com) with details on this question? I can then loop you in with the SharePoint folks to check.

    Thanks,

    Scott

  • Hi Colin (and others above),

    I heard back from the SharePoint team, and they said that they are working to enable a wrapper web-part control that enables you to use ASP.NET user controls as web-parts in SharePoint 2007. This will allow you to build a user control that uses features like part to part connections, etc and have it work both in a vanilla ASP.NET site and in a SharePoint 2007 site.

    They are working on putting together a whitepaper + sample that demonstrates how to-do this. I don't have a firm ETA on when this will be done -- but they were planning on meeting in the next week or two to hash it out.

    Hope this helps,

    Scott

  • Guys, if you just want to add asp .net controls in sharepoint pages(master &contentpage), not drag and drop from webpart gallery. it's fairly easy.

    The issue is that you have to tell sharepoint server that your user control is safe. By doing this, you should add entry for you user controls in Web.config

    Following is a work around:

    create a virtual directory (say “usercontrols”) including all your customized asp controls;

    add user control assembly to the GAC or _app_bin directory;

    Add following to web.config which tells sharepoint your user controls under “usercontrols” directory is safe:



    It took me quite a while to work out, hope it's useful.

  • Hi guys, if you just want to register and instantialize asp user controls on Sharepoint pages. you can:

    1. create a virtual directory (say “usercontrols”) including all your customized asp controls;

    2. add user control assembly to the GAC or _app_bin directory;

    3. Add following to webconfig which tells sharepoint your user controls under “unsercontrols” directory is safe:



    After that, you could register and instantialise a user control on a sharepoint pages just like you do in ASP .Net.

Comments have been disabled for this content.