I integrated GalleryServerPro into BlogEngine.NET using the ASP.NET SQL Server Membership. Here are the steps that I went through to accomplish this.

Integrating GalleryServerPro with BlogEngine.NET (Please note this is for MS SQL Server installation using SQL Server Membership, you can tweak it to be anything you want this just worked for my setup)

  1. Obtain GalleryServerPro from http://www.galleryserverpro.com/ (Please donate, this guy rocks!)
  2. Compile the web application into a separate folder
  3. Copy all of the .dll files from GalleryServerPro/Website/bin into your BlogEngine.NET/Bin folder
  4. I created a folder called BlogEngine.NET/gallery to support the required files
  5. This is the batch file that I use:

    xcopy /Y /S GalleryServerPro\Website\gs\controls BlogEngine\BlogEngine.NET\gallery\gs\controls\
    xcopy /Y /S GalleryServerPro\Website\gs\handler BlogEngine\BlogEngine.NET\gallery\gs\handler\
    xcopy /Y /S GalleryServerPro\Website\gs\images BlogEngine\BlogEngine.NET\gallery\gs\images\
    xcopy /Y /S GalleryServerPro\Website\gs\pages BlogEngine\BlogEngine.NET\gallery\gs\pages\
    xcopy /Y /S GalleryServerPro\Website\gs\script BlogEngine\BlogEngine.NET\gallery\gs\script\
    xcopy /Y /S GalleryServerPro\Website\gs\services BlogEngine\BlogEngine.NET\gallery\gs\services\
    xcopy /Y /S GalleryServerPro\Website\gs\skins BlogEngine\BlogEngine.NET\gallery\gs\skins\
    REM xcopy /Y /S GalleryServerPro\Website\CodeFiles BlogEngine\BlogEngine.NET\App_Code\CodeFiles\
    xcopy /Y /S GalleryServerPro\Website\Properties\* BlogEngine\BlogEngine.NET\Properties\
    xcopy /Y /S GalleryServerPro\Website\App_GlobalResources\* BlogEngine\BlogEngine.NET\App_GlobalResources\
    xcopy /Y /S GalleryServerPro\Website\bin\GalleryServerPro.Web.dll BlogEngine\BlogEngine.NET\Bin\
    del /S /F BlogEngine\BlogEngine.NET\gallery\gs\*.designer.cs
    echo DONE

    Keep in mind that you need to call the delete command. Removing the *.designer.cs files are required to convert these control files from a web application to a website (since that is what BlogEngine.NET uses).

  6. This step is the most complicated and difficult. Please be VERY aware of how to modify web.config files. If there is an error after these instructions it is 95% chance that it was an error inside this step.
  7. Merge data from the GalleryServerPro/Website/web_sqlserver_2.0 (or GalleryServerPro/Website/web_sqlserver_3.5 depending what version of .NET Framework you have). into your BlogEngine.NET/web.config. I would strongly suggest backing up your old web.config file so you can redo it over again if things get too hairy.
  8. Edit your global.asax file by adding this to the end of your void Application_Start(object sender, EventArgs e) method
    Application["ComponentArtWebUI_AppKey"] = "This edition of ComponentArt Web.UI is licensed for Gallery Server Pro application only.";
  9. Run the http://yoursitehere.com/gallery/Default.aspx?g=install and follow the Wizard
    After you upload the changes to your website follow these instructions on how to get the website setup http://www.galleryserverpro.com/support/GalleryServerProAdminGuide_v2_2_3286.pdf
  10. After installing it look at BlogEngine.NET/gallery/gs/pages/install.ascx and change the setup option to false

You can visit my gallery by going to http://www.jwendl.net/gallery/

I also wrote an extension to convert [ gsp:1234 ] into a GalleryServerPro thumbnail. I am still working on it though, but here is the initial version.

GalleryServerPro.cs (3.13 kb)

Comments Comments (24) Permalink Permalink     Rss feed for comments Post Comment Feed

  • E-Mail
  • DotNetKicks
  • Digg
  • LinkedIn
  • StumbleUpon
  • Slashdot
  • TwitThis
  • Facebook
  • del.icio.us
  • Reddit
  • Yahoo! MyWeb

