Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

global assemblies
Ranny
#1 Posted : Saturday, 23 July 2011 2:40:09 AM(UTC)
Ranny

Rank: Member

Joined: 3/12/2009(UTC)
Posts: 11
Location: USA

If I have serveral galleries running on the same we server, and in some case more than one instance of the same gallery, then can they all use the same set of GSP dll files, and the other third party binaries?

It seems logical that we would not copy the bin folder to more than one place.

Maybe we would use the Global Assembly Cashe. Maybe all of the binaries need to be digitally signed and strongly typed, or something like that.

Ranny
Ranny
#2 Posted : Saturday, 23 July 2011 2:43:48 AM(UTC)
Ranny

Rank: Member

Joined: 3/12/2009(UTC)
Posts: 11
Location: USA

If the dlls and exe are copied to a folder in the web app folder, then do we add a reference to each of these dll and exe files, or just to some particular files?
Roger Martin
#3 Posted : Saturday, 23 July 2011 8:01:06 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

There is a difference between an instance of a GSP web application and a gallery. Each web application - which consists of a set of dlls - has one or more galleries.

So, yes, you can have many galleries share the same set of dlls.

I don't know what you mean by "add a reference". Are you talking about integrating a gallery into an existing site in Visual Studio?

Both these topics are discussed at length in the Admin Guide, so if you haven't yet checked it out, please do so.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
Ranny
#4 Posted : Sunday, 24 July 2011 5:31:11 PM(UTC)
Ranny

Rank: Member

Joined: 3/12/2009(UTC)
Posts: 11
Location: USA

Yes that is exactly it; I want to add a gallery to an existing asp.net web application. The question about references arrived when I was reading the note at the bottom of page 247 in the admin guide. I noticed that there are 17 files (two exe and 15 dll) in the bin folder of our gsp app installation, and wondered if I would need to add 17 references to our app. I liked putting the gsp dll files in a separate folder other than our app's bin folder. Today I noticed the discussion on page 210 of the gsp admin guide. It seems that technique 1 on page 210 is the next simplist way to add a gallery and not use an iframe. I am wanting our app to respond to events that happen in the gsp app; actually just want our app to respond when the currently selected album id in the gsp app changes. I am not smart enough yet to know if that needs access to gsp api and references to assemblies or not.
The other question about global assemblies came when I was thinking that if one set of gsp assemblies were installed on the machine and any number of apps could reference them.
Roger Martin
#5 Posted : Monday, 25 July 2011 8:26:08 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

You do not need the references. Here are a couple ways to figure out the album ID without them:

* Modify the GSP source code to publish the current album ID in a way that is accessible by your app. For example, you could add a line to the InitializePage function in GalleryPage.cs that assigns the current album ID to the HTTP context or session:

Code:
HttpContext.Current.Items["AlbumId"] = this.GetAlbumId();


or

Code:
Session["AlbumId"] = this.GetAlbumId();


Then in the page load event of your app you could retrieve this data.

* Write code in your app to retrieve the album ID from the query string parameter 'aid'. Note, however, that this parameter is not present in some cases, such as when a single media object is being shown. In that case, the 'moid' parameter indicates the media object ID and GSP is able to determine the album ID from that.

Hope this helps.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
Rss Feed  Atom Feed
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.