Edit: I have stopped work on this functionality as I was able to integrate BlogEngine and GalleryServerPro

I am providing a "pre-release" version of my photo gallery control for BlogEngine. There were a few things I considered when making this control (and not going with other solutions that exist).

  • No third party assemblies (that means everything written from scratch).
  • Keep business logic and control logic inside one contained .DLL file.
  • The interface with BlogEngine will be through an extension.
  • Follow the BlogEngine method of abstracting data types and resource files.
  • Make the gallery control easy to setup and use.

With these goals in mind, I hope that my assembly + extension will be considered as part of the core of BlogEngine. If I do not accomplish this goal, well then I have a pretty kick arse photo gallery for my personal use.

 More...

Comments Comments (2) Permalink Permalink     Rss feed for comments Post Comment Feed

  • E-Mail
  • DotNetKicks
  • Digg
  • LinkedIn
  • StumbleUpon
  • Slashdot
  • TwitThis
  • Facebook
  • del.icio.us
  • Reddit
  • Yahoo! MyWeb

The XBox 360 Widget that I use on this site was fairly straight forward to build thanks to mads and the team for making such an awesome framework for widgets. This post will run you through how to create such a widget.

It is fairly easy to create a widget as all you need to have is an edit.ascx to handle the edit fields and a widget.ascx to handle the display of the actual widget.

Edit: This article + code is horribly out of date. There is a better version of this widget located on biztron.net

More...

Comments Comments (7) Permalink Permalink     Rss feed for comments Post Comment Feed

  • E-Mail
  • DotNetKicks
  • Digg
  • LinkedIn
  • StumbleUpon
  • Slashdot
  • TwitThis
  • Facebook
  • del.icio.us
  • Reddit
  • Yahoo! MyWeb

The latest build of BlogEngine now supports multiple scalar extension settings. This is great news as now you can build a much more robust extension without creating a custom administration screen! I love the work that mads and rtur does with BlogEngine.

You can read more about it at http://rtur.net/blog/post/2008/02/25/Using-multiple-settings-in-Extension-Manager.aspx

Comments Comments (0) Permalink Permalink     Rss feed for comments Post Comment Feed

  • E-Mail
  • DotNetKicks
  • Digg
  • LinkedIn
  • StumbleUpon
  • Slashdot
  • TwitThis
  • Facebook
  • del.icio.us
  • Reddit
  • Yahoo! MyWeb

Every time I go deeper into the BlogEngine code base I am caught off guard at how well thought out the abstraction layers are. The ExtensionManager is another layer that helps people who build Extensions have a place to administrate their extension. If you don't want to use the default Settings class holder, you can use a custom administration page.

Method public static void SetAdminPage(string extension, string url)
Description Allows to set custom settings page to use instead of default page.
Usage ExtensionManager.SetAdminPage(“BBCode”, “~/path/to/mypage.aspx”);

http://rtur.net/blog/post/2008/01/Documentation-on-Extension-Manager.aspx

I am going to have to put this to good use with my RandomQuotes extension that I am trying to make work.

Comments Comments (4) Permalink Permalink     Rss feed for comments Post Comment Feed

  • E-Mail
  • DotNetKicks
  • Digg
  • LinkedIn
  • StumbleUpon
  • Slashdot
  • TwitThis
  • Facebook
  • del.icio.us
  • Reddit
  • Yahoo! MyWeb

This BlogEngine instance uses the Asp.NET Membership Provider, and it was actually quite easy to convert. Big kudos to the team who has worked on this Blog software.

Comment out this code inside Web.config

  <membership defaultProvider="XmlMembershipProvider" >
    <providers>
      <clear />
      <add name="XmlMembershipProvider" type="BlogEngine.Core.Providers.XmlMembershipProvider, BlogEngine.Core" description="XML membership provider" xmlFileName="~/App_Data/users.xml"/>
    </providers>
   </membership>

   <roleManager defaultProvider="XmlRoleProvider" enabled="true" cacheRolesInCookie="true" cookieName=".BLOGENGINEROLES">
    <providers>
      <clear />
      <add name="XmlRoleProvider" type="BlogEngine.Core.Providers.XmlRoleProvider, BlogEngine.Core" description="XML role provider" xmlFileName="~/App_Data/roles.xml"/>
    </providers>
   </roleManager>

Replace it with this code

  <membership defaultProvider="SqlMembershipProvider">
    <providers>
      <add name="SqlMembershipProvider"
          type="System.Web.Security.SqlMembershipProvider"
          connectionStringName="BlogEngine"
          applicationName="JwendlBlog"
          minRequiredPasswordLength="5"
          minRequiredNonalphanumericCharacters="0" />
    </providers>
   </membership>

   <roleManager enabled="true" defaultProvider="SqlRoleProvider">
    <providers>
      <add connectionStringName="BlogEngine" name="SqlRoleProvider"
          applicationName="JwendlBlog"
          type="System.Web.Security.SqlRoleProvider" />
    </providers>
   </roleManager></pre></div>

 

Then you have to install the ASP.NET Membership SQL Registration program. Best described at this URL http://aspnet.4guysfromrolla.com/articles/040506-1.aspx

This was almost all you need to do to finish the conversion. The problem is that you need to now setup a default user of some sort. This can be easy, or hard depending on how the WSAT installed your instance. Please read up on ASP.NET membership before you attempt to convert over. I had to manually set the roles up on the proper application and user inside the aspnet_UsersInRoles table. After that, login with the default user and everything works just fine.

The reason why this works is because the XmlMembershipProvider class inherits the MembershipProvider class that ASP.NET provides. This means that all of the functions that BlogEngine uses for authentication are extensible to any custom membership provider that you can dream of.

Comments Comments (10) Permalink Permalink     Rss feed for comments Post Comment Feed

  • E-Mail
  • DotNetKicks
  • Digg
  • LinkedIn
  • StumbleUpon
  • Slashdot
  • TwitThis
  • Facebook
  • del.icio.us
  • Reddit
  • Yahoo! MyWeb

About Author

Justin Wendlandt
Justin Wendlandt
I work for Wells Fargo, play a lot of video games, and program in many languages. [ more ] E-mail me Send mail

View Justin Wendlandt's profile on LinkedIn View Justin Wendlandt's Facebook Profile View Justin Wendlandt's Twitter Profile View Justin Wendlandt's Zune Profile View Justin Wendlandt's Xbox Live Profile

Calendar

<<  March 2010  >>
MoTuWeThFrSaSu
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar

Recent Posts

Recent Comments

Comment RSS

Most comments

wow cheats wow cheats
1 comments
us United States
S&#246;koptimering Sökoptimering
1 comments
us United States
commercial roofing hayward commercial roofing hayward
1 comments
us United States

Digsby

Poll

This poll is closed.
What do you use to connect to the internet?
A DLink Exterme Gaming router
 
0.0%
A Linksys / Cisco home router
 
0.0%
None of the above
 
0.0%
A Netgear home router
 
0.0%
I built my own box to do routing
 
100.0%

Total Votes: 1

Stock Quotes

WFC 29.815 +0.055 (+0.18%)
GOOG 582.94 +1.80 (+0.31%)
BBY 40.247 +0.777 (+1.97%)
CML 16.73 +0.63 (+3.91%)
COST 60.3457 +0.4457 (+0.74%)
MSFT 29.225 +0.045 (+0.15%)

Xbox Gamer Card

Jwendl Gamer Score: 10225
Jwendl
Borderlands (1045) South Park (180) Rock Band 2 (310) Gears of War 2 (400) TEKKEN 6 (0) Culdcept SAGA (95) CSI: Deadly Intent (0) Madden NFL 10 (0) CSI-Hard Evidence (0) Eternal Sonata (40) Magnacarta2 (50) Spectral Force 3 (275) Left 4 Dead 2 (50) LEGO Batman (0) Madden NFL 09 (375) Soulcalibur IV (325)
Offline
3/12/2010 3:53:21 AM
Last seen 8 hours ago playing Xbox.com

Xbox Avatar

xbox Avatar

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

Creative Commons License